conductor-node 11.10.1 → 12.0.0-beta.2
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 +54 -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 +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 -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
package/uploads.mjs
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { FormData, File, getMultipartRequestOptions, isFsReadStream, } from "./_shims/index.mjs";
|
|
2
|
+
export { fileFromPath } from "./_shims/index.mjs";
|
|
3
|
+
export const isResponseLike = (value) => value != null &&
|
|
4
|
+
typeof value === 'object' &&
|
|
5
|
+
typeof value.url === 'string' &&
|
|
6
|
+
typeof value.blob === 'function';
|
|
7
|
+
export const isFileLike = (value) => value != null &&
|
|
8
|
+
typeof value === 'object' &&
|
|
9
|
+
typeof value.name === 'string' &&
|
|
10
|
+
typeof value.lastModified === 'number' &&
|
|
11
|
+
isBlobLike(value);
|
|
12
|
+
/**
|
|
13
|
+
* The BlobLike type omits arrayBuffer() because @types/node-fetch@^2.6.4 lacks it; but this check
|
|
14
|
+
* adds the arrayBuffer() method type because it is available and used at runtime
|
|
15
|
+
*/
|
|
16
|
+
export const isBlobLike = (value) => value != null &&
|
|
17
|
+
typeof value === 'object' &&
|
|
18
|
+
typeof value.size === 'number' &&
|
|
19
|
+
typeof value.type === 'string' &&
|
|
20
|
+
typeof value.text === 'function' &&
|
|
21
|
+
typeof value.slice === 'function' &&
|
|
22
|
+
typeof value.arrayBuffer === 'function';
|
|
23
|
+
export const isUploadable = (value) => {
|
|
24
|
+
return isFileLike(value) || isResponseLike(value) || isFsReadStream(value);
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
28
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
|
|
29
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
30
|
+
* @param {Object=} options additional properties
|
|
31
|
+
* @param {string=} options.type the MIME type of the content
|
|
32
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
33
|
+
* @returns a {@link File} with the given properties
|
|
34
|
+
*/
|
|
35
|
+
export async function toFile(value, name, options) {
|
|
36
|
+
// If it's a promise, resolve it.
|
|
37
|
+
value = await value;
|
|
38
|
+
// If we've been given a `File` we don't need to do anything
|
|
39
|
+
if (isFileLike(value)) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
if (isResponseLike(value)) {
|
|
43
|
+
const blob = await value.blob();
|
|
44
|
+
name || (name = new URL(value.url).pathname.split(/[\\/]/).pop() ?? 'unknown_file');
|
|
45
|
+
// we need to convert the `Blob` into an array buffer because the `Blob` class
|
|
46
|
+
// that `node-fetch` defines is incompatible with the web standard which results
|
|
47
|
+
// in `new File` interpreting it as a string instead of binary data.
|
|
48
|
+
const data = isBlobLike(blob) ? [(await blob.arrayBuffer())] : [blob];
|
|
49
|
+
return new File(data, name, options);
|
|
50
|
+
}
|
|
51
|
+
const bits = await getBytes(value);
|
|
52
|
+
name || (name = getName(value) ?? 'unknown_file');
|
|
53
|
+
if (!options?.type) {
|
|
54
|
+
const type = bits[0]?.type;
|
|
55
|
+
if (typeof type === 'string') {
|
|
56
|
+
options = { ...options, type };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return new File(bits, name, options);
|
|
60
|
+
}
|
|
61
|
+
async function getBytes(value) {
|
|
62
|
+
let parts = [];
|
|
63
|
+
if (typeof value === 'string' ||
|
|
64
|
+
ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.
|
|
65
|
+
value instanceof ArrayBuffer) {
|
|
66
|
+
parts.push(value);
|
|
67
|
+
}
|
|
68
|
+
else if (isBlobLike(value)) {
|
|
69
|
+
parts.push(await value.arrayBuffer());
|
|
70
|
+
}
|
|
71
|
+
else if (isAsyncIterableIterator(value) // includes Readable, ReadableStream, etc.
|
|
72
|
+
) {
|
|
73
|
+
for await (const chunk of value) {
|
|
74
|
+
parts.push(chunk); // TODO, consider validating?
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
throw new Error(`Unexpected data type: ${typeof value}; constructor: ${value?.constructor
|
|
79
|
+
?.name}; props: ${propsForError(value)}`);
|
|
80
|
+
}
|
|
81
|
+
return parts;
|
|
82
|
+
}
|
|
83
|
+
function propsForError(value) {
|
|
84
|
+
const props = Object.getOwnPropertyNames(value);
|
|
85
|
+
return `[${props.map((p) => `"${p}"`).join(', ')}]`;
|
|
86
|
+
}
|
|
87
|
+
function getName(value) {
|
|
88
|
+
return (getStringFromMaybeBuffer(value.name) ||
|
|
89
|
+
getStringFromMaybeBuffer(value.filename) ||
|
|
90
|
+
// For fs.ReadStream
|
|
91
|
+
getStringFromMaybeBuffer(value.path)?.split(/[\\/]/).pop());
|
|
92
|
+
}
|
|
93
|
+
const getStringFromMaybeBuffer = (x) => {
|
|
94
|
+
if (typeof x === 'string')
|
|
95
|
+
return x;
|
|
96
|
+
if (typeof Buffer !== 'undefined' && x instanceof Buffer)
|
|
97
|
+
return String(x);
|
|
98
|
+
return undefined;
|
|
99
|
+
};
|
|
100
|
+
const isAsyncIterableIterator = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function';
|
|
101
|
+
export const isMultipartBody = (body) => body && typeof body === 'object' && body.body && body[Symbol.toStringTag] === 'MultipartBody';
|
|
102
|
+
/**
|
|
103
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
104
|
+
* Otherwise returns the request as is.
|
|
105
|
+
*/
|
|
106
|
+
export const maybeMultipartFormRequestOptions = async (opts) => {
|
|
107
|
+
if (!hasUploadableValue(opts.body))
|
|
108
|
+
return opts;
|
|
109
|
+
const form = await createForm(opts.body);
|
|
110
|
+
return getMultipartRequestOptions(form, opts);
|
|
111
|
+
};
|
|
112
|
+
export const multipartFormRequestOptions = async (opts) => {
|
|
113
|
+
const form = await createForm(opts.body);
|
|
114
|
+
return getMultipartRequestOptions(form, opts);
|
|
115
|
+
};
|
|
116
|
+
export const createForm = async (body) => {
|
|
117
|
+
const form = new FormData();
|
|
118
|
+
await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value)));
|
|
119
|
+
return form;
|
|
120
|
+
};
|
|
121
|
+
const hasUploadableValue = (value) => {
|
|
122
|
+
if (isUploadable(value))
|
|
123
|
+
return true;
|
|
124
|
+
if (Array.isArray(value))
|
|
125
|
+
return value.some(hasUploadableValue);
|
|
126
|
+
if (value && typeof value === 'object') {
|
|
127
|
+
for (const k in value) {
|
|
128
|
+
if (hasUploadableValue(value[k]))
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
};
|
|
134
|
+
const addFormValue = async (form, key, value) => {
|
|
135
|
+
if (value === undefined)
|
|
136
|
+
return;
|
|
137
|
+
if (value == null) {
|
|
138
|
+
throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`);
|
|
139
|
+
}
|
|
140
|
+
// TODO: make nested formats configurable
|
|
141
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
142
|
+
form.append(key, String(value));
|
|
143
|
+
}
|
|
144
|
+
else if (isUploadable(value)) {
|
|
145
|
+
const file = await toFile(value);
|
|
146
|
+
form.append(key, file);
|
|
147
|
+
}
|
|
148
|
+
else if (Array.isArray(value)) {
|
|
149
|
+
await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry)));
|
|
150
|
+
}
|
|
151
|
+
else if (typeof value === 'object') {
|
|
152
|
+
await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop)));
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=uploads.mjs.map
|
package/uploads.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"OACO,EACL,QAAQ,EACR,IAAI,EAGJ,0BAA0B,EAE1B,cAAc,GACf;OAEM,EAAE,YAAY,EAAE;AAiDvB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAU,EAAyB,EAAE,CAClE,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;IAC7B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAU,EAAqB,EAAE,CAC1D,KAAK,IAAI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AE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;KACH;SAAM;QACL,MAAM,IAAI,SAAS,CACjB,wGAAwG,KAAK,UAAU,CACxH,CAAC;KACH;AACH,CAAC,CAAC"}
|
package/version.d.ts
ADDED
package/version.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
package/version.js
ADDED
package/version.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
ADDED
package/version.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}
|
package/dist/package.json
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "conductor-node",
|
|
3
|
-
"version": "11.10.1",
|
|
4
|
-
"description": "QuickBooks Desktop API for Node.js and TypeScript",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"QuickBooks",
|
|
7
|
-
"QuickBooks Desktop",
|
|
8
|
-
"QuickBooks Enterprise",
|
|
9
|
-
"QuickBooks Web Connector",
|
|
10
|
-
"QBWC",
|
|
11
|
-
"qbXML",
|
|
12
|
-
"QB Desktop",
|
|
13
|
-
"QB Enterprise",
|
|
14
|
-
"QBD",
|
|
15
|
-
"QBDT",
|
|
16
|
-
"QBE",
|
|
17
|
-
"Intuit"
|
|
18
|
-
],
|
|
19
|
-
"homepage": "https://conductor.is",
|
|
20
|
-
"repository": "github:conductor-is/quickbooks-desktop-api",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"author": "Conductor <support@conductor.is>",
|
|
23
|
-
"type": "commonjs",
|
|
24
|
-
"main": "dist/src/index.js",
|
|
25
|
-
"types": "dist/src/index.d.ts",
|
|
26
|
-
"files": [
|
|
27
|
-
"dist/src/**/*.[jt]s",
|
|
28
|
-
"dist/package.json"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
32
|
-
"delete-compiled-dev-files": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/test/*",
|
|
33
|
-
"diff": "pnpm pack && npm diff --diff=conductor-node@latest --diff=conductor-node-$(node -p \"require('./package.json').version\").tgz && pnpm clean",
|
|
34
|
-
"prepack": "pnpm tsc && pnpm delete-compiled-dev-files && pnpm tsc-alias",
|
|
35
|
-
"postpack": "rm -rf dist",
|
|
36
|
-
"prepublishOnly": "pnpm jest"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"axios": "^1.7.9"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"axios-mock-adapter": "^1.22.0",
|
|
43
|
-
"tsc-alias": "^1.8.10"
|
|
44
|
-
},
|
|
45
|
-
"engines": {
|
|
46
|
-
"node": ">=16"
|
|
47
|
-
}
|
|
48
|
-
}
|
package/dist/src/Client.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import QbdIntegration from "./integrations/qbd/QbdIntegration";
|
|
2
|
-
import AuthSessionsResource from "./resources/AuthSessionsResource";
|
|
3
|
-
import EndUsersResource from "./resources/EndUsersResource";
|
|
4
|
-
export interface ClientOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Enables logging each request, response, and error.
|
|
7
|
-
*/
|
|
8
|
-
readonly verbose?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export default class Client {
|
|
11
|
-
readonly endUsers: EndUsersResource;
|
|
12
|
-
readonly authSessions: AuthSessionsResource;
|
|
13
|
-
/**
|
|
14
|
-
* Executes any QuickBooks Desktop (QBD) API against the specified EndUser.
|
|
15
|
-
*/
|
|
16
|
-
readonly qbd: QbdIntegration;
|
|
17
|
-
private readonly httpClient;
|
|
18
|
-
constructor(apiKey: string, { verbose }?: ClientOptions);
|
|
19
|
-
private createHttpClient;
|
|
20
|
-
private createHeaders;
|
|
21
|
-
}
|
package/dist/src/Client.js
DELETED
|
@@ -1,54 +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 package_json_1 = __importDefault(require("./../package.json"));
|
|
7
|
-
const QbdIntegration_1 = __importDefault(require("./integrations/qbd/QbdIntegration"));
|
|
8
|
-
const errorHandling_1 = require("./interceptors/errorHandling");
|
|
9
|
-
const logging_1 = require("./interceptors/logging");
|
|
10
|
-
const AuthSessionsResource_1 = __importDefault(require("./resources/AuthSessionsResource"));
|
|
11
|
-
const EndUsersResource_1 = __importDefault(require("./resources/EndUsersResource"));
|
|
12
|
-
const checkForUpdates_1 = require("./utils/checkForUpdates");
|
|
13
|
-
const axios_1 = __importDefault(require("axios"));
|
|
14
|
-
class Client {
|
|
15
|
-
endUsers;
|
|
16
|
-
authSessions;
|
|
17
|
-
/**
|
|
18
|
-
* Executes any QuickBooks Desktop (QBD) API against the specified EndUser.
|
|
19
|
-
*/
|
|
20
|
-
qbd;
|
|
21
|
-
httpClient;
|
|
22
|
-
constructor(apiKey, { verbose = false } = {}) {
|
|
23
|
-
(0, checkForUpdates_1.checkForUpdates)();
|
|
24
|
-
this.httpClient = this.createHttpClient(apiKey, verbose);
|
|
25
|
-
this.endUsers = new EndUsersResource_1.default(this.httpClient);
|
|
26
|
-
this.authSessions = new AuthSessionsResource_1.default(this.httpClient);
|
|
27
|
-
this.qbd = new QbdIntegration_1.default(this.httpClient);
|
|
28
|
-
}
|
|
29
|
-
createHttpClient(apiKey, verbose) {
|
|
30
|
-
// We use an environment variable for overriding the server URL for testing
|
|
31
|
-
// and development instead of checking `NODE_ENV` to ensure `conductor-node`
|
|
32
|
-
// users use the production API server when their `NODE_ENV` is set to
|
|
33
|
-
// "development". Only Conductor team members can use the mock API server.
|
|
34
|
-
const apiServerUrl = process.env["CONDUCTOR_MOCK_API_SERVER_URL"] ??
|
|
35
|
-
"https://api.conductor.is";
|
|
36
|
-
const httpClient = axios_1.default.create({
|
|
37
|
-
baseURL: `${apiServerUrl}/v1`,
|
|
38
|
-
headers: this.createHeaders(apiKey),
|
|
39
|
-
timeout: 0, // No timeout (default).
|
|
40
|
-
});
|
|
41
|
-
// Wrap errors in `ConductorError`.
|
|
42
|
-
(0, errorHandling_1.addErrorHandlingInterceptors)(httpClient);
|
|
43
|
-
// Must be the last interceptor for error logging to use the wrapped error.
|
|
44
|
-
(0, logging_1.addLoggingInterceptors)(httpClient, verbose);
|
|
45
|
-
return httpClient;
|
|
46
|
-
}
|
|
47
|
-
createHeaders(apiKey) {
|
|
48
|
-
return {
|
|
49
|
-
Authorization: `Bearer ${apiKey}`,
|
|
50
|
-
"User-Agent": `${package_json_1.default.name}/${package_json_1.default.version} (Node.js ${process.version}; ${process.platform} ${process.arch})`,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.default = Client;
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Client from "./Client";
|
|
2
|
-
/**
|
|
3
|
-
* ESM support:
|
|
4
|
-
* import Conductor from "conductor-node";
|
|
5
|
-
* import { ConductorIntegrationError } from "conductor-node";
|
|
6
|
-
* import type { QbdTypes } from "conductor-node";
|
|
7
|
-
*/
|
|
8
|
-
export default Client;
|
|
9
|
-
export type { ClientOptions } from "./Client";
|
|
10
|
-
export type * as QbdTypes from "./integrations/qbd/qbdTypes";
|
|
11
|
-
export * from "./utils/error";
|
package/dist/src/index.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable import/no-import-module-exports -- We must use both `import` declarations and CommonJS exports to support both TypeScript/ESM and CommonJS. */
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
-
};
|
|
29
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
// eslint-disable-next-line consistent-default-export-name/default-export-match-filename -- This error complains, "The directory 'src' must be named 'Client', after the exported value of its index file". However, `src/` is the package root, not a typical module. The exported name is set via `main` in `package.json`, not by the directory name. Thus, we can ignore this error.
|
|
34
|
-
const Client_1 = __importDefault(require("./Client"));
|
|
35
|
-
const ErrorModule = __importStar(require("./utils/error"));
|
|
36
|
-
/**
|
|
37
|
-
* CommonJS support:
|
|
38
|
-
* const Conductor = require("conductor-node");
|
|
39
|
-
* const { ConductorIntegrationError } = require("conductor-node");
|
|
40
|
-
*/
|
|
41
|
-
if (module.exports !== undefined) {
|
|
42
|
-
module.exports = Client_1.default;
|
|
43
|
-
// Required for when `esModuleInterop` is `false`.
|
|
44
|
-
module.exports["default"] = Client_1.default;
|
|
45
|
-
// Extend `module.exports` with the exports from `ErrorModule`.
|
|
46
|
-
Object.assign(module.exports, ErrorModule);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* ESM support:
|
|
50
|
-
* import Conductor from "conductor-node";
|
|
51
|
-
* import { ConductorIntegrationError } from "conductor-node";
|
|
52
|
-
* import type { QbdTypes } from "conductor-node";
|
|
53
|
-
*/
|
|
54
|
-
// eslint-disable-next-line unicorn/prefer-export-from -- `Client` must be the default export, which is impossible to define with `export from`.
|
|
55
|
-
exports.default = Client_1.default;
|
|
56
|
-
// Must come after `module.exports` above. Otherwise, it breaks the following in
|
|
57
|
-
// JavaScript ESM:
|
|
58
|
-
// const { ConductorIntegrationError } = require("conductor-node");
|
|
59
|
-
__exportStar(require("./utils/error"), exports);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EndUser } from "../resources/EndUsersResource";
|
|
2
|
-
import type { IntegrationSlug } from "../resources/types";
|
|
3
|
-
import type { AxiosInstance } from "axios";
|
|
4
|
-
export default abstract class BaseIntegration {
|
|
5
|
-
protected readonly httpClient: AxiosInstance;
|
|
6
|
-
constructor(httpClient: AxiosInstance);
|
|
7
|
-
/** Not intended for public use. */
|
|
8
|
-
protected sendRequest(endUserId: EndUser["id"], integrationSlug: IntegrationSlug, payload: Record<string, unknown>): Promise<object>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class BaseIntegration {
|
|
4
|
-
httpClient;
|
|
5
|
-
constructor(httpClient) {
|
|
6
|
-
this.httpClient = httpClient;
|
|
7
|
-
}
|
|
8
|
-
/** Not intended for public use. */
|
|
9
|
-
async sendRequest(endUserId, integrationSlug, payload) {
|
|
10
|
-
const { data } = await this.httpClient.post(`/end-users/${endUserId}/passthrough/${integrationSlug}`, payload);
|
|
11
|
-
return data;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.default = BaseIntegration;
|