@nomalism-com/api 0.8.19 → 0.8.20

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 (361) hide show
  1. package/{src/index.ts → dist/index.d.ts} +2 -118
  2. package/dist/index.js +257 -0
  3. package/dist/modules/documentManagement/index.d.ts +2 -0
  4. package/dist/modules/documentManagement/index.js +7 -0
  5. package/dist/modules/documentManagement/multimedia.d.ts +5 -0
  6. package/dist/modules/documentManagement/multimedia.js +69 -0
  7. package/dist/modules/integration/dynamicData.d.ts +8 -0
  8. package/dist/modules/integration/dynamicData.js +103 -0
  9. package/dist/modules/integration/field.d.ts +26 -0
  10. package/dist/modules/integration/field.js +93 -0
  11. package/dist/modules/integration/fieldGroup.d.ts +12 -0
  12. package/dist/modules/integration/fieldGroup.js +118 -0
  13. package/dist/modules/integration/file.d.ts +5 -0
  14. package/dist/modules/integration/file.js +83 -0
  15. package/dist/modules/integration/history.d.ts +11 -0
  16. package/dist/modules/integration/history.js +63 -0
  17. package/dist/modules/integration/index.d.ts +2 -0
  18. package/dist/modules/integration/index.js +7 -0
  19. package/dist/modules/integration/observation.d.ts +8 -0
  20. package/dist/modules/integration/observation.js +94 -0
  21. package/dist/modules/integration/observationType.d.ts +10 -0
  22. package/dist/modules/integration/observationType.js +107 -0
  23. package/dist/modules/integration/task.d.ts +10 -0
  24. package/dist/modules/integration/task.js +113 -0
  25. package/dist/modules/integration/taskAttachment.d.ts +7 -0
  26. package/dist/modules/integration/taskAttachment.js +72 -0
  27. package/dist/modules/integration/taskGroup.d.ts +8 -0
  28. package/dist/modules/integration/taskGroup.js +103 -0
  29. package/dist/modules/integration/taskNote.d.ts +8 -0
  30. package/dist/modules/integration/taskNote.js +92 -0
  31. package/dist/modules/print/index.d.ts +4 -0
  32. package/dist/modules/print/index.js +9 -0
  33. package/dist/modules/print/npc.d.ts +5 -0
  34. package/dist/modules/print/npc.js +70 -0
  35. package/dist/modules/print/printer.d.ts +6 -0
  36. package/dist/modules/print/printer.js +70 -0
  37. package/dist/modules/print/schedulePrintJob.d.ts +8 -0
  38. package/dist/modules/print/schedulePrintJob.js +139 -0
  39. package/dist/modules/stock/attribute.d.ts +16 -0
  40. package/dist/modules/stock/attribute.js +143 -0
  41. package/dist/modules/stock/attributeValue.d.ts +12 -0
  42. package/dist/modules/stock/attributeValue.js +140 -0
  43. package/dist/modules/stock/cabide.d.ts +15 -0
  44. package/dist/modules/stock/cabide.js +151 -0
  45. package/dist/modules/stock/cabideProduct.d.ts +10 -0
  46. package/dist/modules/stock/cabideProduct.js +127 -0
  47. package/dist/modules/stock/clientCurrentAccount.d.ts +5 -0
  48. package/dist/modules/stock/clientCurrentAccount.js +61 -0
  49. package/dist/modules/stock/color.d.ts +13 -0
  50. package/dist/modules/stock/color.js +139 -0
  51. package/dist/modules/stock/composition.d.ts +12 -0
  52. package/dist/modules/stock/composition.js +127 -0
  53. package/dist/modules/stock/compositionMaterial.d.ts +13 -0
  54. package/dist/modules/stock/compositionMaterial.js +140 -0
  55. package/dist/modules/stock/documentHeader.d.ts +45 -0
  56. package/dist/modules/stock/documentHeader.js +361 -0
  57. package/dist/modules/stock/documentLine.d.ts +24 -0
  58. package/dist/modules/stock/documentLine.js +125 -0
  59. package/dist/modules/stock/documentLineAssoc.d.ts +20 -0
  60. package/dist/modules/stock/documentLineAssoc.js +154 -0
  61. package/dist/modules/stock/documentLineFolder.d.ts +6 -0
  62. package/dist/modules/stock/documentLineFolder.js +92 -0
  63. package/dist/modules/stock/documentLineState.d.ts +10 -0
  64. package/dist/modules/stock/documentLineState.js +114 -0
  65. package/dist/modules/stock/documentLineStateCriteria.d.ts +20 -0
  66. package/dist/modules/stock/documentLineStateCriteria.js +121 -0
  67. package/dist/modules/stock/documentSet.d.ts +8 -0
  68. package/dist/modules/stock/documentSet.js +114 -0
  69. package/dist/modules/stock/documentType.d.ts +14 -0
  70. package/dist/modules/stock/documentType.js +117 -0
  71. package/dist/modules/stock/externalDocumentHeader.d.ts +15 -0
  72. package/dist/modules/stock/externalDocumentHeader.js +135 -0
  73. package/dist/modules/stock/externalDocumentType.d.ts +6 -0
  74. package/dist/modules/stock/externalDocumentType.js +70 -0
  75. package/dist/modules/stock/index.d.ts +3 -0
  76. package/dist/modules/stock/index.js +8 -0
  77. package/dist/modules/stock/location.d.ts +12 -0
  78. package/dist/modules/stock/location.js +140 -0
  79. package/dist/modules/stock/maintenance.d.ts +12 -0
  80. package/dist/modules/stock/maintenance.js +140 -0
  81. package/dist/modules/stock/maintenanceAssoc.d.ts +12 -0
  82. package/dist/modules/stock/maintenanceAssoc.js +127 -0
  83. package/dist/modules/stock/maintenancePreset.d.ts +10 -0
  84. package/dist/modules/stock/maintenancePreset.js +114 -0
  85. package/dist/modules/stock/maintenancePresetAssoc.d.ts +8 -0
  86. package/dist/modules/stock/maintenancePresetAssoc.js +91 -0
  87. package/dist/modules/stock/maintenanceType.d.ts +13 -0
  88. package/dist/modules/stock/maintenanceType.js +140 -0
  89. package/dist/modules/stock/moloniRequest.d.ts +5 -0
  90. package/dist/modules/stock/moloniRequest.js +59 -0
  91. package/dist/modules/stock/orderManagement.d.ts +11 -0
  92. package/dist/modules/stock/orderManagement.js +88 -0
  93. package/dist/modules/stock/payment.d.ts +22 -0
  94. package/dist/modules/stock/payment.js +210 -0
  95. package/dist/modules/stock/plot.d.ts +32 -0
  96. package/dist/modules/stock/plot.js +238 -0
  97. package/dist/modules/stock/preSale.d.ts +11 -0
  98. package/dist/modules/stock/preSale.js +125 -0
  99. package/dist/modules/stock/preSaleProduct.d.ts +4 -0
  100. package/dist/modules/stock/preSaleProduct.js +70 -0
  101. package/dist/modules/stock/primaryColor.d.ts +13 -0
  102. package/dist/modules/stock/primaryColor.js +140 -0
  103. package/dist/modules/stock/product.d.ts +30 -0
  104. package/dist/modules/stock/product.js +239 -0
  105. package/dist/modules/stock/productAttribute.d.ts +12 -0
  106. package/dist/modules/stock/productAttribute.js +127 -0
  107. package/dist/modules/stock/productCategory.d.ts +13 -0
  108. package/dist/modules/stock/productCategory.js +140 -0
  109. package/dist/modules/stock/productColor.d.ts +12 -0
  110. package/dist/modules/stock/productColor.js +127 -0
  111. package/dist/modules/stock/productImage.d.ts +14 -0
  112. package/dist/modules/stock/productImage.js +130 -0
  113. package/dist/modules/stock/productName.d.ts +13 -0
  114. package/dist/modules/stock/productName.js +140 -0
  115. package/dist/modules/stock/productNamePreset.d.ts +13 -0
  116. package/dist/modules/stock/productNamePreset.js +140 -0
  117. package/dist/modules/stock/productPart.d.ts +14 -0
  118. package/dist/modules/stock/productPart.js +139 -0
  119. package/dist/modules/stock/productSubCategory.d.ts +13 -0
  120. package/dist/modules/stock/productSubCategory.js +139 -0
  121. package/dist/modules/stock/productUse.d.ts +13 -0
  122. package/dist/modules/stock/productUse.js +140 -0
  123. package/dist/modules/stock/productUseAssoc.d.ts +12 -0
  124. package/dist/modules/stock/productUseAssoc.js +126 -0
  125. package/dist/modules/stock/promotion.d.ts +13 -0
  126. package/dist/modules/stock/promotion.js +140 -0
  127. package/dist/modules/stock/promotionAssoc.d.ts +12 -0
  128. package/dist/modules/stock/promotionAssoc.js +127 -0
  129. package/dist/modules/stock/providerCurrentAccount.d.ts +5 -0
  130. package/dist/modules/stock/providerCurrentAccount.js +61 -0
  131. package/dist/modules/stock/queryList.d.ts +11 -0
  132. package/dist/modules/stock/queryList.js +116 -0
  133. package/dist/modules/stock/queryParameter.d.ts +8 -0
  134. package/dist/modules/stock/queryParameter.js +105 -0
  135. package/dist/modules/stock/returnReason.d.ts +6 -0
  136. package/dist/modules/stock/returnReason.js +92 -0
  137. package/dist/modules/stock/similarProduct.d.ts +12 -0
  138. package/dist/modules/stock/similarProduct.js +127 -0
  139. package/dist/modules/stock/stockMovement.d.ts +8 -0
  140. package/dist/modules/stock/stockMovement.js +75 -0
  141. package/dist/modules/stock/topMenu.d.ts +5 -0
  142. package/dist/modules/stock/topMenu.js +61 -0
  143. package/dist/modules/stock/typeOfInventory.d.ts +13 -0
  144. package/dist/modules/stock/typeOfInventory.js +140 -0
  145. package/dist/modules/stock/typeOfLocation.d.ts +13 -0
  146. package/dist/modules/stock/typeOfLocation.js +140 -0
  147. package/dist/modules/stock/unitOfMeasure.d.ts +13 -0
  148. package/dist/modules/stock/unitOfMeasure.js +140 -0
  149. package/dist/modules/stock/vatTax.d.ts +13 -0
  150. package/dist/modules/stock/vatTax.js +140 -0
  151. package/dist/modules/stock/vatTaxZone.d.ts +14 -0
  152. package/dist/modules/stock/vatTaxZone.js +140 -0
  153. package/dist/modules/stock/vatValidation.d.ts +4 -0
  154. package/dist/modules/stock/vatValidation.js +63 -0
  155. package/dist/modules/stock/websiteRequest.d.ts +10 -0
  156. package/dist/modules/stock/websiteRequest.js +96 -0
  157. package/dist/modules/stock/workflow.d.ts +8 -0
  158. package/dist/modules/stock/workflow.js +103 -0
  159. package/dist/modules/user/address.d.ts +12 -0
  160. package/dist/modules/user/address.js +127 -0
  161. package/dist/modules/user/bankData.d.ts +12 -0
  162. package/dist/modules/user/bankData.js +127 -0
  163. package/dist/modules/user/clientType.d.ts +12 -0
  164. package/dist/modules/user/clientType.js +127 -0
  165. package/dist/modules/user/clients.d.ts +17 -0
  166. package/dist/modules/user/clients.js +140 -0
  167. package/dist/modules/user/commissioner.d.ts +15 -0
  168. package/dist/modules/user/commissioner.js +140 -0
  169. package/dist/modules/user/contactTypes.d.ts +12 -0
  170. package/dist/modules/user/contactTypes.js +127 -0
  171. package/dist/modules/user/contacts.d.ts +14 -0
  172. package/dist/modules/user/contacts.js +149 -0
  173. package/dist/modules/user/country.d.ts +12 -0
  174. package/dist/modules/user/country.js +140 -0
  175. package/dist/modules/user/deliveryMethods.d.ts +8 -0
  176. package/dist/modules/user/deliveryMethods.js +116 -0
  177. package/dist/modules/user/entityList.d.ts +7 -0
  178. package/dist/modules/user/entityList.js +105 -0
  179. package/dist/modules/user/favorites.d.ts +7 -0
  180. package/dist/modules/user/favorites.js +92 -0
  181. package/dist/modules/user/groupPermission.d.ts +7 -0
  182. package/dist/modules/user/groupPermission.js +94 -0
  183. package/dist/modules/user/index.d.ts +3 -0
  184. package/dist/modules/user/index.js +8 -0
  185. package/dist/modules/user/language.d.ts +12 -0
  186. package/dist/modules/user/language.js +127 -0
  187. package/dist/modules/user/logout.d.ts +2 -0
  188. package/dist/modules/user/logout.js +58 -0
  189. package/dist/modules/user/maturityDates.d.ts +8 -0
  190. package/dist/modules/user/maturityDates.js +116 -0
  191. package/dist/modules/user/password.d.ts +5 -0
  192. package/dist/modules/user/password.js +68 -0
  193. package/dist/modules/user/paymentCondition.d.ts +11 -0
  194. package/dist/modules/user/paymentCondition.js +127 -0
  195. package/dist/modules/user/paymentMethods.d.ts +8 -0
  196. package/dist/modules/user/paymentMethods.js +116 -0
  197. package/dist/modules/user/permission.d.ts +7 -0
  198. package/dist/modules/user/permission.js +94 -0
  199. package/dist/modules/user/provider.d.ts +15 -0
  200. package/dist/modules/user/provider.js +153 -0
  201. package/dist/modules/user/providerType.d.ts +12 -0
  202. package/dist/modules/user/providerType.js +127 -0
  203. package/dist/modules/user/purchaseCondition.d.ts +12 -0
  204. package/dist/modules/user/purchaseCondition.js +127 -0
  205. package/dist/modules/user/reasonForExemption.d.ts +12 -0
  206. package/dist/modules/user/reasonForExemption.js +127 -0
  207. package/dist/modules/user/refreshToken.d.ts +5 -0
  208. package/dist/modules/user/refreshToken.js +59 -0
  209. package/dist/modules/user/segmentsArea.d.ts +12 -0
  210. package/dist/modules/user/segmentsArea.js +127 -0
  211. package/dist/modules/user/sessions.d.ts +5 -0
  212. package/dist/modules/user/sessions.js +59 -0
  213. package/dist/modules/user/shippings.d.ts +11 -0
  214. package/dist/modules/user/shippings.js +127 -0
  215. package/dist/modules/user/socialMedia.d.ts +11 -0
  216. package/dist/modules/user/socialMedia.js +127 -0
  217. package/dist/modules/user/storeOperator.d.ts +16 -0
  218. package/dist/modules/user/storeOperator.js +151 -0
  219. package/dist/modules/user/swift.d.ts +12 -0
  220. package/dist/modules/user/swift.js +127 -0
  221. package/dist/modules/user/tenant.d.ts +6 -0
  222. package/dist/modules/user/tenant.js +92 -0
  223. package/dist/modules/user/user.d.ts +18 -0
  224. package/dist/modules/user/user.js +151 -0
  225. package/dist/modules/user/userPermission.d.ts +7 -0
  226. package/dist/modules/user/userPermission.js +83 -0
  227. package/dist/modules/user/userPositions.d.ts +12 -0
  228. package/dist/modules/user/userPositions.js +127 -0
  229. package/dist/modules/user/userToken.d.ts +9 -0
  230. package/dist/modules/user/userToken.js +116 -0
  231. package/dist/modules/user/vehicles.d.ts +6 -0
  232. package/dist/modules/user/vehicles.js +92 -0
  233. package/dist/modules/user/zipCode.d.ts +6 -0
  234. package/dist/modules/user/zipCode.js +69 -0
  235. package/dist/shared/client.d.ts +2 -0
  236. package/dist/shared/client.js +9 -0
  237. package/package.json +13 -8
  238. package/.editorconfig +0 -9
  239. package/.eslintignore +0 -3
  240. package/.eslintrc.json +0 -51
  241. package/.nvmrc +0 -1
  242. package/package-lock.json +0 -6181
  243. package/prettier.config.js +0 -5
  244. package/src/modules/documentManagement/index.ts +0 -6
  245. package/src/modules/documentManagement/multimedia.ts +0 -33
  246. package/src/modules/integration/dynamicData.ts +0 -45
  247. package/src/modules/integration/field.ts +0 -38
  248. package/src/modules/integration/fieldGroup.ts +0 -68
  249. package/src/modules/integration/file.ts +0 -30
  250. package/src/modules/integration/history.ts +0 -30
  251. package/src/modules/integration/index.ts +0 -6
  252. package/src/modules/integration/observation.ts +0 -43
  253. package/src/modules/integration/observationType.ts +0 -55
  254. package/src/modules/integration/task.ts +0 -66
  255. package/src/modules/integration/taskAttachment.ts +0 -26
  256. package/src/modules/integration/taskGroup.ts +0 -45
  257. package/src/modules/integration/taskNote.ts +0 -39
  258. package/src/modules/print/index.ts +0 -10
  259. package/src/modules/print/npc.ts +0 -24
  260. package/src/modules/print/printer.ts +0 -26
  261. package/src/modules/print/schedulePrintJob.ts +0 -75
  262. package/src/modules/stock/attribute.ts +0 -101
  263. package/src/modules/stock/attributeValue.ts +0 -91
  264. package/src/modules/stock/cabide.ts +0 -105
  265. package/src/modules/stock/cabideProduct.ts +0 -67
  266. package/src/modules/stock/clientCurrentAccount.ts +0 -22
  267. package/src/modules/stock/color.ts +0 -90
  268. package/src/modules/stock/composition.ts +0 -81
  269. package/src/modules/stock/compositionMaterial.ts +0 -92
  270. package/src/modules/stock/documentHeader.ts +0 -324
  271. package/src/modules/stock/documentLine.ts +0 -89
  272. package/src/modules/stock/documentLineAssoc.ts +0 -117
  273. package/src/modules/stock/documentLineFolder.ts +0 -43
  274. package/src/modules/stock/documentLineState.ts +0 -66
  275. package/src/modules/stock/documentLineStateCriteria.ts +0 -90
  276. package/src/modules/stock/documentSet.ts +0 -53
  277. package/src/modules/stock/documentType.ts +0 -68
  278. package/src/modules/stock/externalDocumentHeader.ts +0 -85
  279. package/src/modules/stock/externalDocumentType.ts +0 -26
  280. package/src/modules/stock/index.ts +0 -8
  281. package/src/modules/stock/location.ts +0 -91
  282. package/src/modules/stock/maintenance.ts +0 -91
  283. package/src/modules/stock/maintenanceAssoc.ts +0 -81
  284. package/src/modules/stock/maintenancePreset.ts +0 -55
  285. package/src/modules/stock/maintenancePresetAssoc.ts +0 -42
  286. package/src/modules/stock/maintenanceType.ts +0 -92
  287. package/src/modules/stock/moloniRequest.ts +0 -18
  288. package/src/modules/stock/orderManagement.ts +0 -41
  289. package/src/modules/stock/payment.ts +0 -161
  290. package/src/modules/stock/plot.ts +0 -196
  291. package/src/modules/stock/preSale.ts +0 -76
  292. package/src/modules/stock/preSaleProduct.ts +0 -23
  293. package/src/modules/stock/primaryColor.ts +0 -92
  294. package/src/modules/stock/product.ts +0 -197
  295. package/src/modules/stock/productAttribute.ts +0 -81
  296. package/src/modules/stock/productCategory.ts +0 -92
  297. package/src/modules/stock/productColor.ts +0 -81
  298. package/src/modules/stock/productImage.ts +0 -86
  299. package/src/modules/stock/productName.ts +0 -92
  300. package/src/modules/stock/productNamePreset.ts +0 -92
  301. package/src/modules/stock/productPart.ts +0 -91
  302. package/src/modules/stock/productSubCategory.ts +0 -90
  303. package/src/modules/stock/productUse.ts +0 -92
  304. package/src/modules/stock/productUseAssoc.ts +0 -78
  305. package/src/modules/stock/promotion.ts +0 -93
  306. package/src/modules/stock/promotionAssoc.ts +0 -81
  307. package/src/modules/stock/providerCurrentAccount.ts +0 -22
  308. package/src/modules/stock/queryList.ts +0 -61
  309. package/src/modules/stock/queryParameter.ts +0 -50
  310. package/src/modules/stock/returnReason.ts +0 -40
  311. package/src/modules/stock/similarProduct.ts +0 -81
  312. package/src/modules/stock/stockMovement.ts +0 -32
  313. package/src/modules/stock/topMenu.ts +0 -22
  314. package/src/modules/stock/typeOfInventory.ts +0 -92
  315. package/src/modules/stock/typeOfLocation.ts +0 -92
  316. package/src/modules/stock/unitOfMeasure.ts +0 -92
  317. package/src/modules/stock/vatTax.ts +0 -92
  318. package/src/modules/stock/vatTaxZone.ts +0 -94
  319. package/src/modules/stock/vatValidation.ts +0 -20
  320. package/src/modules/stock/websiteRequest.ts +0 -51
  321. package/src/modules/stock/workflow.ts +0 -50
  322. package/src/modules/user/address.ts +0 -81
  323. package/src/modules/user/bankData.ts +0 -81
  324. package/src/modules/user/clientType.ts +0 -80
  325. package/src/modules/user/clients.ts +0 -100
  326. package/src/modules/user/commissioner.ts +0 -96
  327. package/src/modules/user/contactTypes.ts +0 -80
  328. package/src/modules/user/contacts.ts +0 -100
  329. package/src/modules/user/country.ts +0 -90
  330. package/src/modules/user/deliveryMethods.ts +0 -60
  331. package/src/modules/user/entityList.ts +0 -42
  332. package/src/modules/user/favorites.ts +0 -36
  333. package/src/modules/user/groupPermission.ts +0 -44
  334. package/src/modules/user/index.ts +0 -8
  335. package/src/modules/user/language.ts +0 -80
  336. package/src/modules/user/logout.ts +0 -12
  337. package/src/modules/user/maturityDates.ts +0 -60
  338. package/src/modules/user/password.ts +0 -21
  339. package/src/modules/user/paymentCondition.ts +0 -79
  340. package/src/modules/user/paymentMethods.ts +0 -60
  341. package/src/modules/user/permission.ts +0 -44
  342. package/src/modules/user/provider.ts +0 -106
  343. package/src/modules/user/providerType.ts +0 -80
  344. package/src/modules/user/purchaseCondition.ts +0 -82
  345. package/src/modules/user/reasonForExemption.ts +0 -80
  346. package/src/modules/user/refreshToken.ts +0 -18
  347. package/src/modules/user/segmentsArea.ts +0 -80
  348. package/src/modules/user/sessions.ts +0 -18
  349. package/src/modules/user/shippings.ts +0 -79
  350. package/src/modules/user/socialMedia.ts +0 -79
  351. package/src/modules/user/storeOperator.ts +0 -104
  352. package/src/modules/user/swift.ts +0 -80
  353. package/src/modules/user/tenant.ts +0 -36
  354. package/src/modules/user/user.ts +0 -111
  355. package/src/modules/user/userPermission.ts +0 -37
  356. package/src/modules/user/userPositions.ts +0 -80
  357. package/src/modules/user/userToken.ts +0 -69
  358. package/src/modules/user/vehicles.ts +0 -40
  359. package/src/modules/user/zipCode.ts +0 -23
  360. package/src/shared/client.ts +0 -5
  361. package/tsconfig.json +0 -19
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.createInventory = exports.printLabelToPdfUrl = exports.printLabelToPdf = exports.printLabel = exports.foldPlot = exports.unfoldPlot = exports.findPlotsInPrisonProviders = exports.findPlotsInPrison = exports.findById = exports.findByOwnerId = exports.removePlotFromPrison = exports.putPlotInPrison = exports.checkPlotInPrison = exports.checkPlotsToReturn = exports.findInventoryLossesProviders = exports.findInventoryLosses = exports.disassociatePlot = exports.findPlotsToReturnProviders = exports.findPlotsToReturn = exports.publicRoute = exports.route = exports.checkPlotsToReturnOptions = exports.checkPlotInPrisonOptions = void 0;
43
+ var types_1 = require("@nomalism-com/types");
44
+ var client_1 = __importDefault(require("../../shared/client"));
45
+ var _1 = require(".");
46
+ exports.checkPlotInPrisonOptions = types_1.Plot.checkPlotInPrisonOptions;
47
+ exports.checkPlotsToReturnOptions = types_1.Plot.checkPlotsToReturnOptions;
48
+ exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "plot/");
49
+ exports.publicRoute = "".concat(_1.serviceHostname).concat(_1.servicePublicPath, "plot/");
50
+ var repository = {
51
+ findPlotsToReturn: function (params) { return __awaiter(void 0, void 0, void 0, function () {
52
+ var response;
53
+ return __generator(this, function (_a) {
54
+ switch (_a.label) {
55
+ case 0: return [4, client_1.default.get("".concat(exports.route, "plots_to_return"), { params: params })];
56
+ case 1:
57
+ response = _a.sent();
58
+ return [2, response.data];
59
+ }
60
+ });
61
+ }); },
62
+ findPlotsToReturnProviders: function () { return __awaiter(void 0, void 0, void 0, function () {
63
+ var response;
64
+ return __generator(this, function (_a) {
65
+ switch (_a.label) {
66
+ case 0: return [4, client_1.default.get("".concat(exports.route, "plots_to_return_providers"))];
67
+ case 1:
68
+ response = _a.sent();
69
+ return [2, response.data];
70
+ }
71
+ });
72
+ }); },
73
+ disassociatePlot: function (params) { return __awaiter(void 0, void 0, void 0, function () {
74
+ var response;
75
+ return __generator(this, function (_a) {
76
+ switch (_a.label) {
77
+ case 0: return [4, client_1.default.post("".concat(exports.route, "disassociate_plot"), { params: params })];
78
+ case 1:
79
+ response = _a.sent();
80
+ return [2, response.data];
81
+ }
82
+ });
83
+ }); },
84
+ findInventoryLosses: function () { return __awaiter(void 0, void 0, void 0, function () {
85
+ var response;
86
+ return __generator(this, function (_a) {
87
+ switch (_a.label) {
88
+ case 0: return [4, client_1.default.get("".concat(exports.route, "inventory_losses"))];
89
+ case 1:
90
+ response = _a.sent();
91
+ return [2, response.data];
92
+ }
93
+ });
94
+ }); },
95
+ findInventoryLossesProviders: function () { return __awaiter(void 0, void 0, void 0, function () {
96
+ var response;
97
+ return __generator(this, function (_a) {
98
+ switch (_a.label) {
99
+ case 0: return [4, client_1.default.get("".concat(exports.route, "inventory_losses_providers"))];
100
+ case 1:
101
+ response = _a.sent();
102
+ return [2, response.data];
103
+ }
104
+ });
105
+ }); },
106
+ putPlotInPrison: function (data) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var response;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0: return [4, client_1.default.post("".concat(exports.route, "put_in_prison"), data)];
111
+ case 1:
112
+ response = _a.sent();
113
+ return [2, response.data];
114
+ }
115
+ });
116
+ }); },
117
+ removePlotFromPrison: function (data) { return __awaiter(void 0, void 0, void 0, function () {
118
+ var response;
119
+ return __generator(this, function (_a) {
120
+ switch (_a.label) {
121
+ case 0: return [4, client_1.default.post("".concat(exports.route, "remove_from_prison"), data)];
122
+ case 1:
123
+ response = _a.sent();
124
+ return [2, response.data];
125
+ }
126
+ });
127
+ }); },
128
+ findById: function (id) { return __awaiter(void 0, void 0, void 0, function () {
129
+ var response;
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0: return [4, client_1.default.get("".concat(exports.route).concat(id))];
133
+ case 1:
134
+ response = _a.sent();
135
+ return [2, response.data];
136
+ }
137
+ });
138
+ }); },
139
+ findByOwnerId: function (params) { return __awaiter(void 0, void 0, void 0, function () {
140
+ var response;
141
+ return __generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0: return [4, client_1.default.get("".concat(exports.route, "by_owner"), {
144
+ params: params,
145
+ })];
146
+ case 1:
147
+ response = _a.sent();
148
+ return [2, response.data];
149
+ }
150
+ });
151
+ }); },
152
+ findPlotsInPrison: function () { return __awaiter(void 0, void 0, void 0, function () {
153
+ var response;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0: return [4, client_1.default.get("".concat(exports.route, "in_prison"), {})];
157
+ case 1:
158
+ response = _a.sent();
159
+ return [2, response.data];
160
+ }
161
+ });
162
+ }); },
163
+ findPlotsInPrisonProviders: function () { return __awaiter(void 0, void 0, void 0, function () {
164
+ var response;
165
+ return __generator(this, function (_a) {
166
+ switch (_a.label) {
167
+ case 0: return [4, client_1.default.get("".concat(exports.route, "in_prison_providers"), {})];
168
+ case 1:
169
+ response = _a.sent();
170
+ return [2, response.data];
171
+ }
172
+ });
173
+ }); },
174
+ unfoldPlot: function (data) { return __awaiter(void 0, void 0, void 0, function () {
175
+ var response;
176
+ return __generator(this, function (_a) {
177
+ switch (_a.label) {
178
+ case 0: return [4, client_1.default.post("".concat(exports.route, "unfold_plot"), data)];
179
+ case 1:
180
+ response = _a.sent();
181
+ return [2, response.data];
182
+ }
183
+ });
184
+ }); },
185
+ foldPlot: function (data) { return __awaiter(void 0, void 0, void 0, function () {
186
+ var response;
187
+ return __generator(this, function (_a) {
188
+ switch (_a.label) {
189
+ case 0: return [4, client_1.default.post("".concat(exports.route, "fold_plot"), data)];
190
+ case 1:
191
+ response = _a.sent();
192
+ return [2, response.data];
193
+ }
194
+ });
195
+ }); },
196
+ checkPlotInPrison: function (data) { return __awaiter(void 0, void 0, void 0, function () {
197
+ return __generator(this, function (_a) {
198
+ return [2, client_1.default.post("".concat(exports.route, "check_in_prison"), data)];
199
+ });
200
+ }); },
201
+ checkPlotsToReturn: function (data) { return __awaiter(void 0, void 0, void 0, function () {
202
+ return __generator(this, function (_a) {
203
+ switch (_a.label) {
204
+ case 0: return [4, client_1.default.post("".concat(exports.route, "check_to_return"), data)];
205
+ case 1:
206
+ _a.sent();
207
+ return [2];
208
+ }
209
+ });
210
+ }); },
211
+ printLabel: function (params) { return __awaiter(void 0, void 0, void 0, function () {
212
+ return __generator(this, function (_a) {
213
+ switch (_a.label) {
214
+ case 0: return [4, client_1.default.post("".concat(exports.route, "print_label"), params)];
215
+ case 1:
216
+ _a.sent();
217
+ return [2];
218
+ }
219
+ });
220
+ }); },
221
+ printLabelToPdf: function (params) { return __awaiter(void 0, void 0, void 0, function () {
222
+ return __generator(this, function (_a) {
223
+ switch (_a.label) {
224
+ case 0: return [4, client_1.default.get("".concat(exports.publicRoute, "print_label_pdf/").concat(params))];
225
+ case 1:
226
+ _a.sent();
227
+ return [2];
228
+ }
229
+ });
230
+ }); },
231
+ printLabelToPdfUrl: function (params) {
232
+ return "".concat(exports.publicRoute, "print_label_pdf?").concat(new URLSearchParams(params));
233
+ },
234
+ createInventory: function (data) {
235
+ return client_1.default.post("".concat(exports.route, "inventory"), data);
236
+ },
237
+ };
238
+ exports.findPlotsToReturn = repository.findPlotsToReturn, exports.findPlotsToReturnProviders = repository.findPlotsToReturnProviders, exports.disassociatePlot = repository.disassociatePlot, exports.findInventoryLosses = repository.findInventoryLosses, exports.findInventoryLossesProviders = repository.findInventoryLossesProviders, exports.checkPlotsToReturn = repository.checkPlotsToReturn, exports.checkPlotInPrison = repository.checkPlotInPrison, exports.putPlotInPrison = repository.putPlotInPrison, exports.removePlotFromPrison = repository.removePlotFromPrison, exports.findByOwnerId = repository.findByOwnerId, exports.findById = repository.findById, exports.findPlotsInPrison = repository.findPlotsInPrison, exports.findPlotsInPrisonProviders = repository.findPlotsInPrisonProviders, exports.unfoldPlot = repository.unfoldPlot, exports.foldPlot = repository.foldPlot, exports.printLabel = repository.printLabel, exports.printLabelToPdf = repository.printLabelToPdf, exports.printLabelToPdfUrl = repository.printLabelToPdfUrl, exports.createInventory = repository.createInventory;
@@ -0,0 +1,11 @@
1
+ import { shared, PreSale as Entity } from '@nomalism-com/types';
2
+ export import IFindResponse = Entity.IFindResponse;
3
+ export import IFindResponseWithQuantityOfPlots = Entity.IFindResponseWithQuantityOfPlots;
4
+ export import ICreateRequest = Entity.ICreateRequest;
5
+ export import IEntityExtended = Entity.IEntityExtended;
6
+ export import IUpdateRequest = Entity.IUpdateRequest;
7
+ export import IRemovePlotOrPreSaleProductRequest = Entity.IRemovePlotOrPreSaleProductRequest;
8
+ export import IImportToClientProposalRequest = Entity.IImportToClientProposalRequest;
9
+ export type IPaginationResponse = shared.IPaginationResponse<Entity.IFindResponse>;
10
+ export declare const route: string;
11
+ export declare const find: () => Promise<IFindResponseWithQuantityOfPlots[]>, findById: (selector: shared.IFindByIdRequest) => Promise<IEntityExtended | null>, create: (body: ICreateRequest) => Promise<IFindResponse>, update: (selector: shared.IFindByIdRequest, body: IUpdateRequest) => Promise<IFindResponse | null>, removePlot: (selector: shared.IFindByIdRequest, body: IRemovePlotOrPreSaleProductRequest) => Promise<void>, findPending: () => Promise<IEntityExtended[]>, importToClientProposal: (data: IImportToClientProposalRequest) => Promise<void>;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.importToClientProposal = exports.findPending = exports.removePlot = exports.update = exports.create = exports.findById = exports.find = exports.route = void 0;
43
+ var client_1 = __importDefault(require("../../shared/client"));
44
+ var _1 = require(".");
45
+ exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "pre_sale/");
46
+ var repository = {
47
+ find: function () { return __awaiter(void 0, void 0, void 0, function () {
48
+ var response;
49
+ return __generator(this, function (_a) {
50
+ switch (_a.label) {
51
+ case 0: return [4, client_1.default.get("".concat(exports.route))];
52
+ case 1:
53
+ response = _a.sent();
54
+ return [2, response.data];
55
+ }
56
+ });
57
+ }); },
58
+ findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
59
+ var response;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4, client_1.default.get("".concat(exports.route).concat(selector.id))];
63
+ case 1:
64
+ response = _a.sent();
65
+ return [2, response.data];
66
+ }
67
+ });
68
+ }); },
69
+ findPending: function () { return __awaiter(void 0, void 0, void 0, function () {
70
+ var response;
71
+ return __generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0: return [4, client_1.default.get("".concat(exports.route, "pending"))];
74
+ case 1:
75
+ response = _a.sent();
76
+ return [2, response.data];
77
+ }
78
+ });
79
+ }); },
80
+ create: function (body) { return __awaiter(void 0, void 0, void 0, function () {
81
+ var response;
82
+ return __generator(this, function (_a) {
83
+ switch (_a.label) {
84
+ case 0: return [4, client_1.default.post("".concat(exports.route), body)];
85
+ case 1:
86
+ response = _a.sent();
87
+ return [2, response.data];
88
+ }
89
+ });
90
+ }); },
91
+ update: function (selector, body) { return __awaiter(void 0, void 0, void 0, function () {
92
+ var response;
93
+ return __generator(this, function (_a) {
94
+ switch (_a.label) {
95
+ case 0: return [4, client_1.default.put("".concat(exports.route).concat(selector.id), body)];
96
+ case 1:
97
+ response = _a.sent();
98
+ return [2, response.data];
99
+ }
100
+ });
101
+ }); },
102
+ removePlot: function (selector, body) { return __awaiter(void 0, void 0, void 0, function () {
103
+ var response;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0: return [4, client_1.default.put("".concat(exports.route, "plot/").concat(selector.id), body)];
107
+ case 1:
108
+ response = _a.sent();
109
+ return [2, response.data];
110
+ }
111
+ });
112
+ }); },
113
+ importToClientProposal: function (data) { return __awaiter(void 0, void 0, void 0, function () {
114
+ var response;
115
+ return __generator(this, function (_a) {
116
+ switch (_a.label) {
117
+ case 0: return [4, client_1.default.post("".concat(exports.route, "client_proposal"), data)];
118
+ case 1:
119
+ response = _a.sent();
120
+ return [2, response.data];
121
+ }
122
+ });
123
+ }); },
124
+ };
125
+ exports.find = repository.find, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.removePlot = repository.removePlot, exports.findPending = repository.findPending, exports.importToClientProposal = repository.importToClientProposal;
@@ -0,0 +1,4 @@
1
+ import { shared, PreSaleProduct as Entity } from '@nomalism-com/types';
2
+ export import IFindResponse = Entity.Entity;
3
+ export declare const route: string;
4
+ export declare const find: () => Promise<IFindResponse[]>, findById: (selector: shared.IFindByIdRequest) => Promise<IFindResponse | null>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.findById = exports.find = exports.route = void 0;
43
+ var client_1 = __importDefault(require("../../shared/client"));
44
+ var _1 = require(".");
45
+ exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "pre_sale_product/");
46
+ var repository = {
47
+ find: function () { return __awaiter(void 0, void 0, void 0, function () {
48
+ var response;
49
+ return __generator(this, function (_a) {
50
+ switch (_a.label) {
51
+ case 0: return [4, client_1.default.get("".concat(exports.route))];
52
+ case 1:
53
+ response = _a.sent();
54
+ return [2, response.data];
55
+ }
56
+ });
57
+ }); },
58
+ findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
59
+ var response;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4, client_1.default.get("".concat(exports.route).concat(selector.id))];
63
+ case 1:
64
+ response = _a.sent();
65
+ return [2, response.data];
66
+ }
67
+ });
68
+ }); },
69
+ };
70
+ exports.find = repository.find, exports.findById = repository.findById;
@@ -0,0 +1,13 @@
1
+ import { shared, PrimaryColor as Entity } from '@nomalism-com/types';
2
+ export import IFindRequest = Entity.IFindRequest;
3
+ export import IFindResponse = Entity.IFindResponse;
4
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
5
+ export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
6
+ export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
7
+ export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
8
+ export import ICreateRequest = Entity.ICreateRequest;
9
+ export import IEntity = Entity.Entity;
10
+ export import IUpdateRequest = Entity.IUpdateRequest;
11
+ export type IPaginationResponse = shared.IPaginationResponse<Entity.IFindResponse>;
12
+ export declare const route: string;
13
+ export declare const find: (selector: Entity.IFindRequest) => Promise<Entity.IFindResponse[]>, findPaginated: (selector: Entity.IFindPaginatedRequest) => Promise<Entity.IFindWithPaginationResponse>, findMinified: (params?: shared.IFindMinifiedRequest | undefined) => Promise<shared.IFindMinifiedResponse[]>, findByOwnerId: (params: shared.IFindByOwnerIdRequest) => Promise<Entity.IFindByOwnerIdResponse[]>, findById: (selector: shared.IFindByIdRequest) => Promise<Entity.IFindByIdResponse | null>, create: (data: Entity.ICreateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").PrimaryColor>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").PrimaryColor | null>, deleteOne: (selector: shared.IFindByIdRequest, data?: shared.WithUpdatedBy | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").PrimaryColor | null>;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.deleteOne = exports.update = exports.create = exports.findById = exports.findByOwnerId = exports.findMinified = exports.findPaginated = exports.find = exports.route = void 0;
43
+ var client_1 = __importDefault(require("../../shared/client"));
44
+ var _1 = require(".");
45
+ exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "primary_color/");
46
+ var repository = {
47
+ find: function (params) { return __awaiter(void 0, void 0, void 0, function () {
48
+ var response;
49
+ return __generator(this, function (_a) {
50
+ switch (_a.label) {
51
+ case 0: return [4, client_1.default.get("".concat(exports.route), { params: params })];
52
+ case 1:
53
+ response = _a.sent();
54
+ return [2, response.data];
55
+ }
56
+ });
57
+ }); },
58
+ findPaginated: function (params) { return __awaiter(void 0, void 0, void 0, function () {
59
+ var response;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4, client_1.default.get("".concat(exports.route, "paginated"), { params: params })];
63
+ case 1:
64
+ response = _a.sent();
65
+ return [2, response.data];
66
+ }
67
+ });
68
+ }); },
69
+ findMinified: function (params) { return __awaiter(void 0, void 0, void 0, function () {
70
+ var response;
71
+ return __generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0: return [4, client_1.default.get("".concat(exports.route, "minified"), {
74
+ params: params,
75
+ })];
76
+ case 1:
77
+ response = _a.sent();
78
+ return [2, response.data];
79
+ }
80
+ });
81
+ }); },
82
+ findByOwnerId: function (params) { return __awaiter(void 0, void 0, void 0, function () {
83
+ var response;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0: return [4, client_1.default.get("".concat(exports.route, "by_owner"), {
87
+ params: params,
88
+ })];
89
+ case 1:
90
+ response = _a.sent();
91
+ return [2, response.data];
92
+ }
93
+ });
94
+ }); },
95
+ findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
96
+ var response;
97
+ return __generator(this, function (_a) {
98
+ switch (_a.label) {
99
+ case 0: return [4, client_1.default.get("".concat(exports.route).concat(selector.id))];
100
+ case 1:
101
+ response = _a.sent();
102
+ return [2, response.data];
103
+ }
104
+ });
105
+ }); },
106
+ create: function (body) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var response;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0: return [4, client_1.default.post("".concat(exports.route), body)];
111
+ case 1:
112
+ response = _a.sent();
113
+ return [2, response.data];
114
+ }
115
+ });
116
+ }); },
117
+ update: function (selector, body) { return __awaiter(void 0, void 0, void 0, function () {
118
+ var response;
119
+ return __generator(this, function (_a) {
120
+ switch (_a.label) {
121
+ case 0: return [4, client_1.default.put("".concat(exports.route).concat(selector.id), body)];
122
+ case 1:
123
+ response = _a.sent();
124
+ return [2, response.data];
125
+ }
126
+ });
127
+ }); },
128
+ deleteOne: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
129
+ var response;
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0: return [4, client_1.default.delete("".concat(exports.route).concat(selector.id))];
133
+ case 1:
134
+ response = _a.sent();
135
+ return [2, response.data];
136
+ }
137
+ });
138
+ }); },
139
+ };
140
+ exports.find = repository.find, exports.findPaginated = repository.findPaginated, exports.findMinified = repository.findMinified, exports.findByOwnerId = repository.findByOwnerId, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne;
@@ -0,0 +1,30 @@
1
+ import { shared, Product as Entity } from '@nomalism-com/types';
2
+ export import IEntity = Entity.Entity;
3
+ export import ProductTypeEnum = Entity.ProductTypeEnum;
4
+ export import IProductType = Entity.IProductType;
5
+ export import productTypes = Entity.productTypes;
6
+ export import IPrintLabel = Entity.IPrintLabel;
7
+ export import IFindRequest = Entity.IFindRequest;
8
+ export import IFindResponse = Entity.IFindResponse;
9
+ export import IEntityExtended = Entity.IEntityExtended;
10
+ export import IFindByReferenceRequest = Entity.IFindByReferenceRequest;
11
+ export import IFindByIdResponse = Entity.IFindByIdResponse;
12
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
13
+ export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
14
+ export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
15
+ export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
16
+ export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
17
+ export import IBasicSearchRequest = Entity.IBasicSearchRequest;
18
+ export import IBasicSearchResponse = Entity.IBasicSearchResponse;
19
+ export import ICreateRequest = Entity.ICreateRequest;
20
+ export import IUpdateRequest = Entity.IUpdateRequest;
21
+ export import IBulkUpdateRequest = Entity.IBulkUpdateRequest;
22
+ export import IUpdateManyResponse = shared.IUpdateManyResponse;
23
+ export import IProductVirtuals = Entity.IProductVirtuals;
24
+ export import IProductPromotionVirtuals = Entity.IProductPromotionVirtuals;
25
+ export import IFindOrCreateProductionProductRequest = Entity.IFindOrCreateProductionProductRequest;
26
+ export import IFindByProductType = Entity.IFindByProductType;
27
+ export type IPaginationResponse = shared.IPaginationResponse<Entity.IFindResponse>;
28
+ export declare const route: string;
29
+ export declare const publicRoute: string;
30
+ export declare const find: (selector: Entity.IFindRequest) => Promise<Entity.IFindResponse[]>, findPaginated: (selector: Entity.IFindPaginatedRequest) => Promise<Entity.IFindWithPaginationResponse>, findMinified: (params?: shared.IFindMinifiedRequest | undefined) => Promise<shared.IFindMinifiedResponse[]>, findByOwnerId: (params: shared.IFindByOwnerIdRequest) => Promise<Entity.IFindByOwnerIdResponse[]>, findById: (selector: shared.IFindByIdRequest) => Promise<Entity.IFindByIdResponse | null>, findByRef: (selector: Entity.IFindByReferenceRequest) => Promise<Entity.IEntityExtended | null>, findOrCreateProductionProduct: (selector: Entity.IFindOrCreateProductionProductRequest, user_id: string, location_id: string) => Promise<Entity.IFindResponse>, create: (data: Entity.ICreateRequest) => Promise<Entity.IFindResponse>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<Entity.IFindResponse | null>, deleteOne: (selector: shared.IFindByIdRequest, data?: shared.WithUpdatedBy | undefined) => Promise<Entity.IFindResponse | null>, basicSearch: (params: Entity.IBasicSearchRequest) => Promise<shared.IPaginationResponse<Entity.IBasicSearchResponse>>, bulkUpdate: (data: Entity.IBulkUpdateRequest) => Promise<shared.IUpdateManyResponse>, printLabel: (selector: Entity.IPrintLabel) => Promise<void>, printLabelToPdf: (selector: shared.IFindByIdRequest) => Promise<void>, printLabelToPdfUrl: (params: shared.IFindByIdRequest) => string, findByPlot: (selector: shared.IFindByIdRequest) => Promise<Entity.IEntityExtended | null>;