@things-factory/integration-marketplace 8.0.39 → 9.0.0-9.0.0-beta.59.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 (321) hide show
  1. package/dist-server/engine/index.d.ts +2 -2
  2. package/dist-server/engine/index.js +2 -2
  3. package/dist-server/engine/index.js.map +1 -1
  4. package/dist-server/tsconfig.tsbuildinfo +1 -1
  5. package/package.json +14 -14
  6. package/server/controllers/index.ts +0 -9
  7. package/server/controllers/lazada/apis/cancel-store-order.ts +0 -19
  8. package/server/controllers/lazada/apis/create-store-product.ts +0 -55
  9. package/server/controllers/lazada/apis/delete-store-product.ts +0 -16
  10. package/server/controllers/lazada/apis/echo.ts +0 -14
  11. package/server/controllers/lazada/apis/get-store-logistics.ts +0 -21
  12. package/server/controllers/lazada/apis/get-store-order-document.ts +0 -25
  13. package/server/controllers/lazada/apis/get-store-order-item-transaction-details.ts +0 -65
  14. package/server/controllers/lazada/apis/get-store-order-items.ts +0 -179
  15. package/server/controllers/lazada/apis/get-store-order.ts +0 -87
  16. package/server/controllers/lazada/apis/get-store-orders.ts +0 -127
  17. package/server/controllers/lazada/apis/get-store-product-brands.ts +0 -27
  18. package/server/controllers/lazada/apis/get-store-product-categories.ts +0 -14
  19. package/server/controllers/lazada/apis/get-store-product-category-attributes.ts +0 -16
  20. package/server/controllers/lazada/apis/get-store-product.ts +0 -42
  21. package/server/controllers/lazada/apis/get-store-products.ts +0 -84
  22. package/server/controllers/lazada/apis/get-store-refund-orders.ts +0 -52
  23. package/server/controllers/lazada/apis/index.ts +0 -24
  24. package/server/controllers/lazada/apis/set-order-invoice-no.ts +0 -24
  25. package/server/controllers/lazada/apis/set-store-order-status-delivered.ts +0 -17
  26. package/server/controllers/lazada/apis/set-store-order-status-failed-delivery.ts +0 -17
  27. package/server/controllers/lazada/apis/set-store-order-status-packed-by-marketplace.ts +0 -46
  28. package/server/controllers/lazada/apis/set-store-order-status-ready-to-ship.ts +0 -28
  29. package/server/controllers/lazada/apis/update-store-product-stock.ts +0 -29
  30. package/server/controllers/lazada/apis/update-store-product-variation-stock.ts +0 -29
  31. package/server/controllers/lazada/apis/update-store-product.ts +0 -51
  32. package/server/controllers/lazada/client/index.ts +0 -3
  33. package/server/controllers/lazada/client/lazada.ts +0 -142
  34. package/server/controllers/lazada/client/signature.ts +0 -67
  35. package/server/controllers/lazada/client/types.ts +0 -30
  36. package/server/controllers/lazada/client/xml.ts +0 -24
  37. package/server/controllers/lazada/index.ts +0 -8
  38. package/server/controllers/lazada/platform-action.ts +0 -35
  39. package/server/controllers/magento/apis/create-order-comment.ts +0 -32
  40. package/server/controllers/magento/apis/create-order-refund.ts +0 -20
  41. package/server/controllers/magento/apis/create-order-ship.ts +0 -43
  42. package/server/controllers/magento/apis/echo.ts +0 -14
  43. package/server/controllers/magento/apis/get-store-order.ts +0 -15
  44. package/server/controllers/magento/apis/get-store-orders.ts +0 -159
  45. package/server/controllers/magento/apis/get-store-product-categories.ts +0 -43
  46. package/server/controllers/magento/apis/get-store-product-variations.ts +0 -17
  47. package/server/controllers/magento/apis/get-store-product.ts +0 -44
  48. package/server/controllers/magento/apis/get-store-products.ts +0 -120
  49. package/server/controllers/magento/apis/get-store-stock-item.ts +0 -66
  50. package/server/controllers/magento/apis/index.ts +0 -16
  51. package/server/controllers/magento/apis/update-order-status.ts +0 -56
  52. package/server/controllers/magento/apis/update-store-product-price.ts +0 -24
  53. package/server/controllers/magento/apis/update-store-product-stock.ts +0 -42
  54. package/server/controllers/magento/apis/update-store-product-variation-price.ts +0 -24
  55. package/server/controllers/magento/apis/update-store-product-variation-stock.ts +0 -42
  56. package/server/controllers/magento/index.ts +0 -8
  57. package/server/controllers/magento/magento.ts +0 -202
  58. package/server/controllers/magento/platform-action.ts +0 -44
  59. package/server/controllers/shopee/apis/accept-store-order-cancellation.ts +0 -22
  60. package/server/controllers/shopee/apis/cancel-store-order.ts +0 -25
  61. package/server/controllers/shopee/apis/create-store-product-variations.ts +0 -33
  62. package/server/controllers/shopee/apis/create-store-product.ts +0 -57
  63. package/server/controllers/shopee/apis/delete-store-product.ts +0 -19
  64. package/server/controllers/shopee/apis/echo.ts +0 -14
  65. package/server/controllers/shopee/apis/get-address.ts +0 -32
  66. package/server/controllers/shopee/apis/get-branch-list.ts +0 -30
  67. package/server/controllers/shopee/apis/get-logistics-param.ts +0 -71
  68. package/server/controllers/shopee/apis/get-store-logistics.ts +0 -21
  69. package/server/controllers/shopee/apis/get-store-order-document.ts +0 -27
  70. package/server/controllers/shopee/apis/get-store-order-items.ts +0 -47
  71. package/server/controllers/shopee/apis/get-store-order-payout-dates.ts +0 -29
  72. package/server/controllers/shopee/apis/get-store-order-transaction-details.ts +0 -29
  73. package/server/controllers/shopee/apis/get-store-order.ts +0 -136
  74. package/server/controllers/shopee/apis/get-store-orders.ts +0 -39
  75. package/server/controllers/shopee/apis/get-store-product-categories.ts +0 -19
  76. package/server/controllers/shopee/apis/get-store-product-category-attributes.ts +0 -18
  77. package/server/controllers/shopee/apis/get-store-product.ts +0 -84
  78. package/server/controllers/shopee/apis/get-store-products.ts +0 -30
  79. package/server/controllers/shopee/apis/get-store-refund-order-details.ts +0 -41
  80. package/server/controllers/shopee/apis/get-store-refund-orders.ts +0 -47
  81. package/server/controllers/shopee/apis/get-time-slot.ts +0 -25
  82. package/server/controllers/shopee/apis/index.ts +0 -30
  83. package/server/controllers/shopee/apis/init-logistics.ts +0 -39
  84. package/server/controllers/shopee/apis/reject-store-order-cancellation.ts +0 -22
  85. package/server/controllers/shopee/apis/split-order.ts +0 -44
  86. package/server/controllers/shopee/apis/update-store-product-stock.ts +0 -24
  87. package/server/controllers/shopee/apis/update-store-product-variation-stock.ts +0 -21
  88. package/server/controllers/shopee/apis/update-store-product.ts +0 -85
  89. package/server/controllers/shopee/apis2/create-shipping-document.ts +0 -27
  90. package/server/controllers/shopee/apis2/echo.ts +0 -14
  91. package/server/controllers/shopee/apis2/get-logistics-param.ts +0 -66
  92. package/server/controllers/shopee/apis2/get-shipping-document-result.ts +0 -21
  93. package/server/controllers/shopee/apis2/get-store-logistics.ts +0 -23
  94. package/server/controllers/shopee/apis2/get-store-order-by-batch.ts +0 -97
  95. package/server/controllers/shopee/apis2/get-store-order-document.ts +0 -39
  96. package/server/controllers/shopee/apis2/get-store-order-payout-dates.ts +0 -33
  97. package/server/controllers/shopee/apis2/get-store-order-transaction-details.ts +0 -28
  98. package/server/controllers/shopee/apis2/get-store-order.ts +0 -93
  99. package/server/controllers/shopee/apis2/get-store-orders.ts +0 -40
  100. package/server/controllers/shopee/apis2/get-store-product-variations.ts +0 -17
  101. package/server/controllers/shopee/apis2/get-store-product.ts +0 -105
  102. package/server/controllers/shopee/apis2/get-store-products.ts +0 -28
  103. package/server/controllers/shopee/apis2/get-store-refund-order-details.ts +0 -39
  104. package/server/controllers/shopee/apis2/get-store-refund-orders.ts +0 -37
  105. package/server/controllers/shopee/apis2/get-tracking-number.ts +0 -17
  106. package/server/controllers/shopee/apis2/index.ts +0 -20
  107. package/server/controllers/shopee/apis2/init-logistics.ts +0 -39
  108. package/server/controllers/shopee/apis2/update-store-product-stock.ts +0 -26
  109. package/server/controllers/shopee/apis2/update-store-product-variation-stock.ts +0 -28
  110. package/server/controllers/shopee/index.ts +0 -16
  111. package/server/controllers/shopee/platform-action.ts +0 -58
  112. package/server/controllers/shopee/refresh-access-token.ts +0 -78
  113. package/server/controllers/shopee/shopee.ts +0 -191
  114. package/server/controllers/shopify/apis/echo.ts +0 -14
  115. package/server/controllers/shopify/apis/get-airway-bill.ts +0 -17
  116. package/server/controllers/shopify/apis/get-inventory-level.ts +0 -17
  117. package/server/controllers/shopify/apis/get-store-order.ts +0 -172
  118. package/server/controllers/shopify/apis/get-store-orders.ts +0 -290
  119. package/server/controllers/shopify/apis/get-store-product-categories.ts +0 -19
  120. package/server/controllers/shopify/apis/get-store-product-category-attributes.ts +0 -18
  121. package/server/controllers/shopify/apis/get-store-product-variation-stock.ts +0 -17
  122. package/server/controllers/shopify/apis/get-store-products-count.ts +0 -14
  123. package/server/controllers/shopify/apis/get-store-products.ts +0 -177
  124. package/server/controllers/shopify/apis/index.ts +0 -13
  125. package/server/controllers/shopify/apis/set-store-order-status-ready-to-ship.ts +0 -31
  126. package/server/controllers/shopify/apis/update-order-status.ts +0 -32
  127. package/server/controllers/shopify/apis/update-store-product-price.ts +0 -26
  128. package/server/controllers/shopify/apis/update-store-product-stock.ts +0 -20
  129. package/server/controllers/shopify/apis/update-store-product-variation-price.ts +0 -26
  130. package/server/controllers/shopify/apis/update-store-product-variation-stock.ts +0 -20
  131. package/server/controllers/shopify/index.ts +0 -8
  132. package/server/controllers/shopify/platform-action.ts +0 -43
  133. package/server/controllers/shopify/shopify.ts +0 -148
  134. package/server/controllers/store-api/decorators.ts +0 -44
  135. package/server/controllers/store-api/index.ts +0 -209
  136. package/server/controllers/store-api/types.ts +0 -0
  137. package/server/controllers/tiktok/apis/echo.ts +0 -14
  138. package/server/controllers/tiktok/apis/get-store-order-document.ts +0 -26
  139. package/server/controllers/tiktok/apis/get-store-order-package.ts +0 -46
  140. package/server/controllers/tiktok/apis/get-store-order-packages.ts +0 -43
  141. package/server/controllers/tiktok/apis/get-store-order.ts +0 -176
  142. package/server/controllers/tiktok/apis/get-store-orders.ts +0 -55
  143. package/server/controllers/tiktok/apis/get-store-product-attributes.ts +0 -29
  144. package/server/controllers/tiktok/apis/get-store-product-categories.ts +0 -27
  145. package/server/controllers/tiktok/apis/get-store-product.ts +0 -95
  146. package/server/controllers/tiktok/apis/get-store-products.ts +0 -45
  147. package/server/controllers/tiktok/apis/index.ts +0 -13
  148. package/server/controllers/tiktok/apis/update-order-status.ts +0 -24
  149. package/server/controllers/tiktok/apis/update-store-product-variation-price.ts +0 -24
  150. package/server/controllers/tiktok/apis/update-store-product-variation-stock.ts +0 -28
  151. package/server/controllers/tiktok/client/index.ts +0 -2
  152. package/server/controllers/tiktok/client/signature.ts +0 -78
  153. package/server/controllers/tiktok/client/tiktok.ts +0 -150
  154. package/server/controllers/tiktok/client/types.ts +0 -20
  155. package/server/controllers/tiktok/index.ts +0 -8
  156. package/server/controllers/tiktok/platform-action.ts +0 -72
  157. package/server/controllers/woocommerce/apis/create-order-note.ts +0 -17
  158. package/server/controllers/woocommerce/apis/echo.ts +0 -14
  159. package/server/controllers/woocommerce/apis/get-customer-info.ts +0 -18
  160. package/server/controllers/woocommerce/apis/get-store-order.ts +0 -116
  161. package/server/controllers/woocommerce/apis/get-store-orders.ts +0 -190
  162. package/server/controllers/woocommerce/apis/get-store-product-categories.ts +0 -18
  163. package/server/controllers/woocommerce/apis/get-store-product-variations.ts +0 -16
  164. package/server/controllers/woocommerce/apis/get-store-products.ts +0 -135
  165. package/server/controllers/woocommerce/apis/index.ts +0 -19
  166. package/server/controllers/woocommerce/apis/set-store-order-status-ready-to-ship.ts +0 -17
  167. package/server/controllers/woocommerce/apis/update-order-status.ts +0 -40
  168. package/server/controllers/woocommerce/apis/update-product-attribute.ts +0 -20
  169. package/server/controllers/woocommerce/apis/update-store-product-price.ts +0 -20
  170. package/server/controllers/woocommerce/apis/update-store-product-stock.ts +0 -17
  171. package/server/controllers/woocommerce/apis/update-store-product-variant-price.ts +0 -17
  172. package/server/controllers/woocommerce/apis/update-store-product-variant-stock.ts +0 -18
  173. package/server/controllers/woocommerce/apis/update-store-product-variation-price.ts +0 -20
  174. package/server/controllers/woocommerce/apis/update-store-product-variation-stock.ts +0 -20
  175. package/server/controllers/woocommerce/index.ts +0 -8
  176. package/server/controllers/woocommerce/platform-action.ts +0 -48
  177. package/server/controllers/woocommerce/woocommerce.ts +0 -104
  178. package/server/controllers/zalora/apis/echo.ts +0 -14
  179. package/server/controllers/zalora/apis/get-airway-bill.ts +0 -17
  180. package/server/controllers/zalora/apis/get-store-order-items.ts +0 -17
  181. package/server/controllers/zalora/apis/get-store-order.ts +0 -17
  182. package/server/controllers/zalora/apis/get-store-orders.ts +0 -21
  183. package/server/controllers/zalora/apis/get-store-product-categories.ts +0 -20
  184. package/server/controllers/zalora/apis/get-store-product-category-attributes.ts +0 -18
  185. package/server/controllers/zalora/apis/get-store-products.ts +0 -20
  186. package/server/controllers/zalora/apis/index.ts +0 -8
  187. package/server/controllers/zalora/index.ts +0 -8
  188. package/server/controllers/zalora/platform-action.ts +0 -18
  189. package/server/controllers/zalora/zalora/index.ts +0 -70
  190. package/server/controllers/zalora/zalora/signature.ts +0 -37
  191. package/server/controllers/zalora/zalora/xml.ts +0 -24
  192. package/server/engine/connector/index.ts +0 -3
  193. package/server/engine/connector/lazada-connector.ts +0 -49
  194. package/server/engine/connector/marketplace-connector.ts +0 -33
  195. package/server/engine/connector/shopee-connector.ts +0 -46
  196. package/server/engine/index.ts +0 -2
  197. package/server/engine/task/index.ts +0 -4
  198. package/server/engine/task/lazada-get.ts +0 -48
  199. package/server/engine/task/lazada-post.ts +0 -46
  200. package/server/engine/task/marketplace-api.ts +0 -72
  201. package/server/engine/task/shopee-post.ts +0 -51
  202. package/server/entities/index.ts +0 -8
  203. package/server/entities/marketplace-distributor.ts +0 -42
  204. package/server/entities/marketplace-setting.ts +0 -49
  205. package/server/entities/marketplace-store.ts +0 -100
  206. package/server/entities/marketplace-transporter.ts +0 -46
  207. package/server/graphql/constants/index.ts +0 -1
  208. package/server/graphql/constants/store.ts +0 -5
  209. package/server/graphql/index.ts +0 -9
  210. package/server/graphql/resolvers/index.ts +0 -6
  211. package/server/graphql/resolvers/marketplace-distributor/create-marketplace-distributor.ts +0 -15
  212. package/server/graphql/resolvers/marketplace-distributor/delete-marketplace-distributor.ts +0 -13
  213. package/server/graphql/resolvers/marketplace-distributor/delete-marketplace-distributors.ts +0 -18
  214. package/server/graphql/resolvers/marketplace-distributor/index.ts +0 -19
  215. package/server/graphql/resolvers/marketplace-distributor/marketplace-distributor-query.ts +0 -57
  216. package/server/graphql/resolvers/marketplace-distributor/update-marketplace-distributor.ts +0 -22
  217. package/server/graphql/resolvers/marketplace-distributor/update-multiple-marketplace-distributor.ts +0 -49
  218. package/server/graphql/resolvers/marketplace-setting/create-marketplace-setting.ts +0 -16
  219. package/server/graphql/resolvers/marketplace-setting/delete-marketplace-setting.ts +0 -13
  220. package/server/graphql/resolvers/marketplace-setting/delete-marketplace-settings.ts +0 -18
  221. package/server/graphql/resolvers/marketplace-setting/index.ts +0 -19
  222. package/server/graphql/resolvers/marketplace-setting/marketplace-setting-query.ts +0 -56
  223. package/server/graphql/resolvers/marketplace-setting/update-marketplace-setting.ts +0 -32
  224. package/server/graphql/resolvers/marketplace-setting/update-multiple-marketplace-setting.ts +0 -49
  225. package/server/graphql/resolvers/marketplace-store/create-marketplace-store.ts +0 -20
  226. package/server/graphql/resolvers/marketplace-store/delete-marketplace-store.ts +0 -21
  227. package/server/graphql/resolvers/marketplace-store/delete-marketplace-stores.ts +0 -26
  228. package/server/graphql/resolvers/marketplace-store/index.ts +0 -40
  229. package/server/graphql/resolvers/marketplace-store/lazada/deactivate-lazada-store.ts +0 -28
  230. package/server/graphql/resolvers/marketplace-store/lazada/generate-lazada-access-token.ts +0 -61
  231. package/server/graphql/resolvers/marketplace-store/lazada/get-lazada-auth-url.ts +0 -9
  232. package/server/graphql/resolvers/marketplace-store/lazada/index.ts +0 -12
  233. package/server/graphql/resolvers/marketplace-store/magento/activate-magento-store.ts +0 -82
  234. package/server/graphql/resolvers/marketplace-store/magento/deactivate-magento-store.ts +0 -27
  235. package/server/graphql/resolvers/marketplace-store/magento/get-magento-auth-url.ts +0 -12
  236. package/server/graphql/resolvers/marketplace-store/magento/index.ts +0 -12
  237. package/server/graphql/resolvers/marketplace-store/marketplace-store.ts +0 -14
  238. package/server/graphql/resolvers/marketplace-store/marketplace-stores.ts +0 -18
  239. package/server/graphql/resolvers/marketplace-store/shopee/deactivate-shopee-store.ts +0 -28
  240. package/server/graphql/resolvers/marketplace-store/shopee/generate-shopee-access-token.ts +0 -96
  241. package/server/graphql/resolvers/marketplace-store/shopee/get-shopee-auth-url.ts +0 -18
  242. package/server/graphql/resolvers/marketplace-store/shopee/index.ts +0 -13
  243. package/server/graphql/resolvers/marketplace-store/shopify/deactivate-shopify-store.ts +0 -29
  244. package/server/graphql/resolvers/marketplace-store/shopify/get-shopify-auth-url.ts +0 -26
  245. package/server/graphql/resolvers/marketplace-store/shopify/index.ts +0 -11
  246. package/server/graphql/resolvers/marketplace-store/update-marketplace-store.ts +0 -19
  247. package/server/graphql/resolvers/marketplace-store/update-multiple-marketplace-store.ts +0 -46
  248. package/server/graphql/resolvers/marketplace-store/woocommerce/deactivate-woocommerce-store.ts +0 -20
  249. package/server/graphql/resolvers/marketplace-store/woocommerce/get-woocommerce-auth-url.ts +0 -14
  250. package/server/graphql/resolvers/marketplace-store/woocommerce/index.ts +0 -10
  251. package/server/graphql/resolvers/marketplace-store/zalora/deactivate-zalora-store.ts +0 -28
  252. package/server/graphql/resolvers/marketplace-store/zalora/generate-zalora-access-token.ts +0 -55
  253. package/server/graphql/resolvers/marketplace-store/zalora/index.ts +0 -9
  254. package/server/graphql/resolvers/marketplace-transporter/create-marketplace-transporter.ts +0 -21
  255. package/server/graphql/resolvers/marketplace-transporter/delete-marketplace-transporter.ts +0 -13
  256. package/server/graphql/resolvers/marketplace-transporter/delete-marketplace-transporters.ts +0 -18
  257. package/server/graphql/resolvers/marketplace-transporter/index.ts +0 -19
  258. package/server/graphql/resolvers/marketplace-transporter/marketplace-transporter-query.ts +0 -60
  259. package/server/graphql/resolvers/marketplace-transporter/update-marketplace-transporter.ts +0 -25
  260. package/server/graphql/resolvers/marketplace-transporter/update-multiple-marketplace-transporter.ts +0 -49
  261. package/server/graphql/resolvers/store-order/accept-store-order-cancellation.ts +0 -9
  262. package/server/graphql/resolvers/store-order/cancel-store-order.ts +0 -8
  263. package/server/graphql/resolvers/store-order/get-store-order-document.ts +0 -8
  264. package/server/graphql/resolvers/store-order/get-store-order-items.ts +0 -8
  265. package/server/graphql/resolvers/store-order/get-store-order.ts +0 -8
  266. package/server/graphql/resolvers/store-order/get-store-orders.ts +0 -13
  267. package/server/graphql/resolvers/store-order/index.ts +0 -23
  268. package/server/graphql/resolvers/store-order/reject-store-order-cancellation.ts +0 -9
  269. package/server/graphql/resolvers/store-order/set-store-order-status-packed-by-marketplace.ts +0 -9
  270. package/server/graphql/resolvers/store-order/set-store-order-status-ready-to-ship.ts +0 -10
  271. package/server/graphql/resolvers/store-product/create-store-product-variations.ts +0 -9
  272. package/server/graphql/resolvers/store-product/create-store-product.ts +0 -8
  273. package/server/graphql/resolvers/store-product/delete-store-product.ts +0 -8
  274. package/server/graphql/resolvers/store-product/get-store-product-brands.ts +0 -14
  275. package/server/graphql/resolvers/store-product/get-store-product-categories.ts +0 -8
  276. package/server/graphql/resolvers/store-product/get-store-product-category-attributes.ts +0 -11
  277. package/server/graphql/resolvers/store-product/get-store-product.ts +0 -8
  278. package/server/graphql/resolvers/store-product/get-store-products.ts +0 -13
  279. package/server/graphql/resolvers/store-product/index.ts +0 -25
  280. package/server/graphql/resolvers/store-product/update-store-product.ts +0 -8
  281. package/server/graphql/types/index.ts +0 -6
  282. package/server/graphql/types/marketplace-distributor/index.ts +0 -26
  283. package/server/graphql/types/marketplace-distributor/marketplace-distributor-list.ts +0 -8
  284. package/server/graphql/types/marketplace-distributor/marketplace-distributor-patch.ts +0 -11
  285. package/server/graphql/types/marketplace-distributor/marketplace-distributor.ts +0 -16
  286. package/server/graphql/types/marketplace-distributor/new-marketplace-distributor.ts +0 -9
  287. package/server/graphql/types/marketplace-setting/index.ts +0 -22
  288. package/server/graphql/types/marketplace-setting/marketplace-setting-list.ts +0 -8
  289. package/server/graphql/types/marketplace-setting/marketplace-setting-patch.ts +0 -12
  290. package/server/graphql/types/marketplace-setting/marketplace-setting.ts +0 -17
  291. package/server/graphql/types/marketplace-setting/new-marketplace-setting.ts +0 -11
  292. package/server/graphql/types/marketplace-store/index.ts +0 -38
  293. package/server/graphql/types/marketplace-store/marketplace-store-list.ts +0 -8
  294. package/server/graphql/types/marketplace-store/marketplace-store-patch.ts +0 -21
  295. package/server/graphql/types/marketplace-store/marketplace-store.ts +0 -28
  296. package/server/graphql/types/marketplace-store/new-marketplace-store.ts +0 -19
  297. package/server/graphql/types/marketplace-transporter/index.ts +0 -24
  298. package/server/graphql/types/marketplace-transporter/marketplace-transporter-list.ts +0 -8
  299. package/server/graphql/types/marketplace-transporter/marketplace-transporter-patch.ts +0 -13
  300. package/server/graphql/types/marketplace-transporter/marketplace-transporter.ts +0 -17
  301. package/server/graphql/types/marketplace-transporter/new-marketplace-transporter.ts +0 -11
  302. package/server/graphql/types/store-order/index.ts +0 -23
  303. package/server/graphql/types/store-order/new-store-order.ts +0 -8
  304. package/server/graphql/types/store-order/store-order-list.ts +0 -8
  305. package/server/graphql/types/store-order/store-order-patch.ts +0 -10
  306. package/server/graphql/types/store-order/store-order.ts +0 -14
  307. package/server/graphql/types/store-product/index.ts +0 -23
  308. package/server/graphql/types/store-product/new-store-product.ts +0 -8
  309. package/server/graphql/types/store-product/store-product-list.ts +0 -8
  310. package/server/graphql/types/store-product/store-product-patch.ts +0 -10
  311. package/server/graphql/types/store-product/store-product.ts +0 -14
  312. package/server/index.ts +0 -9
  313. package/server/migrations/index.ts +0 -9
  314. package/server/routers/magento-private-router.ts +0 -192
  315. package/server/routers/magento-public-router.ts +0 -38
  316. package/server/routers/shopify-install-private-router.ts +0 -95
  317. package/server/routers/shopify-install-public-router.ts +0 -241
  318. package/server/routers/shopify-private-router.ts +0 -78
  319. package/server/routers/shopify-public-router.ts +0 -182
  320. package/server/routers/woocommerce-router.ts +0 -70
  321. package/server/routes.ts +0 -21
@@ -1,116 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#retrieve-an-order */
2
-
3
- export function getStoreOrder() {
4
- return {
5
- method: 'get',
6
- path: '/orders/{orderId}',
7
- denormalize(req) {
8
- var { orderId } = req
9
- return {
10
- resource: { orderId }
11
- }
12
- },
13
- normalize(res) {
14
- const order = res.items
15
-
16
- const {
17
- id: name,
18
- number: orderNo,
19
- currency,
20
- total: totalAmount,
21
- payment_method: paymentMethod,
22
- status,
23
- discount_total: discountValue,
24
- date_created_gmt,
25
- date_modified_gmt,
26
- shipping,
27
- billing,
28
- line_items
29
- } = order
30
-
31
- let docRefNo = orderNo
32
- var orderCreatedAt = new Date(date_created_gmt)
33
- var orderUpdatedAt = new Date(date_modified_gmt)
34
-
35
- let orderItems = line_items.map(item => {
36
- var { id: name, product_id, variation_id, quantity: qty, price } = item
37
-
38
- return {
39
- name,
40
- variationId: variation_id === 0 ? product_id : variation_id,
41
- qty,
42
- paidPrice: price,
43
- orderNo,
44
- docRefNo,
45
- paymentMethod,
46
- discountValue
47
- }
48
- })
49
-
50
- const {
51
- address_1: shippingAddress1,
52
- address_2: shippingAddress2,
53
- postcode: shippingPostCode,
54
- country: shippingCountry,
55
- city: shippingCity,
56
- first_name: shippingFirstName,
57
- last_name: shippingLastName,
58
- state: shippingState,
59
- phone: shippingPhone,
60
- email: shippingEmail
61
- } = shipping
62
-
63
- const {
64
- address_1: billingAddress1,
65
- address_2: billingAddress2,
66
- postcode: billingPostCode,
67
- country: billingCountry,
68
- city: billingCity,
69
- first_name: billingFirstName,
70
- last_name: billingLastName,
71
- state: billingState,
72
- phone: billingPhone,
73
- email: billingEmail
74
- } = billing
75
-
76
- var orderShipping = {
77
- address1: shippingAddress1 == null ? billingAddress1 : shippingAddress1,
78
- address2: shippingAddress2 == null ? billingAddress2 : shippingAddress2,
79
- address3: null,
80
- address4: null,
81
- address5: null,
82
- phone1: shippingPhone == null || shippingPhone == '' ? billingPhone : shippingPhone,
83
- phone2: null,
84
- email: shippingEmail == null ? billingEmail : shippingEmail,
85
- postCode: shippingPostCode == null ? billingPostCode : shippingPostCode,
86
- city: shippingCity == null ? billingCity : shippingCity,
87
- state: shippingState == null ? billingState : shippingState,
88
- country:
89
- shippingCountry == null
90
- ? billingCountry === 'MY'
91
- ? 'Malaysia'
92
- : billingCountry
93
- : billingCountry === 'MY'
94
- ? 'Malaysia'
95
- : billingCountry,
96
- collectionCurrency: currency,
97
- attentionTo:
98
- shippingFirstName == null
99
- ? `${billingFirstName} ${billingLastName}`
100
- : `${shippingFirstName} ${shippingLastName}`
101
- }
102
-
103
- return {
104
- name,
105
- orderNo,
106
- status,
107
- orderCreatedAt,
108
- orderUpdatedAt,
109
- totalAmount,
110
- itemCount: line_items.length,
111
- orderItems,
112
- orderShipping
113
- }
114
- }
115
- }
116
- }
@@ -1,190 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#list-all-orders */
2
- /* /wp-json/wc/v3/orders */
3
-
4
- import { StoreAPI } from '../../store-api'
5
-
6
- export function getStoreOrders() {
7
- return {
8
- method: 'get',
9
- path: '/orders',
10
- denormalize(req) {
11
- var { pagination, fromCreatedDate, toCreatedDate } = req || {}
12
- var { page = 0, limit = 100 } = pagination || {}
13
-
14
- var after = new Date(fromCreatedDate).toISOString()
15
- var before = new Date(toCreatedDate).toISOString()
16
- /* Must include only create_time or update_time in the request. */
17
- // var update_time_from = lastOneDay
18
- // var update_time_to = now
19
-
20
- var payload = {
21
- offset: page * limit,
22
- per_page: limit,
23
- page: page + 1,
24
- after,
25
- before
26
- }
27
-
28
- return { payload }
29
- },
30
- async normalize(res, { store }) {
31
- // return res.orders
32
- var { items: orders, link } = res
33
- let results: any[] = []
34
-
35
- var more: boolean = false
36
-
37
- if (link) {
38
- more = checkNextPage(link)
39
- }
40
-
41
- for (var i = 0; i < orders.length; i++) {
42
- const order = orders[i]
43
-
44
- var firstName: any
45
- var lastName: any
46
- if (order.customer_id != 0) {
47
- var customerInfo = await StoreAPI.getCustomerInfo(store, { id: order.customer_id })
48
-
49
- firstName = customerInfo.first_name
50
- lastName = customerInfo.last_name
51
- } else {
52
- firstName = 'GUEST'
53
- }
54
-
55
- const {
56
- id: name,
57
- number: orderNo,
58
- currency,
59
- total: totalAmount,
60
- payment_method: paymentMethod,
61
- status,
62
- discount_total: discountValue,
63
- date_created_gmt,
64
- date_modified_gmt,
65
- shipping,
66
- billing,
67
- line_items
68
- } = order
69
-
70
- let docRefNo = orderNo
71
- var orderCreatedAt = new Date(date_created_gmt)
72
- var orderUpdatedAt = new Date(date_modified_gmt)
73
-
74
- let orderItems = line_items.map(item => {
75
- var {
76
- id: name,
77
- product_id,
78
- variation_id,
79
- quantity: qty,
80
- price,
81
- subtotal,
82
- subtotal_tax: subtotalTax,
83
- total,
84
- total_tax: totalTax,
85
- originalPrice: subtotal
86
- } = item
87
-
88
- return {
89
- name,
90
- variationId: variation_id === 0 ? product_id : variation_id,
91
- qty,
92
- paidPrice: price,
93
- orderNo,
94
- docRefNo,
95
- paymentMethod,
96
- discountValue,
97
- subtotal,
98
- subtotalTax,
99
- total,
100
- totalTax,
101
- originalPrice: subtotal
102
- }
103
- })
104
-
105
- const {
106
- address_1: shippingAddress1,
107
- address_2: shippingAddress2,
108
- postcode: shippingPostCode,
109
- country: shippingCountry,
110
- city: shippingCity,
111
- first_name: shippingFirstName,
112
- last_name: shippingLastName,
113
- state: shippingState,
114
- phone: shippingPhone,
115
- email: shippingEmail
116
- } = shipping
117
-
118
- const {
119
- address_1: billingAddress1,
120
- address_2: billingAddress2,
121
- postcode: billingPostCode,
122
- country: billingCountry,
123
- city: billingCity,
124
- first_name: billingFirstName,
125
- last_name: billingLastName,
126
- state: billingState,
127
- phone: billingPhone,
128
- email: billingEmail
129
- } = billing
130
-
131
- var orderShipping = {
132
- address1: shippingAddress1 == null ? billingAddress1 : shippingAddress1,
133
- address2: shippingAddress2 == null ? billingAddress2 : shippingAddress2,
134
- address3: null,
135
- address4: null,
136
- address5: null,
137
- phone1: shippingPhone == null || shippingPhone == '' ? billingPhone : shippingPhone,
138
- phone2: null,
139
- email: shippingEmail == null ? billingEmail : shippingEmail,
140
- postCode: shippingPostCode == null ? billingPostCode : shippingPostCode,
141
- city: shippingCity == null ? billingCity : shippingCity,
142
- state: shippingState == null ? billingState : shippingState,
143
- country:
144
- shippingCountry == null
145
- ? billingCountry === 'MY'
146
- ? 'Malaysia'
147
- : billingCountry
148
- : billingCountry === 'MY'
149
- ? 'Malaysia'
150
- : billingCountry,
151
- collectionCurrency: currency,
152
- attentionTo:
153
- shippingFirstName == null
154
- ? `${billingFirstName} ${billingLastName}`
155
- : `${shippingFirstName} ${shippingLastName}`
156
- }
157
-
158
- results.push({
159
- name,
160
- orderNo,
161
- status,
162
- orderCreatedAt,
163
- orderUpdatedAt,
164
- totalAmount,
165
- itemCount: line_items.length,
166
- orderItems,
167
- orderShipping,
168
- billing,
169
- shipping,
170
- firstName,
171
- lastName,
172
- isSOF: true
173
- })
174
- }
175
-
176
- return { results, more }
177
- }
178
- }
179
- }
180
-
181
- function checkNextPage(link) {
182
- let nextPage: boolean = false
183
-
184
- // If there's a previous link, remove the first part of the string entirely
185
- if (link.indexOf(`rel="next"`) > -1) {
186
- nextPage = true
187
- }
188
-
189
- return nextPage
190
- }
@@ -1,18 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#list-all-products /wp-json/wc/v3/categoriess */
2
-
3
- export function getStoreProductCategories() {
4
- return {
5
- method: 'get',
6
- path: '/products/categories',
7
- denormalize(req) {
8
- return { payload: {
9
- per_page: 100
10
- } }
11
- },
12
- normalize(res, { store }) {
13
- const { items, totalItems } = res
14
-
15
- return { results: items, total: parseInt(totalItems) }
16
- }
17
- }
18
- }
@@ -1,16 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#list-all-product-variations */
2
- /* /wp-json/wc/v3/products/<product_id>/variations */
3
-
4
- export function getStoreProductVariations(req) {
5
- return {
6
- method: 'get',
7
- denormalize() {
8
- const payload: any = {}
9
- return { payload }
10
- },
11
- async normalize(res, { store }) {
12
- return res.items
13
- },
14
- path: '/products/' + req + '/variations'
15
- }
16
- }
@@ -1,135 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#list-all-products /wp-json/wc/v3/products */
2
- import { StoreAPI } from '../../store-api'
3
-
4
- export function getStoreProducts() {
5
- return {
6
- method: 'get',
7
- path: '/products',
8
- denormalize(req) {
9
- var { pagination } = req || {}
10
- var { page, limit } = pagination || { page: 0, limit: 100 }
11
-
12
- var payload: any = {
13
- per_page: limit,
14
- offset: page * limit
15
- }
16
-
17
- return { payload }
18
- },
19
- async normalize(res, { store }) {
20
- const { items, totalItems: totalProducts } = res
21
-
22
- let results: any[] = []
23
-
24
- for (var i = 0; i < items.length; i++) {
25
- const product: any = items[i]
26
- const productVariations: any[] = await StoreAPI.getStoreProductVariations(store, product.id)
27
-
28
- const result = {
29
- itemId: product.id,
30
- name: product.name,
31
- type: product.type,
32
- description: product.description,
33
- hasVariation: product.variations.length > 0 ? true : false,
34
- categoryId: product?.categories.length > 0 ? product.categories[0].id : null,
35
- images: product.images.map(image => {
36
- return image.src
37
- }),
38
- attributes:
39
- product?.attributes?.map(attribute => {
40
- return {
41
- attributeId: attribute.id,
42
- name: attribute.name,
43
- originalValue: attribute.options,
44
- native_attribute_id: attribute.id,
45
- attribute_key: attribute.name,
46
- values: attribute.options
47
- }
48
- }) || [],
49
- sellercraftAttributes: [
50
- {
51
- native_attribute_id: 'description',
52
- attribute_key: 'description',
53
- display_name: 'Description',
54
- values: [product.description]
55
- }
56
- ],
57
- isVerified: product.purchasable,
58
- variations:
59
- productVariations.length === 0
60
- ? [
61
- {
62
- variationId: product.id,
63
- variationSku: product.sku,
64
- channelSku: product.sku,
65
- name: product.name,
66
- qty: product.manage_stock === true ? parseFloat(product.stock_quantity) : null,
67
- primaryUnit: 'N/A',
68
- primaryUnitValue: product.weight === '' ? null : parseFloat(product.weight),
69
- costPrice: product.price === '' ? null : parseFloat(product.regular_price),
70
- sellPrice: product.sale_price === '' ? null : parseFloat(product.sale_price),
71
- attributes:
72
- product?.attributes?.map(attribute => {
73
- return {
74
- attributeId: attribute.id,
75
- name: attribute.name,
76
- originalValue: attribute.options,
77
- native_attribute_id: attribute.id,
78
- attribute_key: attribute.name,
79
- values: attribute.options
80
- }
81
- }) || [],
82
- isEnabled: product.purchasable,
83
- length: product.dimensions.length * 10,
84
- width: product.dimensions.width * 10,
85
- height: product.dimensions.height * 10,
86
- weight: product.weight * 1000
87
- }
88
- ]
89
- : productVariations.map(variant => {
90
- return {
91
- variationId: variant.id,
92
- variationSku: variant.sku,
93
- channelSku: variant.sku,
94
- name:
95
- product.name + variant?.attributes.length > 0 ? ' (' + variant.attributes[0].options + ')' : '',
96
- qty: variant.manage_stock === true ? parseFloat(variant.stock_quantity) : null,
97
- primaryUnit: 'N/A',
98
- primaryUnitValue: variant.weight === '' ? null : parseFloat(variant.weight),
99
- costPrice: variant.price === '' ? null : parseFloat(variant.regular_price),
100
- sellPrice: variant.sale_price === '' ? null : parseFloat(variant.sale_price),
101
- attributes:
102
- variant?.attributes?.map(attribute => {
103
- return {
104
- attributeId: attribute.id,
105
- name: attribute.name,
106
- originalValue: attribute.options,
107
- native_attribute_id: attribute.id,
108
- attribute_key: attribute.name,
109
- values: [attribute.option]
110
- }
111
- }) || [],
112
- sellercraftAttributes: variant?.attributes?.map(attribute => {
113
- return {
114
- native_attribute_id: attribute.name,
115
- attribute_key: attribute.name,
116
- display_name: attribute.name,
117
- values: [attribute.option]
118
- }
119
- }) || [],
120
- isEnabled: variant.purchasable,
121
- length: variant.dimensions.length * 10,
122
- width: variant.dimensions.width * 10,
123
- height: variant.dimensions.height * 10,
124
- weight: variant.weight * 1000
125
- }
126
- })
127
- }
128
-
129
- results.push({ ...result })
130
- }
131
-
132
- return { results, total: totalProducts }
133
- }
134
- }
135
- }
@@ -1,19 +0,0 @@
1
- export * from './echo'
2
- export * from './create-order-note'
3
- export * from './get-store-product-categories'
4
- export * from './get-store-products'
5
- export * from './get-store-product-variations'
6
- export * from './get-store-orders'
7
- export * from './update-store-product-stock'
8
- export * from './update-store-product-variation-stock'
9
- export * from './get-store-product-categories'
10
- export * from './update-order-status'
11
- export * from './update-product-attribute'
12
- export * from './update-store-product-price'
13
- export * from './update-store-product-variation-price'
14
- export * from './get-store-order'
15
- export * from './update-store-product-price'
16
- export * from './update-store-product-variant-stock'
17
- export * from './update-store-product-variant-price'
18
- export * from './get-customer-info'
19
- export * from './set-store-order-status-ready-to-ship'
@@ -1,17 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#create-an-order-note */
2
- /* /wp-json/wc/v3/orders */
3
-
4
- export function setStoreOrderStatusReadyToShip(req) {
5
- return {
6
- method: 'post',
7
- path: '/orders/{orderId}/notes',
8
- denormalize(req) {
9
- var { note, orderId } = req || {}
10
-
11
- return { resource: { orderId: orderId }, payload: { note, customer_note: true } }
12
- },
13
- normalize(res) {
14
- return res
15
- }
16
- }
17
- }
@@ -1,40 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/#update-an-order */
2
- /* /wp-json/wc/v3/orders/<id> */
3
-
4
- import { StoreAPI } from '../../store-api'
5
-
6
- const ORDER_STATUS = {
7
- PAYMENT_PENDING: 'pending',
8
- PROCESSING: 'processing',
9
- PACKED: 'processing',
10
- READY_TO_SHIP: 'processing',
11
- SHIPPED: 'processing',
12
- CONFIRMED: 'processing',
13
- DELIVERED: 'completed',
14
- CLOSED: 'completed',
15
- CANCELLED: 'cancelled',
16
- REFUND_COMPLETE: 'refunded',
17
- RETURN_COMPLETE: 'refunded',
18
- REVERSE_SHIPMENT_FAILED: 'failed',
19
- SHIPMENT_LOST_OR_DAMAGED: 'failed',
20
- PAYMENT_PENDING_TIMEOUT: 'failed'
21
- }
22
-
23
- export function updateOrderStatus(req) {
24
- return {
25
- method: 'put',
26
- path: '/orders/{orderId}',
27
- async denormalize(req, { store }) {
28
- var { status, orderId } = req || {}
29
-
30
- const order = await StoreAPI.getStoreOrder(store, { orderId })
31
-
32
- let orderStatus = ORDER_STATUS[`${status}`] || order.status
33
-
34
- return { resource: { orderId: orderId }, payload: { status: orderStatus } }
35
- },
36
- normalize(res) {
37
- return res
38
- }
39
- }
40
- }
@@ -1,20 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/#update-a-product-attribute */
2
- /* /wp-json/wc/v3/attributes/<id> */
3
-
4
- export function updateProductAttribute(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}/variations/{variantId}',
8
- denormalize(req) {
9
-
10
- var { productSku, itemId, variant } = req || {}
11
-
12
- const data = variant.attributes
13
-
14
- return { resource: { itemId, variantId: variant.native_variant_id }, payload: { attributes: data } }
15
- },
16
- normalize(res) {
17
- return res
18
- }
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#update-a-product */
2
- /* /wp-json/wc/v3/products/<id> */
3
-
4
- export function updateStoreProductPrice(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}',
8
- denormalize(req) {
9
- var { costPrice, sellPrice, productId } = req || {}
10
-
11
- return {
12
- resource: { itemId: parseInt(productId) },
13
- payload: { regular_price: costPrice?.toString(), sale_price: sellPrice?.toString() }
14
- }
15
- },
16
- normalize(res) {
17
- return res
18
- }
19
- }
20
- }
@@ -1,17 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#update-a-product */
2
- /* /wp-json/wc/v3/products/<id> */
3
-
4
- export function updateStoreProductStock(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}',
8
- denormalize(req) {
9
- var { qty, itemId } = (Array.isArray(req) ? req[0] : req) || {}
10
-
11
- return { resource: { itemId: parseInt(itemId) }, payload: { stock_quantity: qty, manage_stock: true } }
12
- },
13
- normalize(res) {
14
- return res
15
- }
16
- }
17
- }
@@ -1,17 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#update-a-product-variation */
2
- /* /wp-json/wc/v3/products/<product_id>/variations/<id> */
3
-
4
- export function updateStoreProductVariantPrice(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}/variations/{variantId}',
8
- denormalize(req) {
9
- var { cost_price, sell_price, product_id, variant_id } = req[0] || {}
10
-
11
- return { resource: { itemId: parseInt(product_id), variantId: parseInt(variant_id) }, payload: { price: cost_price, sale_price: sell_price } }
12
- },
13
- normalize(res) {
14
- return res.items
15
- }
16
- }
17
- }
@@ -1,18 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#update-a-product-variation */
2
- /* /wp-json/wc/v3/products/<product_id>/variations/<id> */
3
-
4
- export function updateStoreProductVariantStock(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}/variations/{variantId}',
8
- denormalize(req) {
9
- var { qty, product_id, variant_id } = req[0] || {}
10
-
11
- return { resource: { itemId: parseInt(product_id), variantId: parseInt(variant_id) }, payload: { stock_quantity: qty, manage_stock: true } }
12
- },
13
- normalize(res) {
14
- return res.items
15
- }
16
- }
17
- }
18
-
@@ -1,20 +0,0 @@
1
- /* https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#update-a-product-variation */
2
- /* /wp-json/wc/v3/products/<product_id>/variations/<id> */
3
-
4
- export function updateStoreProductVariationPrice(req) {
5
- return {
6
- method: 'put',
7
- path: '/products/{itemId}/variations/{variantId}',
8
- denormalize(req) {
9
- var { costPrice, sellPrice, productId, variationId } = req || {}
10
-
11
- return {
12
- resource: { itemId: parseInt(productId), variantId: parseInt(variationId) },
13
- payload: { regular_price: costPrice?.toString(), sale_price: sellPrice?.toString(), on_sale: costPrice != sellPrice ? true : false }
14
- }
15
- },
16
- normalize(res) {
17
- return res
18
- }
19
- }
20
- }