@edgebound/bigcommerce 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +473 -0
  2. package/dist/bigcommerce-entities/addresses/index.d.ts +2 -0
  3. package/dist/bigcommerce-entities/addresses/index.d.ts.map +1 -0
  4. package/dist/bigcommerce-entities/addresses/index.js +18 -0
  5. package/dist/bigcommerce-entities/addresses/index.js.map +1 -0
  6. package/dist/{addresses.d.mts → bigcommerce-entities/addresses/schemas/address.schema.d.ts} +2 -9
  7. package/dist/bigcommerce-entities/addresses/schemas/address.schema.d.ts.map +1 -0
  8. package/dist/bigcommerce-entities/addresses/schemas/address.schema.js +54 -0
  9. package/dist/bigcommerce-entities/addresses/schemas/address.schema.js.map +1 -0
  10. package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.d.ts +6 -0
  11. package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.d.ts.map +1 -0
  12. package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.js +42 -0
  13. package/dist/bigcommerce-entities/addresses/schemas/form-field.schema.js.map +1 -0
  14. package/dist/bigcommerce-entities/addresses/schemas/index.d.ts +3 -0
  15. package/dist/bigcommerce-entities/addresses/schemas/index.d.ts.map +1 -0
  16. package/dist/bigcommerce-entities/addresses/schemas/index.js +19 -0
  17. package/dist/bigcommerce-entities/addresses/schemas/index.js.map +1 -0
  18. package/dist/bigcommerce-entities/companies/companies.service.d.ts +309 -0
  19. package/dist/bigcommerce-entities/companies/companies.service.d.ts.map +1 -0
  20. package/dist/bigcommerce-entities/companies/companies.service.js +331 -0
  21. package/dist/bigcommerce-entities/companies/companies.service.js.map +1 -0
  22. package/dist/bigcommerce-entities/companies/index.d.ts +3 -0
  23. package/dist/bigcommerce-entities/companies/index.d.ts.map +1 -0
  24. package/dist/bigcommerce-entities/companies/index.js +19 -0
  25. package/dist/bigcommerce-entities/companies/index.js.map +1 -0
  26. package/dist/bigcommerce-entities/companies/schemas/company.schema.d.ts +63 -0
  27. package/dist/bigcommerce-entities/companies/schemas/company.schema.d.ts.map +1 -0
  28. package/dist/bigcommerce-entities/companies/schemas/company.schema.js +101 -0
  29. package/dist/bigcommerce-entities/companies/schemas/company.schema.js.map +1 -0
  30. package/dist/bigcommerce-entities/companies/schemas/credit.schemas.d.ts +15 -0
  31. package/dist/bigcommerce-entities/companies/schemas/credit.schemas.d.ts.map +1 -0
  32. package/dist/bigcommerce-entities/companies/schemas/credit.schemas.js +49 -0
  33. package/dist/bigcommerce-entities/companies/schemas/credit.schemas.js.map +1 -0
  34. package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.d.ts +28 -0
  35. package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.d.ts.map +1 -0
  36. package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.js +60 -0
  37. package/dist/bigcommerce-entities/companies/schemas/extra-fields.schema.js.map +1 -0
  38. package/dist/bigcommerce-entities/companies/schemas/index.d.ts +8 -0
  39. package/dist/bigcommerce-entities/companies/schemas/index.d.ts.map +1 -0
  40. package/dist/bigcommerce-entities/companies/schemas/index.js +24 -0
  41. package/dist/bigcommerce-entities/companies/schemas/index.js.map +1 -0
  42. package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.d.ts +12 -0
  43. package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.d.ts.map +1 -0
  44. package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.js +50 -0
  45. package/dist/bigcommerce-entities/companies/schemas/payment-methods.schema.js.map +1 -0
  46. package/dist/bigcommerce-entities/companies/schemas/roles.d.ts +28 -0
  47. package/dist/bigcommerce-entities/companies/schemas/roles.d.ts.map +1 -0
  48. package/dist/bigcommerce-entities/companies/schemas/roles.js +59 -0
  49. package/dist/bigcommerce-entities/companies/schemas/roles.js.map +1 -0
  50. package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.d.ts +15 -0
  51. package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.d.ts.map +1 -0
  52. package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.js +51 -0
  53. package/dist/bigcommerce-entities/companies/schemas/sales-staff.schema.js.map +1 -0
  54. package/dist/bigcommerce-entities/companies/schemas/user.schema.d.ts +51 -0
  55. package/dist/bigcommerce-entities/companies/schemas/user.schema.d.ts.map +1 -0
  56. package/dist/bigcommerce-entities/companies/schemas/user.schema.js +91 -0
  57. package/dist/bigcommerce-entities/companies/schemas/user.schema.js.map +1 -0
  58. package/dist/bigcommerce-entities/currencies/index.d.ts +2 -0
  59. package/dist/bigcommerce-entities/currencies/index.d.ts.map +1 -0
  60. package/dist/bigcommerce-entities/currencies/index.js +3 -0
  61. package/dist/bigcommerce-entities/currencies/index.js.map +1 -0
  62. package/dist/bigcommerce-entities/customers/customers.service.d.ts +270 -0
  63. package/dist/bigcommerce-entities/customers/customers.service.d.ts.map +1 -0
  64. package/dist/bigcommerce-entities/customers/customers.service.js +254 -0
  65. package/dist/bigcommerce-entities/customers/customers.service.js.map +1 -0
  66. package/dist/bigcommerce-entities/customers/index.d.ts +3 -0
  67. package/dist/bigcommerce-entities/customers/index.d.ts.map +1 -0
  68. package/dist/bigcommerce-entities/customers/index.js +19 -0
  69. package/dist/bigcommerce-entities/customers/index.js.map +1 -0
  70. package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.d.ts +35 -0
  71. package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.d.ts.map +1 -0
  72. package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.js +74 -0
  73. package/dist/bigcommerce-entities/customers/schemas/customer-group.schema.js.map +1 -0
  74. package/dist/bigcommerce-entities/customers/schemas/customer.schema.d.ts +38 -0
  75. package/dist/bigcommerce-entities/customers/schemas/customer.schema.d.ts.map +1 -0
  76. package/dist/bigcommerce-entities/customers/schemas/customer.schema.js +65 -0
  77. package/dist/bigcommerce-entities/customers/schemas/customer.schema.js.map +1 -0
  78. package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.d.ts +35 -0
  79. package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.d.ts.map +1 -0
  80. package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.js +81 -0
  81. package/dist/bigcommerce-entities/customers/schemas/find-addresses.schema.js.map +1 -0
  82. package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.d.ts +9 -0
  83. package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.d.ts.map +1 -0
  84. package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.js +54 -0
  85. package/dist/bigcommerce-entities/customers/schemas/find-customer.criteria.js.map +1 -0
  86. package/dist/bigcommerce-entities/customers/schemas/index.d.ts +5 -0
  87. package/dist/bigcommerce-entities/customers/schemas/index.d.ts.map +1 -0
  88. package/dist/bigcommerce-entities/customers/schemas/index.js +21 -0
  89. package/dist/bigcommerce-entities/customers/schemas/index.js.map +1 -0
  90. package/dist/bigcommerce-entities/index.d.ts +11 -0
  91. package/dist/bigcommerce-entities/index.d.ts.map +1 -0
  92. package/dist/bigcommerce-entities/index.js +27 -0
  93. package/dist/bigcommerce-entities/index.js.map +1 -0
  94. package/dist/bigcommerce-entities/orders/index.d.ts +3 -0
  95. package/dist/bigcommerce-entities/orders/index.d.ts.map +1 -0
  96. package/dist/bigcommerce-entities/orders/index.js +19 -0
  97. package/dist/bigcommerce-entities/orders/index.js.map +1 -0
  98. package/dist/bigcommerce-entities/orders/orders.service.d.ts +470 -0
  99. package/dist/bigcommerce-entities/orders/orders.service.d.ts.map +1 -0
  100. package/dist/bigcommerce-entities/orders/orders.service.js +274 -0
  101. package/dist/bigcommerce-entities/orders/orders.service.js.map +1 -0
  102. package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.d.ts +17 -0
  103. package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.d.ts.map +1 -0
  104. package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.js +55 -0
  105. package/dist/bigcommerce-entities/orders/schemas/find-orders.criteria.js.map +1 -0
  106. package/dist/bigcommerce-entities/orders/schemas/index.d.ts +6 -0
  107. package/dist/bigcommerce-entities/orders/schemas/index.d.ts.map +1 -0
  108. package/dist/bigcommerce-entities/orders/schemas/index.js +22 -0
  109. package/dist/bigcommerce-entities/orders/schemas/index.js.map +1 -0
  110. package/dist/bigcommerce-entities/orders/schemas/order-product.schema.d.ts +31 -0
  111. package/dist/bigcommerce-entities/orders/schemas/order-product.schema.d.ts.map +1 -0
  112. package/dist/bigcommerce-entities/orders/schemas/order-product.schema.js +64 -0
  113. package/dist/bigcommerce-entities/orders/schemas/order-product.schema.js.map +1 -0
  114. package/dist/{addresses.d.ts → bigcommerce-entities/orders/schemas/order-shipping-address.schema.d.ts} +5 -9
  115. package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.d.ts.map +1 -0
  116. package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.js +44 -0
  117. package/dist/bigcommerce-entities/orders/schemas/order-shipping-address.schema.js.map +1 -0
  118. package/dist/bigcommerce-entities/orders/schemas/order.schema.d.ts +104 -0
  119. package/dist/bigcommerce-entities/orders/schemas/order.schema.d.ts.map +1 -0
  120. package/dist/bigcommerce-entities/orders/schemas/order.schema.js +109 -0
  121. package/dist/bigcommerce-entities/orders/schemas/order.schema.js.map +1 -0
  122. package/dist/{status.schema-BgztUtGy.d.mts → bigcommerce-entities/orders/schemas/status.schema.d.ts} +4 -6
  123. package/dist/bigcommerce-entities/orders/schemas/status.schema.d.ts.map +1 -0
  124. package/dist/bigcommerce-entities/orders/schemas/status.schema.js +74 -0
  125. package/dist/bigcommerce-entities/orders/schemas/status.schema.js.map +1 -0
  126. package/dist/bigcommerce-entities/payments/index.d.ts +3 -0
  127. package/dist/bigcommerce-entities/payments/index.d.ts.map +1 -0
  128. package/dist/bigcommerce-entities/payments/index.js +19 -0
  129. package/dist/bigcommerce-entities/payments/index.js.map +1 -0
  130. package/dist/bigcommerce-entities/payments/payments.service.d.ts +40 -0
  131. package/dist/bigcommerce-entities/payments/payments.service.d.ts.map +1 -0
  132. package/dist/bigcommerce-entities/payments/payments.service.js +66 -0
  133. package/dist/bigcommerce-entities/payments/payments.service.js.map +1 -0
  134. package/dist/bigcommerce-entities/payments/schemas/index.d.ts +2 -0
  135. package/dist/bigcommerce-entities/payments/schemas/index.d.ts.map +1 -0
  136. package/dist/bigcommerce-entities/payments/schemas/index.js +18 -0
  137. package/dist/bigcommerce-entities/payments/schemas/index.js.map +1 -0
  138. package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.d.ts +14 -0
  139. package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.d.ts.map +1 -0
  140. package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.js +46 -0
  141. package/dist/bigcommerce-entities/payments/schemas/payment-methods.schema.js.map +1 -0
  142. package/dist/bigcommerce-entities/price-lists/index.d.ts +3 -0
  143. package/dist/bigcommerce-entities/price-lists/index.d.ts.map +1 -0
  144. package/dist/bigcommerce-entities/price-lists/index.js +19 -0
  145. package/dist/bigcommerce-entities/price-lists/index.js.map +1 -0
  146. package/dist/bigcommerce-entities/price-lists/price-lists.service.d.ts +97 -0
  147. package/dist/bigcommerce-entities/price-lists/price-lists.service.d.ts.map +1 -0
  148. package/dist/bigcommerce-entities/price-lists/price-lists.service.js +126 -0
  149. package/dist/bigcommerce-entities/price-lists/price-lists.service.js.map +1 -0
  150. package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.d.ts +11 -0
  151. package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.d.ts.map +1 -0
  152. package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.js +47 -0
  153. package/dist/bigcommerce-entities/price-lists/schemas/create-price-lists.schema.js.map +1 -0
  154. package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.d.ts +32 -0
  155. package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.d.ts.map +1 -0
  156. package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.js +66 -0
  157. package/dist/bigcommerce-entities/price-lists/schemas/get-prices-lists.schema.js.map +1 -0
  158. package/dist/bigcommerce-entities/price-lists/schemas/index.d.ts +3 -0
  159. package/dist/bigcommerce-entities/price-lists/schemas/index.d.ts.map +1 -0
  160. package/dist/bigcommerce-entities/price-lists/schemas/index.js +19 -0
  161. package/dist/bigcommerce-entities/price-lists/schemas/index.js.map +1 -0
  162. package/dist/bigcommerce-entities/products/index.d.ts +3 -0
  163. package/dist/bigcommerce-entities/products/index.d.ts.map +1 -0
  164. package/dist/bigcommerce-entities/products/index.js +19 -0
  165. package/dist/bigcommerce-entities/products/index.js.map +1 -0
  166. package/dist/bigcommerce-entities/products/products.service.d.ts +88 -0
  167. package/dist/bigcommerce-entities/products/products.service.d.ts.map +1 -0
  168. package/dist/bigcommerce-entities/products/products.service.js +165 -0
  169. package/dist/bigcommerce-entities/products/products.service.js.map +1 -0
  170. package/dist/bigcommerce-entities/products/schemas/index.d.ts +3 -0
  171. package/dist/bigcommerce-entities/products/schemas/index.d.ts.map +1 -0
  172. package/dist/bigcommerce-entities/products/schemas/index.js +19 -0
  173. package/dist/bigcommerce-entities/products/schemas/index.js.map +1 -0
  174. package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.d.ts +26 -0
  175. package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.d.ts.map +1 -0
  176. package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.js +57 -0
  177. package/dist/bigcommerce-entities/products/schemas/set-inventory.schema.js.map +1 -0
  178. package/dist/bigcommerce-entities/products/schemas/update-products.schema.d.ts +11 -0
  179. package/dist/bigcommerce-entities/products/schemas/update-products.schema.d.ts.map +1 -0
  180. package/dist/bigcommerce-entities/products/schemas/update-products.schema.js +44 -0
  181. package/dist/bigcommerce-entities/products/schemas/update-products.schema.js.map +1 -0
  182. package/dist/bigcommerce-entities/sales-staff/index.d.ts +3 -0
  183. package/dist/bigcommerce-entities/sales-staff/index.d.ts.map +1 -0
  184. package/dist/bigcommerce-entities/sales-staff/index.js +19 -0
  185. package/dist/bigcommerce-entities/sales-staff/index.js.map +1 -0
  186. package/dist/bigcommerce-entities/sales-staff/sales-staff.service.d.ts +78 -0
  187. package/dist/bigcommerce-entities/sales-staff/sales-staff.service.d.ts.map +1 -0
  188. package/dist/bigcommerce-entities/sales-staff/sales-staff.service.js +102 -0
  189. package/dist/bigcommerce-entities/sales-staff/sales-staff.service.js.map +1 -0
  190. package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.d.ts +31 -0
  191. package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.d.ts.map +1 -0
  192. package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.js +62 -0
  193. package/dist/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.js.map +1 -0
  194. package/dist/bigcommerce-entities/sales-staff/schemas/index.d.ts +2 -0
  195. package/dist/bigcommerce-entities/sales-staff/schemas/index.d.ts.map +1 -0
  196. package/dist/bigcommerce-entities/sales-staff/schemas/index.js +18 -0
  197. package/dist/bigcommerce-entities/sales-staff/schemas/index.js.map +1 -0
  198. package/dist/bigcommerce-entities/webhooks/index.d.ts +2 -0
  199. package/dist/bigcommerce-entities/webhooks/index.d.ts.map +1 -0
  200. package/dist/bigcommerce-entities/webhooks/index.js +18 -0
  201. package/dist/bigcommerce-entities/webhooks/index.js.map +1 -0
  202. package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.d.ts +28 -0
  203. package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.d.ts.map +1 -0
  204. package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.js +64 -0
  205. package/dist/bigcommerce-entities/webhooks/schemas/customer.scope.schema.js.map +1 -0
  206. package/dist/bigcommerce-entities/webhooks/schemas/index.d.ts +4 -0
  207. package/dist/bigcommerce-entities/webhooks/schemas/index.d.ts.map +1 -0
  208. package/dist/bigcommerce-entities/webhooks/schemas/index.js +20 -0
  209. package/dist/bigcommerce-entities/webhooks/schemas/index.js.map +1 -0
  210. package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.d.ts +26 -0
  211. package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.d.ts.map +1 -0
  212. package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.js +57 -0
  213. package/dist/bigcommerce-entities/webhooks/schemas/order.scope.schema.js.map +1 -0
  214. package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.d.ts +54 -0
  215. package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.d.ts.map +1 -0
  216. package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.js +52 -0
  217. package/dist/bigcommerce-entities/webhooks/schemas/webhooks.schema.js.map +1 -0
  218. package/dist/bigcommerce.module.d.ts +16 -0
  219. package/dist/bigcommerce.module.d.ts.map +1 -0
  220. package/dist/bigcommerce.module.js +83 -0
  221. package/dist/bigcommerce.module.js.map +1 -0
  222. package/dist/constants.d.ts +52 -0
  223. package/dist/constants.d.ts.map +1 -0
  224. package/dist/constants.js +55 -0
  225. package/dist/constants.js.map +1 -0
  226. package/dist/core/bigcommerce-fetcher.service.d.ts +40 -0
  227. package/dist/core/bigcommerce-fetcher.service.d.ts.map +1 -0
  228. package/dist/core/bigcommerce-fetcher.service.js +133 -0
  229. package/dist/core/bigcommerce-fetcher.service.js.map +1 -0
  230. package/dist/core/bigcommerce.error.d.ts +51 -0
  231. package/dist/core/bigcommerce.error.d.ts.map +1 -0
  232. package/dist/core/bigcommerce.error.js +160 -0
  233. package/dist/core/bigcommerce.error.js.map +1 -0
  234. package/dist/core/config.module.d.ts +12 -0
  235. package/dist/core/config.module.d.ts.map +1 -0
  236. package/dist/core/config.module.js +75 -0
  237. package/dist/core/config.module.js.map +1 -0
  238. package/dist/core/config.schema.d.ts +20 -0
  239. package/dist/core/config.schema.d.ts.map +1 -0
  240. package/dist/core/config.schema.js +74 -0
  241. package/dist/core/config.schema.js.map +1 -0
  242. package/dist/core/config.service.d.ts +13 -0
  243. package/dist/core/config.service.d.ts.map +1 -0
  244. package/dist/core/config.service.js +30 -0
  245. package/dist/core/config.service.js.map +1 -0
  246. package/dist/core/index.d.ts +6 -0
  247. package/dist/core/index.d.ts.map +1 -0
  248. package/dist/core/index.js +22 -0
  249. package/dist/core/index.js.map +1 -0
  250. package/dist/index.d.ts +5 -36
  251. package/dist/index.d.ts.map +1 -0
  252. package/dist/index.js +18 -371
  253. package/dist/index.js.map +1 -1
  254. package/dist/utils/chunk.d.ts +2 -0
  255. package/dist/utils/chunk.d.ts.map +1 -0
  256. package/dist/utils/chunk.js +12 -0
  257. package/dist/utils/chunk.js.map +1 -0
  258. package/dist/utils/concurrency.d.ts +11 -0
  259. package/dist/utils/concurrency.d.ts.map +1 -0
  260. package/dist/utils/concurrency.js +20 -0
  261. package/dist/utils/concurrency.js.map +1 -0
  262. package/dist/utils/index.d.ts +5 -0
  263. package/dist/utils/index.d.ts.map +1 -0
  264. package/dist/utils/index.js +10 -0
  265. package/dist/utils/index.js.map +1 -0
  266. package/dist/utils/validation.error.d.ts +6 -0
  267. package/dist/utils/validation.error.d.ts.map +1 -0
  268. package/dist/utils/validation.error.js +50 -0
  269. package/dist/utils/validation.error.js.map +1 -0
  270. package/dist/utils/while.d.ts +8 -0
  271. package/dist/utils/while.d.ts.map +1 -0
  272. package/dist/utils/while.js +23 -0
  273. package/dist/utils/while.js.map +1 -0
  274. package/package.json +23 -67
  275. package/dist/addresses.js +0 -69
  276. package/dist/addresses.js.map +0 -1
  277. package/dist/addresses.mjs +0 -9
  278. package/dist/addresses.mjs.map +0 -1
  279. package/dist/bigcommerce.fetcher-Ujztbs8P.d.mts +0 -90
  280. package/dist/bigcommerce.fetcher-Ujztbs8P.d.ts +0 -90
  281. package/dist/chunk-BWLQCNNX.mjs +0 -30
  282. package/dist/chunk-BWLQCNNX.mjs.map +0 -1
  283. package/dist/chunk-CERZFSUE.mjs +0 -20
  284. package/dist/chunk-CERZFSUE.mjs.map +0 -1
  285. package/dist/chunk-V2WZ3SDN.mjs +0 -333
  286. package/dist/chunk-V2WZ3SDN.mjs.map +0 -1
  287. package/dist/chunk-XONZC4AG.mjs +0 -45
  288. package/dist/chunk-XONZC4AG.mjs.map +0 -1
  289. package/dist/companies.d.mts +0 -346
  290. package/dist/companies.d.ts +0 -346
  291. package/dist/companies.js +0 -837
  292. package/dist/companies.js.map +0 -1
  293. package/dist/companies.mjs +0 -467
  294. package/dist/companies.mjs.map +0 -1
  295. package/dist/currencies.d.mts +0 -2
  296. package/dist/currencies.d.ts +0 -2
  297. package/dist/currencies.js +0 -2
  298. package/dist/currencies.js.map +0 -1
  299. package/dist/currencies.mjs +0 -1
  300. package/dist/currencies.mjs.map +0 -1
  301. package/dist/customers.d.mts +0 -235
  302. package/dist/customers.d.ts +0 -235
  303. package/dist/customers.js +0 -679
  304. package/dist/customers.js.map +0 -1
  305. package/dist/customers.mjs +0 -320
  306. package/dist/customers.mjs.map +0 -1
  307. package/dist/index.d.mts +0 -36
  308. package/dist/index.mjs +0 -39
  309. package/dist/index.mjs.map +0 -1
  310. package/dist/orders.d.mts +0 -492
  311. package/dist/orders.d.ts +0 -492
  312. package/dist/orders.js +0 -723
  313. package/dist/orders.js.map +0 -1
  314. package/dist/orders.mjs +0 -312
  315. package/dist/orders.mjs.map +0 -1
  316. package/dist/payments.d.mts +0 -28
  317. package/dist/payments.d.ts +0 -28
  318. package/dist/payments.js +0 -372
  319. package/dist/payments.js.map +0 -1
  320. package/dist/payments.mjs +0 -43
  321. package/dist/payments.mjs.map +0 -1
  322. package/dist/priceLists.d.mts +0 -81
  323. package/dist/priceLists.d.ts +0 -81
  324. package/dist/priceLists.js +0 -465
  325. package/dist/priceLists.js.map +0 -1
  326. package/dist/priceLists.mjs +0 -118
  327. package/dist/priceLists.mjs.map +0 -1
  328. package/dist/products.d.mts +0 -52
  329. package/dist/products.d.ts +0 -52
  330. package/dist/products.js +0 -470
  331. package/dist/products.js.map +0 -1
  332. package/dist/products.mjs +0 -120
  333. package/dist/products.mjs.map +0 -1
  334. package/dist/salesStaff.d.mts +0 -64
  335. package/dist/salesStaff.d.ts +0 -64
  336. package/dist/salesStaff.js +0 -426
  337. package/dist/salesStaff.js.map +0 -1
  338. package/dist/salesStaff.mjs +0 -82
  339. package/dist/salesStaff.mjs.map +0 -1
  340. package/dist/status.schema-BgztUtGy.d.ts +0 -39
  341. package/dist/validation.error-CHLpPYC_.d.mts +0 -14
  342. package/dist/validation.error-CHLpPYC_.d.ts +0 -14
  343. package/dist/webhooks.d.mts +0 -109
  344. package/dist/webhooks.d.ts +0 -109
  345. package/dist/webhooks.js +0 -157
  346. package/dist/webhooks.js.map +0 -1
  347. package/dist/webhooks.mjs +0 -79
  348. package/dist/webhooks.mjs.map +0 -1
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.BigCommerceProductsService = void 0;
46
+ const common_1 = require("@nestjs/common");
47
+ const z = __importStar(require("zod"));
48
+ const constants_1 = require("../../constants");
49
+ const utils_1 = require("../../utils");
50
+ const concurrency_1 = require("../../utils/concurrency");
51
+ const schemas_1 = require("./schemas");
52
+ /**
53
+ * Service for managing BigCommerce products.
54
+ *
55
+ * Provides methods for updating product inventory and visibility in batch operations.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * @Injectable()
60
+ * export class MyService {
61
+ * constructor(private readonly productsService: BigCommerceProductsService) {}
62
+ *
63
+ * async updateStock() {
64
+ * const result = await this.productsService.setProductsInventory('Stock adjustment', [
65
+ * { product_id: 1, variant_id: 10, location_id: 1, quantity: 100 }
66
+ * ]);
67
+ * }
68
+ * }
69
+ * ```
70
+ */
71
+ let BigCommerceProductsService = class BigCommerceProductsService {
72
+ fetcher;
73
+ constructor(fetcher) {
74
+ this.fetcher = fetcher;
75
+ }
76
+ /**
77
+ * Sets product inventory levels in batch with automatic concurrency control.
78
+ *
79
+ * Processes inventory updates in batches with controlled concurrency for optimal performance.
80
+ *
81
+ * @param reason - Reason for the inventory adjustment
82
+ * @param items - Array of inventory items to update
83
+ * @returns ResultAsync with success/error results for each batch
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * const result = await productsService.setProductsInventory('Stock adjustment', [
88
+ * { product_id: 1, variant_id: 10, location_id: 1, quantity: 100 },
89
+ * { product_id: 2, variant_id: 20, location_id: 1, quantity: 50 }
90
+ * ]);
91
+ * ```
92
+ */
93
+ setProductsInventory(reason, items) {
94
+ return (0, concurrency_1.concurrency)({
95
+ items,
96
+ batchSize: constants_1.DEFAULTS.products.inventory.updateBatchSize,
97
+ limit: constants_1.DEFAULTS.products.inventory.updateConcurrency,
98
+ fn: (batch) => (0, utils_1.validateInputData)(schemas_1.SetProductInventorySchema, {
99
+ reason,
100
+ items: batch,
101
+ }).asyncAndThen((validatedBody) => this.fetcher.fetch({
102
+ isB2B: false,
103
+ method: 'PUT',
104
+ path: 'inventory/adjustments/absolute',
105
+ version: 'v3',
106
+ body: validatedBody,
107
+ resultSchema: schemas_1.SetInventoryResponseSchema,
108
+ }, { shouldRetry: true })),
109
+ });
110
+ }
111
+ /**
112
+ * Updates multiple products in batch with automatic concurrency control.
113
+ *
114
+ * Processes product updates in batches with controlled concurrency for optimal performance.
115
+ *
116
+ * @param dtos - Array of product update objects
117
+ * @returns ResultAsync with success/error results for each batch
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * const result = await productsService.updateProducts([
122
+ * { id: 1, name: 'Updated Product Name', price: 29.99 },
123
+ * { id: 2, is_visible: true }
124
+ * ]);
125
+ * ```
126
+ */
127
+ updateProducts(dtos) {
128
+ return (0, concurrency_1.concurrency)({
129
+ items: dtos,
130
+ batchSize: constants_1.DEFAULTS.products.updateBatchSize,
131
+ limit: constants_1.DEFAULTS.products.updateConcurrency,
132
+ fn: (batch) => (0, utils_1.validateInputData)(z.array(schemas_1.UpdateProductSchema), batch).asyncAndThen((validatedBody) => this.fetcher.fetch({
133
+ isB2B: false,
134
+ method: 'PUT',
135
+ path: 'catalog/products',
136
+ version: 'v3',
137
+ body: validatedBody,
138
+ resultSchema: schemas_1.UpdateProductResponseSchema,
139
+ }, { shouldRetry: true })),
140
+ });
141
+ }
142
+ /**
143
+ * Sets product visibility for multiple products in batch.
144
+ *
145
+ * @param dtos - Array of product visibility updates
146
+ * @returns ResultAsync with success/error results for each batch
147
+ *
148
+ * @example
149
+ * ```typescript
150
+ * const result = await productsService.setProductVisibility([
151
+ * { id: 1, is_visible: true },
152
+ * { id: 2, is_visible: false }
153
+ * ]);
154
+ * ```
155
+ */
156
+ setProductVisibility(dtos) {
157
+ return this.updateProducts(dtos);
158
+ }
159
+ };
160
+ exports.BigCommerceProductsService = BigCommerceProductsService;
161
+ exports.BigCommerceProductsService = BigCommerceProductsService = __decorate([
162
+ (0, common_1.Injectable)(),
163
+ __metadata("design:paramtypes", [Function])
164
+ ], BigCommerceProductsService);
165
+ //# sourceMappingURL=products.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products.service.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/products/products.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uCAAyB;AACzB,+CAA2C;AAE3C,uCAAgD;AAChD,yDAAsD;AACtD,uCAOmB;AAEnB;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACR;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE;;;;;;;;;;;;;;;;OAgBG;IACH,oBAAoB,CAAC,MAAc,EAAE,KAAsD;QACzF,OAAO,IAAA,yBAAW,EAAC;YACjB,KAAK;YACL,SAAS,EAAE,oBAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe;YACtD,KAAK,EAAE,oBAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,iBAAiB;YACpD,EAAE,EAAE,CAAC,KAAsD,EAAE,EAAE,CAC7D,IAAA,yBAAiB,EAAC,mCAAyB,EAAE;gBAC3C,MAAM;gBACN,KAAK,EAAE,KAAK;aACb,CAAC,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,EAAE,CAChC,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;gBACE,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,gCAAgC;gBACtC,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,aAAa;gBACnB,YAAY,EAAE,oCAA0B;aACzC,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACF;SACJ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,IAA2C;QACxD,OAAO,IAAA,yBAAW,EAAC;YACjB,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,oBAAQ,CAAC,QAAQ,CAAC,eAAe;YAC5C,KAAK,EAAE,oBAAQ,CAAC,QAAQ,CAAC,iBAAiB;YAC1C,EAAE,EAAE,CAAC,KAA4C,EAAE,EAAE,CACnD,IAAA,yBAAiB,EAAC,CAAC,CAAC,KAAK,CAAC,6BAAmB,CAAC,EAAE,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,EAAE,CACpF,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;gBACE,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,aAAa;gBACnB,YAAY,EAAE,qCAA2B;aAC1C,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACF;SACJ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,IAAqD;QACxE,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AApGY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;;GACA,0BAA0B,CAoGtC"}
@@ -0,0 +1,3 @@
1
+ export * from './set-inventory.schema';
2
+ export * from './update-products.schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./set-inventory.schema"), exports);
18
+ __exportStar(require("./update-products.schema"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC"}
@@ -0,0 +1,26 @@
1
+ import * as z from 'zod';
2
+ export declare const SetProductInventoryItemSchema: z.ZodUnion<readonly [z.ZodObject<{
3
+ location_id: z.ZodInt;
4
+ product_id: z.ZodInt;
5
+ quantity: z.ZodInt;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ location_id: z.ZodInt;
8
+ sku: z.ZodString;
9
+ quantity: z.ZodInt;
10
+ }, z.core.$strip>]>;
11
+ export declare const SetProductInventorySchema: z.ZodObject<{
12
+ reason: z.ZodString;
13
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14
+ location_id: z.ZodInt;
15
+ product_id: z.ZodInt;
16
+ quantity: z.ZodInt;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ location_id: z.ZodInt;
19
+ sku: z.ZodString;
20
+ quantity: z.ZodInt;
21
+ }, z.core.$strip>]>>;
22
+ }, z.core.$strip>;
23
+ export declare const SetInventoryResponseSchema: z.ZodObject<{
24
+ transaction_id: z.ZodString;
25
+ }, z.core.$strip>;
26
+ //# sourceMappingURL=set-inventory.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-inventory.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/set-inventory.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,6BAA6B;;;;;;;;mBAWxC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAGpC,CAAC;AACH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SetInventoryResponseSchema = exports.SetProductInventorySchema = exports.SetProductInventoryItemSchema = void 0;
37
+ const z = __importStar(require("zod"));
38
+ exports.SetProductInventoryItemSchema = z.union([
39
+ z.object({
40
+ location_id: z.int(),
41
+ product_id: z.int(),
42
+ quantity: z.int().min(0),
43
+ }),
44
+ z.object({
45
+ location_id: z.int(),
46
+ sku: z.string(),
47
+ quantity: z.int().min(0),
48
+ }),
49
+ ]);
50
+ exports.SetProductInventorySchema = z.object({
51
+ reason: z.string(),
52
+ items: z.array(exports.SetProductInventoryItemSchema),
53
+ });
54
+ exports.SetInventoryResponseSchema = z.object({
55
+ transaction_id: z.string(),
56
+ });
57
+ //# sourceMappingURL=set-inventory.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-inventory.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/set-inventory.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC,CAAC,MAAM,CAAC;QACP,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE;QACpB,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE;QACnB,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACzB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE;QACpB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACzB,CAAC;CACH,CAAC,CAAC;AACU,QAAA,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qCAA6B,CAAC;CAC9C,CAAC,CAAC;AACU,QAAA,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as z from 'zod';
2
+ export declare const UpdateProductVisibilitySchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ is_visible: z.ZodBoolean;
5
+ }, z.core.$strip>;
6
+ export declare const UpdateProductSchema: z.ZodUnion<readonly [z.ZodObject<{
7
+ id: z.ZodNumber;
8
+ is_visible: z.ZodBoolean;
9
+ }, z.core.$strip>]>;
10
+ export declare const UpdateProductResponseSchema: z.ZodAny;
11
+ //# sourceMappingURL=update-products.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-products.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/update-products.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;mBAA2C,CAAC;AAE5E,eAAO,MAAM,2BAA2B,UAAU,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.UpdateProductResponseSchema = exports.UpdateProductSchema = exports.UpdateProductVisibilitySchema = void 0;
37
+ const z = __importStar(require("zod"));
38
+ exports.UpdateProductVisibilitySchema = z.object({
39
+ id: z.number(),
40
+ is_visible: z.boolean(),
41
+ });
42
+ exports.UpdateProductSchema = z.union([exports.UpdateProductVisibilitySchema]);
43
+ exports.UpdateProductResponseSchema = z.any();
44
+ //# sourceMappingURL=update-products.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-products.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/products/schemas/update-products.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,qCAA6B,CAAC,CAAC,CAAC;AAE/D,QAAA,2BAA2B,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './sales-staff.service';
2
+ export * from './schemas';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/sales-staff/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./sales-staff.service"), exports);
18
+ __exportStar(require("./schemas"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/sales-staff/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,4CAA0B"}
@@ -0,0 +1,78 @@
1
+ import * as z from 'zod';
2
+ import type { BigCommerceFetcherService } from '../../core';
3
+ import { GetSalesStaffCriteriaSchema } from './schemas';
4
+ /**
5
+ * Service for managing BigCommerce sales staff.
6
+ *
7
+ * Provides methods for finding and retrieving sales staff members.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * @Injectable()
12
+ * export class MyService {
13
+ * constructor(private readonly salesStaffService: BigCommerceSalesStaffService) {}
14
+ *
15
+ * async getStaff() {
16
+ * const result = await this.salesStaffService.findSalesStaff({
17
+ * limit: 50,
18
+ * offset: 0
19
+ * });
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ export declare class BigCommerceSalesStaffService {
25
+ private readonly fetcher;
26
+ constructor(fetcher: BigCommerceFetcherService);
27
+ /**
28
+ * Finds sales staff with pagination.
29
+ *
30
+ * @param criteria - Search criteria including limit and offset
31
+ * @returns ResultAsync with paginated sales staff
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * const result = await salesStaffService.findSalesStaff({
36
+ * limit: 50,
37
+ * offset: 0
38
+ * });
39
+ * ```
40
+ */
41
+ findSalesStaff(criteria?: z.input<typeof GetSalesStaffCriteriaSchema>): import("neverthrow").ResultAsync<{
42
+ code: number;
43
+ data: {
44
+ companyCount: number;
45
+ email: string;
46
+ id: number;
47
+ roleName: string;
48
+ salesRepName: string;
49
+ }[];
50
+ meta: {
51
+ message: string;
52
+ pagination: {
53
+ limit: number;
54
+ offset: number;
55
+ totalCount: number;
56
+ };
57
+ };
58
+ }, import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError>;
59
+ /**
60
+ * Retrieves all sales staff by automatically handling pagination.
61
+ *
62
+ * @param criteria - Optional search criteria (excluding pagination params)
63
+ * @returns ResultAsync with all sales staff
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const result = await salesStaffService.getAllSalesStaffBy();
68
+ * ```
69
+ */
70
+ getAllSalesStaffBy(criteria?: Omit<z.input<typeof GetSalesStaffCriteriaSchema>, 'limit' | 'offset'>): import("neverthrow").ResultAsync<{
71
+ companyCount: number;
72
+ email: string;
73
+ id: number;
74
+ roleName: string;
75
+ salesRepName: string;
76
+ }[], import("../../core").SomeBigCommerceError | import("../../utils/validation.error").InputDataValidationError>;
77
+ }
78
+ //# sourceMappingURL=sales-staff.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-staff.service.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/sales-staff/sales-staff.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAAE,2BAA2B,EAA+B,MAAM,WAAW,CAAC;AAErF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,yBAAyB;IAE/D;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC;;;;;;;;;;;;;;;;;;IAiBrE;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;;;;;;;CAmBnF"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BigCommerceSalesStaffService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const node_querystring_1 = require("node:querystring");
15
+ const constants_1 = require("../../constants");
16
+ const utils_1 = require("../../utils");
17
+ const while_1 = require("../../utils/while");
18
+ const schemas_1 = require("./schemas");
19
+ /**
20
+ * Service for managing BigCommerce sales staff.
21
+ *
22
+ * Provides methods for finding and retrieving sales staff members.
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * @Injectable()
27
+ * export class MyService {
28
+ * constructor(private readonly salesStaffService: BigCommerceSalesStaffService) {}
29
+ *
30
+ * async getStaff() {
31
+ * const result = await this.salesStaffService.findSalesStaff({
32
+ * limit: 50,
33
+ * offset: 0
34
+ * });
35
+ * }
36
+ * }
37
+ * ```
38
+ */
39
+ let BigCommerceSalesStaffService = class BigCommerceSalesStaffService {
40
+ fetcher;
41
+ constructor(fetcher) {
42
+ this.fetcher = fetcher;
43
+ }
44
+ /**
45
+ * Finds sales staff with pagination.
46
+ *
47
+ * @param criteria - Search criteria including limit and offset
48
+ * @returns ResultAsync with paginated sales staff
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const result = await salesStaffService.findSalesStaff({
53
+ * limit: 50,
54
+ * offset: 0
55
+ * });
56
+ * ```
57
+ */
58
+ findSalesStaff(criteria) {
59
+ return (0, utils_1.validateInputData)(schemas_1.GetSalesStaffCriteriaSchema, criteria ?? {}).asyncAndThen((validatedCriteria) => this.fetcher.fetch({
60
+ isB2B: true,
61
+ method: 'GET',
62
+ query: (0, node_querystring_1.stringify)(validatedCriteria),
63
+ path: 'sales-staffs',
64
+ resultSchema: schemas_1.GetSalesStaffResponseSchema,
65
+ version: 'v3',
66
+ }, { shouldRetry: true }));
67
+ }
68
+ /**
69
+ * Retrieves all sales staff by automatically handling pagination.
70
+ *
71
+ * @param criteria - Optional search criteria (excluding pagination params)
72
+ * @returns ResultAsync with all sales staff
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * const result = await salesStaffService.getAllSalesStaffBy();
77
+ * ```
78
+ */
79
+ getAllSalesStaffBy(criteria) {
80
+ return (0, while_1.whileLoop)({
81
+ initialParams: {
82
+ limit: constants_1.DEFAULTS.salesStaff.getBatchSize,
83
+ offset: 0,
84
+ },
85
+ step: (params) => this.findSalesStaff({
86
+ ...criteria,
87
+ ...params,
88
+ }),
89
+ condition: ({ data }) => data.length > 0,
90
+ onStep: (_, params) => ({
91
+ limit: params.limit,
92
+ offset: params.offset + params.limit,
93
+ }),
94
+ }).map((results) => results.flatMap((result) => result.data));
95
+ }
96
+ };
97
+ exports.BigCommerceSalesStaffService = BigCommerceSalesStaffService;
98
+ exports.BigCommerceSalesStaffService = BigCommerceSalesStaffService = __decorate([
99
+ (0, common_1.Injectable)(),
100
+ __metadata("design:paramtypes", [Function])
101
+ ], BigCommerceSalesStaffService);
102
+ //# sourceMappingURL=sales-staff.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-staff.service.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/sales-staff/sales-staff.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uDAA6C;AAE7C,+CAA2C;AAE3C,uCAAgD;AAChD,6CAA8C;AAC9C,uCAAqF;AAErF;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACV;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,QAAsD;QACnE,OAAO,IAAA,yBAAiB,EAAC,qCAA2B,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,YAAY,CAChF,CAAC,iBAAiB,EAAE,EAAE,CACpB,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;YACE,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,IAAA,4BAAS,EAAC,iBAAiB,CAAC;YACnC,IAAI,EAAE,cAAc;YACpB,YAAY,EAAE,qCAA2B;YACzC,OAAO,EAAE,IAAI;SACd,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACJ,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,QAAgF;QAEhF,OAAO,IAAA,iBAAS,EAAC;YACf,aAAa,EAAE;gBACb,KAAK,EAAE,oBAAQ,CAAC,UAAU,CAAC,YAAY;gBACvC,MAAM,EAAE,CAAC;aACV;YACD,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CACf,IAAI,CAAC,cAAc,CAAC;gBAClB,GAAG,QAAQ;gBACX,GAAG,MAAM;aACV,CAAC;YACJ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;YACxC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACtB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK;aACrC,CAAC;SACH,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAjEY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;;GACA,4BAA4B,CAiExC"}
@@ -0,0 +1,31 @@
1
+ import * as z from 'zod';
2
+ export declare const SalesStaffSchema: z.ZodObject<{
3
+ companyCount: z.ZodNumber;
4
+ email: z.ZodString;
5
+ id: z.ZodNumber;
6
+ roleName: z.ZodString;
7
+ salesRepName: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare const GetSalesStaffResponseSchema: z.ZodObject<{
10
+ code: z.ZodNumber;
11
+ data: z.ZodArray<z.ZodObject<{
12
+ companyCount: z.ZodNumber;
13
+ email: z.ZodString;
14
+ id: z.ZodNumber;
15
+ roleName: z.ZodString;
16
+ salesRepName: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ meta: z.ZodObject<{
19
+ message: z.ZodString;
20
+ pagination: z.ZodObject<{
21
+ limit: z.ZodNumber;
22
+ offset: z.ZodNumber;
23
+ totalCount: z.ZodNumber;
24
+ }, z.core.$strip>;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ export declare const GetSalesStaffCriteriaSchema: z.ZodObject<{
28
+ limit: z.ZodOptional<z.ZodInt>;
29
+ offset: z.ZodOptional<z.ZodInt>;
30
+ }, z.core.$strip>;
31
+ //# sourceMappingURL=get-sales-staff.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-sales-staff.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/sales-staff/schemas/get-sales-staff.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gBAAgB;;;;;;iBAM3B,CAAC;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBAWtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC"}