@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
@@ -1,149 +0,0 @@
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.findByBasic = exports.deleteOne = exports.update = exports.create = exports.findById = exports.findByOwnerId = exports.findPaginated = exports.findMinified = 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, "contact/");
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 /*yield*/, client_1.default.get("".concat(exports.route), { params: params })];
52
- case 1:
53
- response = _a.sent();
54
- return [2 /*return*/, response.data];
55
- }
56
- });
57
- }); },
58
- findMinified: 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 /*yield*/, client_1.default.get("".concat(exports.route, "minified"), { params: params })];
63
- case 1:
64
- response = _a.sent();
65
- return [2 /*return*/, response.data];
66
- }
67
- });
68
- }); },
69
- findPaginated: 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 /*yield*/, client_1.default.get("".concat(exports.route, "paginated"), { params: params })];
74
- case 1:
75
- response = _a.sent();
76
- return [2 /*return*/, response.data];
77
- }
78
- });
79
- }); },
80
- findByOwnerId: function (params) { 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 /*yield*/, client_1.default.get("".concat(exports.route, "by_owner"), {
85
- params: params,
86
- })];
87
- case 1:
88
- response = _a.sent();
89
- return [2 /*return*/, response.data];
90
- }
91
- });
92
- }); },
93
- findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
94
- var response;
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0: return [4 /*yield*/, client_1.default.get("".concat(exports.route).concat(selector.id))];
98
- case 1:
99
- response = _a.sent();
100
- return [2 /*return*/, response.data];
101
- }
102
- });
103
- }); },
104
- create: function (body) { return __awaiter(void 0, void 0, void 0, function () {
105
- var response;
106
- return __generator(this, function (_a) {
107
- switch (_a.label) {
108
- case 0: return [4 /*yield*/, client_1.default.post("".concat(exports.route), body)];
109
- case 1:
110
- response = _a.sent();
111
- return [2 /*return*/, response.data];
112
- }
113
- });
114
- }); },
115
- update: function (selector, body) { return __awaiter(void 0, void 0, void 0, function () {
116
- var response;
117
- return __generator(this, function (_a) {
118
- switch (_a.label) {
119
- case 0: return [4 /*yield*/, client_1.default.put("".concat(exports.route).concat(selector.id), body)];
120
- case 1:
121
- response = _a.sent();
122
- return [2 /*return*/, response.data];
123
- }
124
- });
125
- }); },
126
- deleteOne: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
127
- var response;
128
- return __generator(this, function (_a) {
129
- switch (_a.label) {
130
- case 0: return [4 /*yield*/, client_1.default.delete("".concat(exports.route).concat(selector.id))];
131
- case 1:
132
- response = _a.sent();
133
- return [2 /*return*/, response.data];
134
- }
135
- });
136
- }); },
137
- findByBasic: function (params) { return __awaiter(void 0, void 0, void 0, function () {
138
- var response;
139
- return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0: return [4 /*yield*/, client_1.default.get("".concat(exports.route, "basic_search"), { params: params })];
142
- case 1:
143
- response = _a.sent();
144
- return [2 /*return*/, response.data];
145
- }
146
- });
147
- }); },
148
- };
149
- exports.find = repository.find, exports.findMinified = repository.findMinified, exports.findPaginated = repository.findPaginated, exports.findByOwnerId = repository.findByOwnerId, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne, exports.findByBasic = repository.findByBasic;
@@ -1,12 +0,0 @@
1
- import { shared, Country 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 ICreateRequest = Entity.ICreateRequest;
8
- export import IEntity = Entity.Entity;
9
- export import IUpdateRequest = Entity.IUpdateRequest;
10
- export type IPaginationResponse = shared.IPaginationResponse<Entity.IFindResponse>;
11
- export declare const route: string;
12
- 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[]>, findById: (selector: shared.IFindByIdRequest) => Promise<Entity.IFindByIdResponse | null>, create: (data: Entity.ICreateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Country>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Country | null>, deleteOne: (selector: shared.IFindByIdRequest, data?: shared.WithUpdatedBy | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").Country | null>, findByAlpha2: (params?: shared.IFindMinifiedRequest | undefined) => Promise<shared.IFindMinifiedResponse[]>;
@@ -1,140 +0,0 @@
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.findByAlpha2 = exports.deleteOne = exports.update = exports.create = exports.findById = 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, "country/");
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 /*yield*/, client_1.default.get("".concat(exports.route), { params: params })];
52
- case 1:
53
- response = _a.sent();
54
- return [2 /*return*/, 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 /*yield*/, client_1.default.get("".concat(exports.route, "paginated"), { params: params })];
63
- case 1:
64
- response = _a.sent();
65
- return [2 /*return*/, 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 /*yield*/, client_1.default.get("".concat(exports.route, "minified"), {
74
- params: params,
75
- })];
76
- case 1:
77
- response = _a.sent();
78
- return [2 /*return*/, response.data];
79
- }
80
- });
81
- }); },
82
- findByAlpha2: 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 /*yield*/, client_1.default.get("".concat(exports.route, "alpha2"), {
87
- params: params,
88
- })];
89
- case 1:
90
- response = _a.sent();
91
- return [2 /*return*/, 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 /*yield*/, client_1.default.get("".concat(exports.route).concat(selector.id))];
100
- case 1:
101
- response = _a.sent();
102
- return [2 /*return*/, 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 /*yield*/, client_1.default.post("".concat(exports.route), body)];
111
- case 1:
112
- response = _a.sent();
113
- return [2 /*return*/, 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 /*yield*/, client_1.default.put("".concat(exports.route).concat(selector.id), body)];
122
- case 1:
123
- response = _a.sent();
124
- return [2 /*return*/, 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 /*yield*/, client_1.default.delete("".concat(exports.route).concat(selector.id))];
133
- case 1:
134
- response = _a.sent();
135
- return [2 /*return*/, response.data];
136
- }
137
- });
138
- }); },
139
- };
140
- exports.find = repository.find, exports.findPaginated = repository.findPaginated, exports.findMinified = repository.findMinified, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne, exports.findByAlpha2 = repository.findByAlpha2;
@@ -1,8 +0,0 @@
1
- import { DeliveryMethods as Entity, shared } from '@nomalism-com/types';
2
- export import IEntity = Entity.Entity;
3
- export import ICreateRequest = Entity.ICreateRequest;
4
- export import IUpdateRequest = Entity.IUpdateRequest;
5
- export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
6
- export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
7
- export declare const route: string;
8
- export declare const find: () => Promise<import("@nomalism-com/types/dist/shared/entities").DeliveryMethods[]>, findMinified: (params?: shared.IFindMinifiedRequest | undefined) => Promise<shared.IFindMinifiedResponse[]>, findById: (selector: shared.IFindByIdRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").DeliveryMethods | null>, create: (data: Entity.ICreateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").DeliveryMethods>, update: (selector: shared.IFindByIdRequest, body: Entity.IUpdateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").DeliveryMethods | null>, deleteOne: (selector: shared.IFindByIdRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").DeliveryMethods | null>;
@@ -1,116 +0,0 @@
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.findMinified = 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, "delivery_methods/");
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 /*yield*/, client_1.default.get("".concat(exports.route))];
52
- case 1:
53
- response = _a.sent();
54
- return [2 /*return*/, response.data];
55
- }
56
- });
57
- }); },
58
- findMinified: 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 /*yield*/, client_1.default.get("".concat(exports.route, "minified"), {
63
- params: params,
64
- })];
65
- case 1:
66
- response = _a.sent();
67
- return [2 /*return*/, response.data];
68
- }
69
- });
70
- }); },
71
- findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
72
- var response;
73
- return __generator(this, function (_a) {
74
- switch (_a.label) {
75
- case 0: return [4 /*yield*/, client_1.default.get("".concat(exports.route).concat(selector.id))];
76
- case 1:
77
- response = _a.sent();
78
- return [2 /*return*/, response.data];
79
- }
80
- });
81
- }); },
82
- create: function (body) { 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 /*yield*/, client_1.default.post("".concat(exports.route), body)];
87
- case 1:
88
- response = _a.sent();
89
- return [2 /*return*/, response.data];
90
- }
91
- });
92
- }); },
93
- update: function (selector, body) { return __awaiter(void 0, void 0, void 0, function () {
94
- var response;
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0: return [4 /*yield*/, client_1.default.put("".concat(exports.route).concat(selector.id), body)];
98
- case 1:
99
- response = _a.sent();
100
- return [2 /*return*/, response.data];
101
- }
102
- });
103
- }); },
104
- deleteOne: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
105
- var response;
106
- return __generator(this, function (_a) {
107
- switch (_a.label) {
108
- case 0: return [4 /*yield*/, client_1.default.delete("".concat(exports.route).concat(selector.id))];
109
- case 1:
110
- response = _a.sent();
111
- return [2 /*return*/, response.data];
112
- }
113
- });
114
- }); },
115
- };
116
- exports.find = repository.find, exports.findMinified = repository.findMinified, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne;
@@ -1,7 +0,0 @@
1
- import { EntityList as Entity } from '@nomalism-com/types';
2
- export import EValidEntityName = Entity.EValidEntityName;
3
- export import ICreateRequest = Entity.ICreateRequest;
4
- export import IEntity = Entity.Entity;
5
- export import IUpdateRequest = Entity.IUpdateRequest;
6
- export declare const route: string;
7
- export declare const findByUserId: (user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").EntityList[]>, findById: (id: string, user_id: string) => Promise<import("@nomalism-com/types/dist/shared/entities").EntityList | null>, create: (data: Entity.ICreateRequest, user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").EntityList>, update: (id: string, data: Entity.IUpdateRequest, user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").EntityList | null>, deleteOne: (id: string, user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").EntityList | null>;
@@ -1,106 +0,0 @@
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.findByUserId = exports.route = exports.EValidEntityName = void 0;
43
- var types_1 = require("@nomalism-com/types");
44
- var client_1 = __importDefault(require("../../shared/client"));
45
- var _1 = require(".");
46
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
47
- exports.EValidEntityName = types_1.EntityList.EValidEntityName;
48
- exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "entity/");
49
- var repository = {
50
- findByUserId: function () { return __awaiter(void 0, void 0, void 0, function () {
51
- var response;
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0: return [4 /*yield*/, client_1.default.get("".concat(exports.route))];
55
- case 1:
56
- response = _a.sent();
57
- return [2 /*return*/, response.data];
58
- }
59
- });
60
- }); },
61
- findById: function (id) { return __awaiter(void 0, void 0, void 0, function () {
62
- var response;
63
- return __generator(this, function (_a) {
64
- switch (_a.label) {
65
- case 0: return [4 /*yield*/, client_1.default.get("".concat(exports.route).concat(id))];
66
- case 1:
67
- response = _a.sent();
68
- return [2 /*return*/, response.data];
69
- }
70
- });
71
- }); },
72
- create: function (body) { return __awaiter(void 0, void 0, void 0, function () {
73
- var response;
74
- return __generator(this, function (_a) {
75
- switch (_a.label) {
76
- case 0: return [4 /*yield*/, client_1.default.post("".concat(exports.route), body)];
77
- case 1:
78
- response = _a.sent();
79
- return [2 /*return*/, response.data];
80
- }
81
- });
82
- }); },
83
- update: function (id, body) { return __awaiter(void 0, void 0, void 0, function () {
84
- var response;
85
- return __generator(this, function (_a) {
86
- switch (_a.label) {
87
- case 0: return [4 /*yield*/, client_1.default.put("".concat(exports.route).concat(id), body)];
88
- case 1:
89
- response = _a.sent();
90
- return [2 /*return*/, response.data];
91
- }
92
- });
93
- }); },
94
- deleteOne: function (id) { return __awaiter(void 0, void 0, void 0, function () {
95
- var response;
96
- return __generator(this, function (_a) {
97
- switch (_a.label) {
98
- case 0: return [4 /*yield*/, client_1.default.delete("".concat(exports.route).concat(id))];
99
- case 1:
100
- response = _a.sent();
101
- return [2 /*return*/, response.data];
102
- }
103
- });
104
- }); },
105
- };
106
- exports.findByUserId = repository.findByUserId, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne;
@@ -1,7 +0,0 @@
1
- import { Favorites as Entity } from '@nomalism-com/types';
2
- export import IFindOneRequest = Entity.IFindOneRequest;
3
- export import ICreateRequest = Entity.ICreateRequest;
4
- export import IDeleteRequest = Entity.IDeleteRequest;
5
- export import IEntity = Entity.Entity;
6
- export declare const route: string;
7
- export declare const findByUrl: (params: Entity.IFindOneRequest, user_id?: string | undefined) => Promise<boolean>, create: (data: Entity.ICreateRequest, user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").Favorites>, deleteOne: (params: Entity.IDeleteRequest, user_id?: string | undefined) => Promise<import("@nomalism-com/types/dist/shared/entities").Favorites | null>;
@@ -1,92 +0,0 @@
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.create = exports.findByUrl = 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, "favorite/");
46
- var repository = {
47
- findByUrl: 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 /*yield*/, client_1.default.get("".concat(exports.route), { params: params })];
52
- case 1:
53
- response = _a.sent();
54
- return [2 /*return*/, response.data];
55
- }
56
- });
57
- }); },
58
- list: function () { 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 /*yield*/, client_1.default.get("".concat(exports.route, "list"))];
63
- case 1:
64
- response = _a.sent();
65
- return [2 /*return*/, response.data];
66
- }
67
- });
68
- }); },
69
- create: function (body) { 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 /*yield*/, client_1.default.post("".concat(exports.route), body)];
74
- case 1:
75
- response = _a.sent();
76
- return [2 /*return*/, response.data];
77
- }
78
- });
79
- }); },
80
- deleteOne: function (params) { 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 /*yield*/, client_1.default.delete("".concat(exports.route), { params: params })];
85
- case 1:
86
- response = _a.sent();
87
- return [2 /*return*/, response.data];
88
- }
89
- });
90
- }); },
91
- };
92
- exports.findByUrl = repository.findByUrl, exports.create = repository.create, exports.deleteOne = repository.deleteOne;