@nomalism-com/api 0.8.16 → 0.8.19

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 (362) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.json +51 -0
  4. package/.nvmrc +1 -0
  5. package/package-lock.json +6181 -0
  6. package/package.json +7 -12
  7. package/prettier.config.js +5 -0
  8. package/{dist/index.d.ts → src/index.ts} +118 -1
  9. package/src/modules/documentManagement/index.ts +6 -0
  10. package/src/modules/documentManagement/multimedia.ts +33 -0
  11. package/src/modules/integration/dynamicData.ts +45 -0
  12. package/src/modules/integration/field.ts +38 -0
  13. package/src/modules/integration/fieldGroup.ts +68 -0
  14. package/src/modules/integration/file.ts +30 -0
  15. package/src/modules/integration/history.ts +30 -0
  16. package/src/modules/integration/index.ts +6 -0
  17. package/src/modules/integration/observation.ts +43 -0
  18. package/src/modules/integration/observationType.ts +55 -0
  19. package/src/modules/integration/task.ts +66 -0
  20. package/src/modules/integration/taskAttachment.ts +26 -0
  21. package/src/modules/integration/taskGroup.ts +45 -0
  22. package/src/modules/integration/taskNote.ts +39 -0
  23. package/src/modules/print/index.ts +10 -0
  24. package/src/modules/print/npc.ts +24 -0
  25. package/src/modules/print/printer.ts +26 -0
  26. package/src/modules/print/schedulePrintJob.ts +75 -0
  27. package/src/modules/stock/attribute.ts +101 -0
  28. package/src/modules/stock/attributeValue.ts +91 -0
  29. package/src/modules/stock/cabide.ts +105 -0
  30. package/src/modules/stock/cabideProduct.ts +67 -0
  31. package/src/modules/stock/clientCurrentAccount.ts +22 -0
  32. package/src/modules/stock/color.ts +90 -0
  33. package/src/modules/stock/composition.ts +81 -0
  34. package/src/modules/stock/compositionMaterial.ts +92 -0
  35. package/src/modules/stock/documentHeader.ts +324 -0
  36. package/src/modules/stock/documentLine.ts +89 -0
  37. package/src/modules/stock/documentLineAssoc.ts +117 -0
  38. package/src/modules/stock/documentLineFolder.ts +43 -0
  39. package/src/modules/stock/documentLineState.ts +66 -0
  40. package/src/modules/stock/documentLineStateCriteria.ts +90 -0
  41. package/src/modules/stock/documentSet.ts +53 -0
  42. package/src/modules/stock/documentType.ts +68 -0
  43. package/src/modules/stock/externalDocumentHeader.ts +85 -0
  44. package/src/modules/stock/externalDocumentType.ts +26 -0
  45. package/src/modules/stock/index.ts +8 -0
  46. package/src/modules/stock/location.ts +91 -0
  47. package/src/modules/stock/maintenance.ts +91 -0
  48. package/src/modules/stock/maintenanceAssoc.ts +81 -0
  49. package/src/modules/stock/maintenancePreset.ts +55 -0
  50. package/src/modules/stock/maintenancePresetAssoc.ts +42 -0
  51. package/src/modules/stock/maintenanceType.ts +92 -0
  52. package/src/modules/stock/moloniRequest.ts +18 -0
  53. package/src/modules/stock/orderManagement.ts +41 -0
  54. package/src/modules/stock/payment.ts +161 -0
  55. package/src/modules/stock/plot.ts +196 -0
  56. package/src/modules/stock/preSale.ts +76 -0
  57. package/src/modules/stock/preSaleProduct.ts +23 -0
  58. package/src/modules/stock/primaryColor.ts +92 -0
  59. package/src/modules/stock/product.ts +197 -0
  60. package/src/modules/stock/productAttribute.ts +81 -0
  61. package/src/modules/stock/productCategory.ts +92 -0
  62. package/src/modules/stock/productColor.ts +81 -0
  63. package/src/modules/stock/productImage.ts +86 -0
  64. package/src/modules/stock/productName.ts +92 -0
  65. package/src/modules/stock/productNamePreset.ts +92 -0
  66. package/src/modules/stock/productPart.ts +91 -0
  67. package/src/modules/stock/productSubCategory.ts +90 -0
  68. package/src/modules/stock/productUse.ts +92 -0
  69. package/src/modules/stock/productUseAssoc.ts +78 -0
  70. package/src/modules/stock/promotion.ts +93 -0
  71. package/src/modules/stock/promotionAssoc.ts +81 -0
  72. package/src/modules/stock/providerCurrentAccount.ts +22 -0
  73. package/src/modules/stock/queryList.ts +61 -0
  74. package/src/modules/stock/queryParameter.ts +50 -0
  75. package/src/modules/stock/returnReason.ts +40 -0
  76. package/src/modules/stock/similarProduct.ts +81 -0
  77. package/src/modules/stock/stockMovement.ts +32 -0
  78. package/src/modules/stock/topMenu.ts +22 -0
  79. package/src/modules/stock/typeOfInventory.ts +92 -0
  80. package/src/modules/stock/typeOfLocation.ts +92 -0
  81. package/src/modules/stock/unitOfMeasure.ts +92 -0
  82. package/src/modules/stock/vatTax.ts +92 -0
  83. package/src/modules/stock/vatTaxZone.ts +94 -0
  84. package/src/modules/stock/vatValidation.ts +20 -0
  85. package/src/modules/stock/websiteRequest.ts +51 -0
  86. package/src/modules/stock/workflow.ts +50 -0
  87. package/src/modules/user/address.ts +81 -0
  88. package/src/modules/user/bankData.ts +81 -0
  89. package/src/modules/user/clientType.ts +80 -0
  90. package/src/modules/user/clients.ts +100 -0
  91. package/src/modules/user/commissioner.ts +96 -0
  92. package/src/modules/user/contactTypes.ts +80 -0
  93. package/src/modules/user/contacts.ts +100 -0
  94. package/src/modules/user/country.ts +90 -0
  95. package/src/modules/user/deliveryMethods.ts +60 -0
  96. package/src/modules/user/entityList.ts +42 -0
  97. package/src/modules/user/favorites.ts +36 -0
  98. package/src/modules/user/groupPermission.ts +44 -0
  99. package/src/modules/user/index.ts +8 -0
  100. package/src/modules/user/language.ts +80 -0
  101. package/src/modules/user/logout.ts +12 -0
  102. package/src/modules/user/maturityDates.ts +60 -0
  103. package/src/modules/user/password.ts +21 -0
  104. package/src/modules/user/paymentCondition.ts +79 -0
  105. package/src/modules/user/paymentMethods.ts +60 -0
  106. package/src/modules/user/permission.ts +44 -0
  107. package/src/modules/user/provider.ts +106 -0
  108. package/src/modules/user/providerType.ts +80 -0
  109. package/src/modules/user/purchaseCondition.ts +82 -0
  110. package/src/modules/user/reasonForExemption.ts +80 -0
  111. package/src/modules/user/refreshToken.ts +18 -0
  112. package/src/modules/user/segmentsArea.ts +80 -0
  113. package/src/modules/user/sessions.ts +18 -0
  114. package/src/modules/user/shippings.ts +79 -0
  115. package/src/modules/user/socialMedia.ts +79 -0
  116. package/src/modules/user/storeOperator.ts +104 -0
  117. package/src/modules/user/swift.ts +80 -0
  118. package/src/modules/user/tenant.ts +36 -0
  119. package/src/modules/user/user.ts +111 -0
  120. package/src/modules/user/userPermission.ts +37 -0
  121. package/src/modules/user/userPositions.ts +80 -0
  122. package/src/modules/user/userToken.ts +69 -0
  123. package/src/modules/user/vehicles.ts +40 -0
  124. package/src/modules/user/zipCode.ts +23 -0
  125. package/src/shared/client.ts +5 -0
  126. package/tsconfig.json +19 -0
  127. package/dist/index.js +0 -256
  128. package/dist/modules/documentManagement/index.d.ts +0 -2
  129. package/dist/modules/documentManagement/index.js +0 -7
  130. package/dist/modules/documentManagement/multimedia.d.ts +0 -5
  131. package/dist/modules/documentManagement/multimedia.js +0 -69
  132. package/dist/modules/integration/dynamicData.d.ts +0 -8
  133. package/dist/modules/integration/dynamicData.js +0 -103
  134. package/dist/modules/integration/field.d.ts +0 -26
  135. package/dist/modules/integration/field.js +0 -93
  136. package/dist/modules/integration/fieldGroup.d.ts +0 -12
  137. package/dist/modules/integration/fieldGroup.js +0 -119
  138. package/dist/modules/integration/file.d.ts +0 -5
  139. package/dist/modules/integration/file.js +0 -83
  140. package/dist/modules/integration/history.d.ts +0 -11
  141. package/dist/modules/integration/history.js +0 -66
  142. package/dist/modules/integration/index.d.ts +0 -2
  143. package/dist/modules/integration/index.js +0 -7
  144. package/dist/modules/integration/observation.d.ts +0 -8
  145. package/dist/modules/integration/observation.js +0 -94
  146. package/dist/modules/integration/observationType.d.ts +0 -10
  147. package/dist/modules/integration/observationType.js +0 -107
  148. package/dist/modules/integration/task.d.ts +0 -10
  149. package/dist/modules/integration/task.js +0 -113
  150. package/dist/modules/integration/taskAttachment.d.ts +0 -7
  151. package/dist/modules/integration/taskAttachment.js +0 -72
  152. package/dist/modules/integration/taskGroup.d.ts +0 -8
  153. package/dist/modules/integration/taskGroup.js +0 -103
  154. package/dist/modules/integration/taskNote.d.ts +0 -8
  155. package/dist/modules/integration/taskNote.js +0 -92
  156. package/dist/modules/print/index.d.ts +0 -4
  157. package/dist/modules/print/index.js +0 -9
  158. package/dist/modules/print/npc.d.ts +0 -5
  159. package/dist/modules/print/npc.js +0 -70
  160. package/dist/modules/print/printer.d.ts +0 -6
  161. package/dist/modules/print/printer.js +0 -70
  162. package/dist/modules/print/schedulePrintJob.d.ts +0 -8
  163. package/dist/modules/print/schedulePrintJob.js +0 -139
  164. package/dist/modules/stock/attribute.d.ts +0 -16
  165. package/dist/modules/stock/attribute.js +0 -145
  166. package/dist/modules/stock/attributeValue.d.ts +0 -12
  167. package/dist/modules/stock/attributeValue.js +0 -140
  168. package/dist/modules/stock/cabide.d.ts +0 -15
  169. package/dist/modules/stock/cabide.js +0 -152
  170. package/dist/modules/stock/cabideProduct.d.ts +0 -10
  171. package/dist/modules/stock/cabideProduct.js +0 -127
  172. package/dist/modules/stock/clientCurrentAccount.d.ts +0 -5
  173. package/dist/modules/stock/clientCurrentAccount.js +0 -61
  174. package/dist/modules/stock/color.d.ts +0 -13
  175. package/dist/modules/stock/color.js +0 -139
  176. package/dist/modules/stock/composition.d.ts +0 -12
  177. package/dist/modules/stock/composition.js +0 -127
  178. package/dist/modules/stock/compositionMaterial.d.ts +0 -13
  179. package/dist/modules/stock/compositionMaterial.js +0 -140
  180. package/dist/modules/stock/documentHeader.d.ts +0 -45
  181. package/dist/modules/stock/documentHeader.js +0 -361
  182. package/dist/modules/stock/documentLine.d.ts +0 -14
  183. package/dist/modules/stock/documentLine.js +0 -123
  184. package/dist/modules/stock/documentLineAssoc.d.ts +0 -20
  185. package/dist/modules/stock/documentLineAssoc.js +0 -154
  186. package/dist/modules/stock/documentLineFolder.d.ts +0 -6
  187. package/dist/modules/stock/documentLineFolder.js +0 -92
  188. package/dist/modules/stock/documentLineState.d.ts +0 -10
  189. package/dist/modules/stock/documentLineState.js +0 -114
  190. package/dist/modules/stock/documentLineStateCriteria.d.ts +0 -20
  191. package/dist/modules/stock/documentLineStateCriteria.js +0 -124
  192. package/dist/modules/stock/documentSet.d.ts +0 -8
  193. package/dist/modules/stock/documentSet.js +0 -114
  194. package/dist/modules/stock/documentType.d.ts +0 -14
  195. package/dist/modules/stock/documentType.js +0 -119
  196. package/dist/modules/stock/externalDocumentHeader.d.ts +0 -15
  197. package/dist/modules/stock/externalDocumentHeader.js +0 -135
  198. package/dist/modules/stock/externalDocumentType.d.ts +0 -6
  199. package/dist/modules/stock/externalDocumentType.js +0 -70
  200. package/dist/modules/stock/index.d.ts +0 -3
  201. package/dist/modules/stock/index.js +0 -8
  202. package/dist/modules/stock/location.d.ts +0 -12
  203. package/dist/modules/stock/location.js +0 -140
  204. package/dist/modules/stock/maintenance.d.ts +0 -12
  205. package/dist/modules/stock/maintenance.js +0 -140
  206. package/dist/modules/stock/maintenanceAssoc.d.ts +0 -12
  207. package/dist/modules/stock/maintenanceAssoc.js +0 -127
  208. package/dist/modules/stock/maintenancePreset.d.ts +0 -10
  209. package/dist/modules/stock/maintenancePreset.js +0 -114
  210. package/dist/modules/stock/maintenancePresetAssoc.d.ts +0 -8
  211. package/dist/modules/stock/maintenancePresetAssoc.js +0 -91
  212. package/dist/modules/stock/maintenanceType.d.ts +0 -13
  213. package/dist/modules/stock/maintenanceType.js +0 -140
  214. package/dist/modules/stock/moloniRequest.d.ts +0 -5
  215. package/dist/modules/stock/moloniRequest.js +0 -59
  216. package/dist/modules/stock/orderManagement.d.ts +0 -11
  217. package/dist/modules/stock/orderManagement.js +0 -88
  218. package/dist/modules/stock/payment.d.ts +0 -22
  219. package/dist/modules/stock/payment.js +0 -210
  220. package/dist/modules/stock/plot.d.ts +0 -32
  221. package/dist/modules/stock/plot.js +0 -240
  222. package/dist/modules/stock/preSale.d.ts +0 -11
  223. package/dist/modules/stock/preSale.js +0 -125
  224. package/dist/modules/stock/preSaleProduct.d.ts +0 -4
  225. package/dist/modules/stock/preSaleProduct.js +0 -70
  226. package/dist/modules/stock/primaryColor.d.ts +0 -13
  227. package/dist/modules/stock/primaryColor.js +0 -140
  228. package/dist/modules/stock/product.d.ts +0 -30
  229. package/dist/modules/stock/product.js +0 -241
  230. package/dist/modules/stock/productAttribute.d.ts +0 -12
  231. package/dist/modules/stock/productAttribute.js +0 -127
  232. package/dist/modules/stock/productCategory.d.ts +0 -13
  233. package/dist/modules/stock/productCategory.js +0 -140
  234. package/dist/modules/stock/productColor.d.ts +0 -12
  235. package/dist/modules/stock/productColor.js +0 -127
  236. package/dist/modules/stock/productImage.d.ts +0 -14
  237. package/dist/modules/stock/productImage.js +0 -132
  238. package/dist/modules/stock/productName.d.ts +0 -13
  239. package/dist/modules/stock/productName.js +0 -140
  240. package/dist/modules/stock/productNamePreset.d.ts +0 -13
  241. package/dist/modules/stock/productNamePreset.js +0 -140
  242. package/dist/modules/stock/productPart.d.ts +0 -14
  243. package/dist/modules/stock/productPart.js +0 -139
  244. package/dist/modules/stock/productSubCategory.d.ts +0 -13
  245. package/dist/modules/stock/productSubCategory.js +0 -139
  246. package/dist/modules/stock/productUse.d.ts +0 -13
  247. package/dist/modules/stock/productUse.js +0 -140
  248. package/dist/modules/stock/productUseAssoc.d.ts +0 -12
  249. package/dist/modules/stock/productUseAssoc.js +0 -126
  250. package/dist/modules/stock/promotion.d.ts +0 -13
  251. package/dist/modules/stock/promotion.js +0 -140
  252. package/dist/modules/stock/promotionAssoc.d.ts +0 -12
  253. package/dist/modules/stock/promotionAssoc.js +0 -127
  254. package/dist/modules/stock/providerCurrentAccount.d.ts +0 -5
  255. package/dist/modules/stock/providerCurrentAccount.js +0 -61
  256. package/dist/modules/stock/queryList.d.ts +0 -11
  257. package/dist/modules/stock/queryList.js +0 -116
  258. package/dist/modules/stock/queryParameter.d.ts +0 -8
  259. package/dist/modules/stock/queryParameter.js +0 -106
  260. package/dist/modules/stock/returnReason.d.ts +0 -6
  261. package/dist/modules/stock/returnReason.js +0 -92
  262. package/dist/modules/stock/similarProduct.d.ts +0 -12
  263. package/dist/modules/stock/similarProduct.js +0 -127
  264. package/dist/modules/stock/stockMovement.d.ts +0 -8
  265. package/dist/modules/stock/stockMovement.js +0 -75
  266. package/dist/modules/stock/topMenu.d.ts +0 -5
  267. package/dist/modules/stock/topMenu.js +0 -61
  268. package/dist/modules/stock/typeOfInventory.d.ts +0 -13
  269. package/dist/modules/stock/typeOfInventory.js +0 -140
  270. package/dist/modules/stock/typeOfLocation.d.ts +0 -13
  271. package/dist/modules/stock/typeOfLocation.js +0 -140
  272. package/dist/modules/stock/unitOfMeasure.d.ts +0 -13
  273. package/dist/modules/stock/unitOfMeasure.js +0 -140
  274. package/dist/modules/stock/vatTax.d.ts +0 -13
  275. package/dist/modules/stock/vatTax.js +0 -140
  276. package/dist/modules/stock/vatTaxZone.d.ts +0 -14
  277. package/dist/modules/stock/vatTaxZone.js +0 -140
  278. package/dist/modules/stock/vatValidation.d.ts +0 -4
  279. package/dist/modules/stock/vatValidation.js +0 -63
  280. package/dist/modules/stock/websiteRequest.d.ts +0 -10
  281. package/dist/modules/stock/websiteRequest.js +0 -97
  282. package/dist/modules/stock/workflow.d.ts +0 -8
  283. package/dist/modules/stock/workflow.js +0 -103
  284. package/dist/modules/user/address.d.ts +0 -12
  285. package/dist/modules/user/address.js +0 -127
  286. package/dist/modules/user/bankData.d.ts +0 -12
  287. package/dist/modules/user/bankData.js +0 -127
  288. package/dist/modules/user/clientType.d.ts +0 -12
  289. package/dist/modules/user/clientType.js +0 -127
  290. package/dist/modules/user/clients.d.ts +0 -17
  291. package/dist/modules/user/clients.js +0 -140
  292. package/dist/modules/user/commissioner.d.ts +0 -15
  293. package/dist/modules/user/commissioner.js +0 -140
  294. package/dist/modules/user/contactTypes.d.ts +0 -12
  295. package/dist/modules/user/contactTypes.js +0 -127
  296. package/dist/modules/user/contacts.d.ts +0 -14
  297. package/dist/modules/user/contacts.js +0 -149
  298. package/dist/modules/user/country.d.ts +0 -12
  299. package/dist/modules/user/country.js +0 -140
  300. package/dist/modules/user/deliveryMethods.d.ts +0 -8
  301. package/dist/modules/user/deliveryMethods.js +0 -116
  302. package/dist/modules/user/entityList.d.ts +0 -7
  303. package/dist/modules/user/entityList.js +0 -106
  304. package/dist/modules/user/favorites.d.ts +0 -7
  305. package/dist/modules/user/favorites.js +0 -92
  306. package/dist/modules/user/groupPermission.d.ts +0 -7
  307. package/dist/modules/user/groupPermission.js +0 -94
  308. package/dist/modules/user/index.d.ts +0 -3
  309. package/dist/modules/user/index.js +0 -8
  310. package/dist/modules/user/language.d.ts +0 -12
  311. package/dist/modules/user/language.js +0 -127
  312. package/dist/modules/user/logout.d.ts +0 -2
  313. package/dist/modules/user/logout.js +0 -58
  314. package/dist/modules/user/maturityDates.d.ts +0 -8
  315. package/dist/modules/user/maturityDates.js +0 -116
  316. package/dist/modules/user/password.d.ts +0 -5
  317. package/dist/modules/user/password.js +0 -68
  318. package/dist/modules/user/paymentCondition.d.ts +0 -11
  319. package/dist/modules/user/paymentCondition.js +0 -127
  320. package/dist/modules/user/paymentMethods.d.ts +0 -8
  321. package/dist/modules/user/paymentMethods.js +0 -116
  322. package/dist/modules/user/permission.d.ts +0 -7
  323. package/dist/modules/user/permission.js +0 -94
  324. package/dist/modules/user/provider.d.ts +0 -15
  325. package/dist/modules/user/provider.js +0 -153
  326. package/dist/modules/user/providerType.d.ts +0 -12
  327. package/dist/modules/user/providerType.js +0 -127
  328. package/dist/modules/user/purchaseCondition.d.ts +0 -12
  329. package/dist/modules/user/purchaseCondition.js +0 -127
  330. package/dist/modules/user/reasonForExemption.d.ts +0 -12
  331. package/dist/modules/user/reasonForExemption.js +0 -127
  332. package/dist/modules/user/refreshToken.d.ts +0 -5
  333. package/dist/modules/user/refreshToken.js +0 -59
  334. package/dist/modules/user/segmentsArea.d.ts +0 -12
  335. package/dist/modules/user/segmentsArea.js +0 -127
  336. package/dist/modules/user/sessions.d.ts +0 -5
  337. package/dist/modules/user/sessions.js +0 -59
  338. package/dist/modules/user/shippings.d.ts +0 -11
  339. package/dist/modules/user/shippings.js +0 -127
  340. package/dist/modules/user/socialMedia.d.ts +0 -11
  341. package/dist/modules/user/socialMedia.js +0 -127
  342. package/dist/modules/user/storeOperator.d.ts +0 -16
  343. package/dist/modules/user/storeOperator.js +0 -151
  344. package/dist/modules/user/swift.d.ts +0 -12
  345. package/dist/modules/user/swift.js +0 -127
  346. package/dist/modules/user/tenant.d.ts +0 -6
  347. package/dist/modules/user/tenant.js +0 -92
  348. package/dist/modules/user/user.d.ts +0 -18
  349. package/dist/modules/user/user.js +0 -151
  350. package/dist/modules/user/userPermission.d.ts +0 -7
  351. package/dist/modules/user/userPermission.js +0 -83
  352. package/dist/modules/user/userPositions.d.ts +0 -12
  353. package/dist/modules/user/userPositions.js +0 -127
  354. package/dist/modules/user/userToken.d.ts +0 -9
  355. package/dist/modules/user/userToken.js +0 -116
  356. package/dist/modules/user/vehicles.d.ts +0 -6
  357. package/dist/modules/user/vehicles.js +0 -92
  358. package/dist/modules/user/zipCode.d.ts +0 -6
  359. package/dist/modules/user/zipCode.js +0 -69
  360. package/dist/shared/client.d.ts +0 -2
  361. package/dist/shared/client.js +0 -9
  362. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,45 @@
1
+ import { TasksGroup as Entity, shared } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, servicePath } from '.';
4
+
5
+ export import IFindDetailedResponse = Entity.IFindDetailedResponse;
6
+
7
+ export import IFindAndCountResponse = Entity.IFindAndCountResponse;
8
+
9
+ export import ICreateRequest = Entity.ICreateRequest;
10
+
11
+ export import IUpdateRequest = Entity.IUpdateRequest;
12
+ export import IEntity = Entity.Entity;
13
+
14
+ export const route = `${serviceHostname}${servicePath}task_group/`;
15
+
16
+ const repository: Omit<Entity.IRepository, 'findById' | 'exists'> = {
17
+ findDetailed: async (): Promise<IFindDetailedResponse[]> => {
18
+ const response = await api.get(`${route}`);
19
+ return response.data;
20
+ },
21
+ findAndCount: async (): Promise<IFindAndCountResponse[]> => {
22
+ const response = await api.get(`${route}find_and_count`);
23
+ return response.data;
24
+ },
25
+ create: async (body: ICreateRequest): Promise<IFindDetailedResponse> => {
26
+ const response = await api.post(`${route}`, body);
27
+ return response.data;
28
+ },
29
+ update: async (
30
+ selector: shared.IFindByIdRequest,
31
+ body: IUpdateRequest,
32
+ ): Promise<IEntity | null> => {
33
+ const response = await api.put(`${route}${selector.id}`, body);
34
+ return response.data;
35
+ },
36
+ deleteOne: async (
37
+ selector: shared.IFindByIdRequest,
38
+ ): Promise<IEntity | null> => {
39
+ const response = await api.delete(`${route}${selector.id}`);
40
+ return response.data;
41
+ },
42
+ };
43
+
44
+ export const { findDetailed, findAndCount, create, update, deleteOne } =
45
+ repository;
@@ -0,0 +1,39 @@
1
+ import { TaskNote as Entity, shared } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, servicePath } from '.';
4
+
5
+ export import IFindRequest = Entity.IFindRequest;
6
+ export import IFindResponse = Entity.IFindResponse;
7
+
8
+ export import ICreateRequest = Entity.ICreateRequest;
9
+ export import IEntity = Entity.Entity;
10
+
11
+ export import IUpdateRequest = Entity.IUpdateRequest;
12
+
13
+ export const route = `${serviceHostname}${servicePath}task_note/`;
14
+
15
+ const repository: Omit<Entity.IRepository, 'findById'> = {
16
+ findByTaskId: async (params: IFindRequest): Promise<IFindResponse[]> => {
17
+ const response = await api.get(`${route}`, { params });
18
+ return response.data;
19
+ },
20
+ create: async (body: ICreateRequest): Promise<IEntity> => {
21
+ const response = await api.post(`${route}`, body);
22
+ return response.data;
23
+ },
24
+ update: async (
25
+ selector: shared.IFindByIdRequest,
26
+ body: IUpdateRequest,
27
+ ): Promise<IEntity | null> => {
28
+ const response = await api.put(`${route}${selector.id}`, body);
29
+ return response.data;
30
+ },
31
+ deleteOne: async (
32
+ selector: shared.IFindByIdRequest,
33
+ ): Promise<IEntity | null> => {
34
+ const response = await api.delete(`${route}${selector.id}`);
35
+ return response.data;
36
+ },
37
+ };
38
+
39
+ export const { findByTaskId, create, update, deleteOne } = repository;
@@ -0,0 +1,10 @@
1
+ export const serviceHostname =
2
+ process.env.REACT_APP_ENV === 'development'
3
+ ? process.env.REACT_APP_PRINT_URL
4
+ : process.env.REACT_APP_API_GATEWAY_URL;
5
+ export const serviceAuthPath =
6
+ process.env.REACT_APP_ENV === 'development' ? '/' : 'print/auth/';
7
+ export const servicePublicPath =
8
+ process.env.REACT_APP_ENV === 'development' ? '/' : 'print/public/';
9
+ export const serviceApiKeyPath =
10
+ process.env.REACT_APP_ENV === 'development' ? '/' : 'print/apikey/';
@@ -0,0 +1,24 @@
1
+ import { shared, Npc as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ export import IEntity = Entity.Entity;
6
+ export import IUpdateRequest = Entity.IUpdateRequest;
7
+
8
+ export const route = `${serviceHostname}${serviceAuthPath}npc/`;
9
+
10
+ const repository: Entity.IRepository = {
11
+ find: async (): Promise<IEntity[]> => {
12
+ const response = await api.get(`${route}`);
13
+ return response.data;
14
+ },
15
+ update: async (
16
+ selector: shared.IFindByIdRequest,
17
+ body: IUpdateRequest,
18
+ ): Promise<IEntity | null> => {
19
+ const response = await api.put(`${route}${selector.id}`, body);
20
+ return response.data;
21
+ },
22
+ };
23
+
24
+ export const { update, find } = repository;
@@ -0,0 +1,26 @@
1
+ import { shared, Printer as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ export import IEntity = Entity.Entity;
6
+ export import IUpdateRequest = Entity.IUpdateRequest;
7
+
8
+ export const route = `${serviceHostname}${serviceAuthPath}printer/`;
9
+
10
+ export type IFindDetailedResponse = Entity.IFindDetailedResponse;
11
+
12
+ const repository: Entity.IRepository = {
13
+ find: async (): Promise<IFindDetailedResponse[]> => {
14
+ const response = await api.get(`${route}`);
15
+ return response.data;
16
+ },
17
+ update: async (
18
+ selector: shared.IFindByIdRequest,
19
+ body: IUpdateRequest,
20
+ ): Promise<IEntity | null> => {
21
+ const response = await api.put(`${route}${selector.id}`, body);
22
+ return response.data;
23
+ },
24
+ };
25
+
26
+ export const { update, find } = repository;
@@ -0,0 +1,75 @@
1
+ import { shared, SchedulePrintJob as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath, serviceApiKeyPath } from '.';
4
+
5
+ export import IEntity = Entity.Entity;
6
+ export import ICreateSchedulePrintJobRequest = Entity.ICreateSchedulePrintJobRequest;
7
+ export import IDispatchSchedulePrintJobRequest = Entity.IDispatchSchedulePrintJobRequest;
8
+ export import IFindScheduleResponse = Entity.IFindScheduleResponse;
9
+
10
+ export const route = `${serviceHostname}${serviceAuthPath}schedule_print_job/`;
11
+ export const apiKeyRooute = `${serviceHostname}${serviceApiKeyPath}schedule_print_job/`;
12
+
13
+ interface IRoutes {
14
+ auth: Entity.IController;
15
+ apiKey: Entity.IController;
16
+ }
17
+
18
+ const routes: IRoutes = {
19
+ auth: {
20
+ create: async (body: ICreateSchedulePrintJobRequest): Promise<IEntity> => {
21
+ const response = await api.post(`${route}`, body);
22
+ return response.data;
23
+ },
24
+
25
+ deleteOne: async (selector: shared.IFindByIdRequest): Promise<void> => {
26
+ await api.delete(`${route}${selector.id}`);
27
+ },
28
+
29
+ dispatchSchedulePrintJob: async (
30
+ body: IDispatchSchedulePrintJobRequest,
31
+ ): Promise<IFindScheduleResponse> => {
32
+ const response = await api.post(
33
+ `${route}dispatch_schedule_print_job`,
34
+ body,
35
+ );
36
+ return response.data;
37
+ },
38
+
39
+ findByOwner: async (
40
+ params: shared.IFindByOwnerIdRequest,
41
+ ): Promise<IEntity[]> => {
42
+ const response = await api.get(`${route}`, { params });
43
+ return response.data;
44
+ },
45
+ },
46
+ apiKey: {
47
+ create: async (body: ICreateSchedulePrintJobRequest): Promise<IEntity> => {
48
+ const response = await api.post(`${apiKeyRooute}`, body);
49
+ return response.data;
50
+ },
51
+
52
+ deleteOne: async (selector: shared.IFindByIdRequest): Promise<void> => {
53
+ await api.delete(`${apiKeyRooute}${selector.id}`);
54
+ },
55
+
56
+ dispatchSchedulePrintJob: async (
57
+ body: IDispatchSchedulePrintJobRequest,
58
+ ): Promise<IFindScheduleResponse> => {
59
+ const response = await api.post(
60
+ `${apiKeyRooute}dispatch_schedule_print_job`,
61
+ body,
62
+ );
63
+ return response.data;
64
+ },
65
+
66
+ findByOwner: async (
67
+ params: shared.IFindByOwnerIdRequest,
68
+ ): Promise<IEntity[]> => {
69
+ const response = await api.get(`${apiKeyRooute}`, { params });
70
+ return response.data;
71
+ },
72
+ },
73
+ };
74
+
75
+ export const { apiKey, auth } = routes;
@@ -0,0 +1,101 @@
1
+ import { shared, Attribute as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
+ export import IAttributeDatatype = Entity.IAttributeDatatype;
7
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8
+ export import AttributeDatatypeEnum = Entity.AttributeDatatypeEnum;
9
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
+ export import attributeDatatypes = Entity.attributeDatatypes;
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ export import IEntity = Entity.Entity;
14
+
15
+ export import IFindRequest = Entity.IFindRequest;
16
+ export import IFindResponse = Entity.IFindResponse;
17
+
18
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
19
+
20
+ export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
21
+ export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
22
+
23
+ export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
24
+
25
+ export import ICreateRequest = Entity.ICreateRequest;
26
+
27
+ export import IUpdateRequest = Entity.IUpdateRequest;
28
+ export type IPaginationResponse =
29
+ shared.IPaginationResponse<Entity.IFindResponse>;
30
+
31
+ export const route = `${serviceHostname}${serviceAuthPath}attribute/`;
32
+
33
+ const repository: Entity.IRepository = {
34
+ find: async (params: IFindRequest): Promise<IFindResponse[]> => {
35
+ const response = await api.get(`${route}`, { params });
36
+ return response.data;
37
+ },
38
+
39
+ findPaginated: async (
40
+ params: IFindPaginatedRequest,
41
+ ): Promise<IPaginationResponse> => {
42
+ const response = await api.get(`${route}paginated`, { params });
43
+ return response.data;
44
+ },
45
+
46
+ findMinified: async (
47
+ params?: IFindMinifiedRequest,
48
+ ): Promise<IFindMinifiedResponse[]> => {
49
+ const response = await api.get(`${route}minified`, {
50
+ params,
51
+ });
52
+ return response.data;
53
+ },
54
+
55
+ findByOwnerId: async (
56
+ params: IFindByOwnerIdRequest,
57
+ ): Promise<IFindResponse[]> => {
58
+ const response = await api.get(`${route}by_owner`, {
59
+ params,
60
+ });
61
+ return response.data;
62
+ },
63
+
64
+ findById: async (
65
+ selector: shared.IFindByIdRequest,
66
+ ): Promise<IFindResponse | null> => {
67
+ const response = await api.get(`${route}${selector.id}`);
68
+ return response.data;
69
+ },
70
+
71
+ create: async (body: ICreateRequest): Promise<IFindResponse> => {
72
+ const response = await api.post(`${route}`, body);
73
+ return response.data;
74
+ },
75
+
76
+ update: async (
77
+ selector: shared.IFindByIdRequest,
78
+ body: IUpdateRequest,
79
+ ): Promise<IFindResponse | null> => {
80
+ const response = await api.put(`${route}${selector.id}`, body);
81
+ return response.data;
82
+ },
83
+
84
+ deleteOne: async (
85
+ selector: shared.IFindByIdRequest,
86
+ ): Promise<IFindResponse | null> => {
87
+ const response = await api.delete(`${route}${selector.id}`);
88
+ return response.data;
89
+ },
90
+ };
91
+
92
+ export const {
93
+ find,
94
+ findPaginated,
95
+ findMinified,
96
+ findByOwnerId,
97
+ findById,
98
+ create,
99
+ update,
100
+ deleteOne,
101
+ } = repository;
@@ -0,0 +1,91 @@
1
+ import { shared, AttributeValue as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ export import IFindRequest = Entity.IFindRequest;
6
+ export import IFindResponse = Entity.IFindResponse;
7
+
8
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
9
+
10
+ export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
11
+ export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
12
+
13
+ export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
14
+
15
+ export import ICreateRequest = Entity.ICreateRequest;
16
+
17
+ export import IUpdateRequest = Entity.IUpdateRequest;
18
+ export type IPaginationResponse =
19
+ shared.IPaginationResponse<Entity.IFindResponse>;
20
+
21
+ export const route = `${serviceHostname}${serviceAuthPath}attribute_value/`;
22
+
23
+ const repository: Entity.IRepository = {
24
+ find: async (params: IFindRequest): Promise<IFindResponse[]> => {
25
+ const response = await api.get(`${route}`, { params });
26
+ return response.data;
27
+ },
28
+
29
+ findPaginated: async (
30
+ params: IFindPaginatedRequest,
31
+ ): Promise<IPaginationResponse> => {
32
+ const response = await api.get(`${route}paginated`, { params });
33
+ return response.data;
34
+ },
35
+
36
+ findMinified: async (
37
+ params?: IFindMinifiedRequest,
38
+ ): Promise<IFindMinifiedResponse[]> => {
39
+ const response = await api.get(`${route}minified`, {
40
+ params,
41
+ });
42
+ return response.data;
43
+ },
44
+
45
+ findByOwnerId: async (
46
+ params?: IFindByOwnerIdRequest,
47
+ ): Promise<IFindResponse[]> => {
48
+ const response = await api.get(`${route}by_owner`, {
49
+ params,
50
+ });
51
+ return response.data;
52
+ },
53
+
54
+ findById: async (
55
+ selector: shared.IFindByIdRequest,
56
+ ): Promise<IFindResponse | null> => {
57
+ const response = await api.get(`${route}${selector.id}`);
58
+ return response.data;
59
+ },
60
+
61
+ create: async (body: ICreateRequest): Promise<IFindResponse> => {
62
+ const response = await api.post(`${route}`, body);
63
+ return response.data;
64
+ },
65
+
66
+ update: async (
67
+ selector: shared.IFindByIdRequest,
68
+ body: IUpdateRequest,
69
+ ): Promise<IFindResponse | null> => {
70
+ const response = await api.put(`${route}${selector.id}`, body);
71
+ return response.data;
72
+ },
73
+
74
+ deleteOne: async (
75
+ selector: shared.IFindByIdRequest,
76
+ ): Promise<IFindResponse | null> => {
77
+ const response = await api.delete(`${route}${selector.id}`);
78
+ return response.data;
79
+ },
80
+ };
81
+
82
+ export const {
83
+ find,
84
+ findPaginated,
85
+ findMinified,
86
+ findByOwnerId,
87
+ findById,
88
+ create,
89
+ update,
90
+ deleteOne,
91
+ } = repository;
@@ -0,0 +1,105 @@
1
+ import { shared, Cabide as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ export import ICreateRequest = Entity.ICreateRequest;
6
+
7
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8
+ export import IEntity = Entity.Entity;
9
+
10
+ export import IFindResponse = Entity.IFindResponse;
11
+
12
+ export import IFindRequest = Entity.IFindRequest;
13
+
14
+ export import IUpdateRequest = Entity.IUpdateRequest;
15
+
16
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
+ export import cabidesTypesEnum = Entity.cabideTypes;
18
+
19
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
20
+ export import ICabideType = Entity.ICabideType;
21
+
22
+ export import IFindByIdProviderRequest = Entity.IFindByIdProviderRequest;
23
+
24
+ export import IFindByIdProviderResponse = Entity.IFindByIdProviderResponse;
25
+
26
+ export import IFindCabideProvidersResponse = Entity.IFindCabideProvidersResponse;
27
+
28
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
29
+
30
+ export import IFindWithPaginationResponse = Entity.IFindWithPaginationResponse;
31
+
32
+ export const route = `${serviceHostname}${serviceAuthPath}cabide/`;
33
+
34
+ const repository: Entity.IRepository = {
35
+ create: async (body: ICreateRequest): Promise<IEntity> => {
36
+ const response = await api.post(`${route}`, body);
37
+ return response.data;
38
+ },
39
+
40
+ find: async (params: IFindRequest): Promise<IFindResponse[]> => {
41
+ const response = await api.get(`${route}`, { params });
42
+ return response.data;
43
+ },
44
+
45
+ findPaginated: async (
46
+ params: IFindPaginatedRequest,
47
+ ): Promise<IFindWithPaginationResponse> => {
48
+ const response = await api.get(`${route}paginated`, { params });
49
+ return response.data;
50
+ },
51
+
52
+ findById: async (
53
+ selector: shared.IFindByIdRequest,
54
+ ): Promise<IEntity | null> => {
55
+ const response = await api.get(`${route}${selector.id}`);
56
+ return response.data;
57
+ },
58
+
59
+ findByIdProvider: async (
60
+ selector: IFindByIdProviderRequest,
61
+ ): Promise<IFindByIdProviderResponse[]> => {
62
+ const response = await api.get(
63
+ `${route}'/id_provider/${selector.id_provider}`,
64
+ );
65
+ return response.data;
66
+ },
67
+
68
+ print: async (params: shared.IFindByIdRequest): Promise<void> => {
69
+ await api.get(`${route}print_label`, {
70
+ params,
71
+ });
72
+ },
73
+
74
+ findCabideProviders: async (
75
+ params: shared.IFindMinifiedRequest,
76
+ ): Promise<IFindCabideProvidersResponse[]> => {
77
+ const response = await api.get(`${route}cabide_providers`, {
78
+ params,
79
+ });
80
+ return response.data;
81
+ },
82
+
83
+ update: async (
84
+ selector: shared.IFindByIdRequest,
85
+ body: IUpdateRequest,
86
+ ): Promise<IEntity | null> => {
87
+ const response = await api.put(`${route}${selector.id}`, body);
88
+ return response.data;
89
+ },
90
+
91
+ deleteOne: async (selector: shared.IFindByIdRequest): Promise<void> => {
92
+ await api.delete(`${route}${selector.id}`);
93
+ },
94
+ };
95
+
96
+ export const {
97
+ findById,
98
+ create,
99
+ update,
100
+ deleteOne,
101
+ find,
102
+ findPaginated,
103
+ print,
104
+ findCabideProviders,
105
+ } = repository;
@@ -0,0 +1,67 @@
1
+ import { shared, CabideProduct as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import * as Product from './product';
4
+ import { serviceHostname, serviceAuthPath } from '.';
5
+
6
+ export import ICreateRequest = Entity.ICreateRequest;
7
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8
+ export import IEntity = Entity.Entity;
9
+ export import IFindCabideByOwnerResponse = Entity.IFindCabideByOwnerResponse;
10
+
11
+ export import ICreateProductByCabideProductIdRequest = Entity.ICreateProductByCabideProductIdRequest;
12
+
13
+ export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
14
+
15
+ export import IFindWithPaginationResponse = Entity.IFindWithPaginationResponse;
16
+
17
+ export const route = `${serviceHostname}${serviceAuthPath}cabide_product/`;
18
+
19
+ const repository: Entity.IRepository = {
20
+ create: async (body: ICreateRequest): Promise<IEntity> => {
21
+ const response = await api.post(`${route}`, body);
22
+ return response.data;
23
+ },
24
+
25
+ createProductByCabideProductId: async (
26
+ body: ICreateProductByCabideProductIdRequest,
27
+ ): Promise<Product.IEntityExtended> => {
28
+ const response = await api.post(`${route}product`, body);
29
+ return response.data;
30
+ },
31
+
32
+ findByOwner: async (
33
+ selector: shared.IFindByOwnerIdRequest,
34
+ ): Promise<IFindCabideByOwnerResponse[]> => {
35
+ const response = await api.get(`${route}${selector.owner_id}`);
36
+ return response.data;
37
+ },
38
+
39
+ findByOwnerPaginated: async ({
40
+ owner_id,
41
+ ...params
42
+ }: IFindPaginatedRequest): Promise<IFindWithPaginationResponse> => {
43
+ const response = await api.get(`${route}${owner_id}/paginated`, {
44
+ params,
45
+ });
46
+ return response.data;
47
+ },
48
+
49
+ findProductByCabideProductId: async (
50
+ selector: shared.IFindByIdRequest,
51
+ ): Promise<Product.IEntityExtended[]> => {
52
+ const response = await api.get(`${route}product/${selector.id}`);
53
+ return response.data;
54
+ },
55
+
56
+ deleteOne: async (selector: shared.IFindByIdRequest): Promise<void> => {
57
+ await api.delete(`${route}${selector.id}`);
58
+ },
59
+ };
60
+
61
+ export const {
62
+ create,
63
+ deleteOne,
64
+ findByOwner,
65
+ findByOwnerPaginated,
66
+ findProductByCabideProductId,
67
+ } = repository;
@@ -0,0 +1,22 @@
1
+ import { shared, ClientCurrentAccount as Entity } from '@nomalism-com/types';
2
+ import api from '../../shared/client';
3
+ import { serviceHostname, serviceAuthPath } from '.';
4
+
5
+ export import IEntity = Entity.Entity;
6
+
7
+ export import IFindRequest = Entity.IFindRequest;
8
+
9
+ export const route = `${serviceHostname}${serviceAuthPath}client_current_account/`;
10
+
11
+ const repository: Omit<Entity.IRepository, 'find'> = {
12
+ findByOwnerId: async (
13
+ params: IFindRequest,
14
+ ): Promise<shared.IPaginationResponse<IEntity>> => {
15
+ const response = await api.get(`${route}by_owner`, {
16
+ params,
17
+ });
18
+ return response.data;
19
+ },
20
+ };
21
+
22
+ export const { findByOwnerId } = repository;