@nomalism-com/api 0.17.28 → 0.17.75

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 (267) hide show
  1. package/dist/index.d.ts +2 -419
  2. package/dist/index.min.js +1 -0
  3. package/dist/main.d.ts +390 -0
  4. package/dist/modules/document/inventario.d.ts +4 -4
  5. package/dist/modules/document/materialEntrance.d.ts +28 -28
  6. package/dist/modules/document/order.d.ts +43 -39
  7. package/dist/modules/document/propostaSheets.d.ts +18 -18
  8. package/dist/modules/document/purchase.d.ts +12 -11
  9. package/dist/modules/document/quebra.d.ts +8 -6
  10. package/dist/modules/document/returnToProvider.d.ts +9 -9
  11. package/dist/modules/document/transformado.d.ts +5 -5
  12. package/dist/modules/document/upfrontReturn.d.ts +5 -5
  13. package/dist/modules/documentManagement/multimedia.d.ts +6 -6
  14. package/dist/modules/integration/emailLog.d.ts +9 -9
  15. package/dist/modules/integration/emailTemplate.d.ts +11 -11
  16. package/dist/modules/integration/emailTemplateAttachment.d.ts +6 -6
  17. package/dist/modules/integration/errorHandler.d.ts +5 -5
  18. package/dist/modules/integration/file.d.ts +7 -7
  19. package/dist/modules/integration/googleFilePermission.d.ts +7 -7
  20. package/dist/modules/integration/googleSheets.d.ts +15 -15
  21. package/dist/modules/integration/observation.d.ts +13 -11
  22. package/dist/modules/integration/observationType.d.ts +10 -10
  23. package/dist/modules/integration/projectInfo.d.ts +4 -4
  24. package/dist/modules/integration/settings.d.ts +8 -8
  25. package/dist/modules/print/npc.d.ts +6 -6
  26. package/dist/modules/print/printer.d.ts +8 -8
  27. package/dist/modules/print/schedulePrintJob.d.ts +9 -9
  28. package/dist/modules/stock/attribute.d.ts +23 -23
  29. package/dist/modules/stock/attributeValue.d.ts +15 -15
  30. package/dist/modules/stock/color.d.ts +16 -16
  31. package/dist/modules/stock/composition.d.ts +15 -15
  32. package/dist/modules/stock/compositionMaterial.d.ts +16 -16
  33. package/dist/modules/stock/location.d.ts +15 -15
  34. package/dist/modules/stock/maintenance.d.ts +15 -15
  35. package/dist/modules/stock/maintenanceAssoc.d.ts +15 -15
  36. package/dist/modules/stock/maintenancePreset.d.ts +13 -13
  37. package/dist/modules/stock/maintenancePresetAssoc.d.ts +10 -10
  38. package/dist/modules/stock/maintenanceType.d.ts +16 -16
  39. package/dist/modules/stock/primaryColor.d.ts +16 -16
  40. package/dist/modules/stock/prison.d.ts +11 -11
  41. package/dist/modules/stock/product.d.ts +38 -38
  42. package/dist/modules/stock/productAttribute.d.ts +15 -15
  43. package/dist/modules/stock/productCategory.d.ts +16 -16
  44. package/dist/modules/stock/productColor.d.ts +15 -15
  45. package/dist/modules/stock/productImage.d.ts +17 -17
  46. package/dist/modules/stock/productName.d.ts +16 -16
  47. package/dist/modules/stock/productNamePreset.d.ts +16 -16
  48. package/dist/modules/stock/productPart.d.ts +17 -17
  49. package/dist/modules/stock/productSubCategory.d.ts +16 -16
  50. package/dist/modules/stock/productUse.d.ts +16 -16
  51. package/dist/modules/stock/productUseAssoc.d.ts +15 -15
  52. package/dist/modules/stock/promotion.d.ts +19 -19
  53. package/dist/modules/stock/promotionAssoc.d.ts +15 -15
  54. package/dist/modules/stock/queryList.d.ts +13 -13
  55. package/dist/modules/stock/queryParameter.d.ts +13 -13
  56. package/dist/modules/stock/returnReason.d.ts +8 -8
  57. package/dist/modules/stock/savedEmPicking.d.ts +7 -7
  58. package/dist/modules/stock/savedProviderProposal.d.ts +9 -9
  59. package/dist/modules/stock/schedule.d.ts +7 -10
  60. package/dist/modules/stock/similarProduct.d.ts +15 -15
  61. package/dist/modules/stock/stockMovement.d.ts +15 -15
  62. package/dist/modules/stock/typeOfInventory.d.ts +16 -16
  63. package/dist/modules/stock/typeOfLocation.d.ts +16 -16
  64. package/dist/modules/stock/unitOfMeasure.d.ts +16 -16
  65. package/dist/modules/stock/vatTax.d.ts +16 -16
  66. package/dist/modules/stock/vatTaxZone.d.ts +17 -17
  67. package/dist/modules/supply/cabide.d.ts +24 -24
  68. package/dist/modules/supply/cabideProduct.d.ts +15 -15
  69. package/dist/modules/supply/clientCurrentAccount.d.ts +16 -16
  70. package/dist/modules/supply/documentHeader.d.ts +63 -60
  71. package/dist/modules/supply/documentLine.d.ts +24 -24
  72. package/dist/modules/supply/documentLineAssoc.d.ts +10 -12
  73. package/dist/modules/supply/documentLineFolder.d.ts +11 -11
  74. package/dist/modules/supply/documentLineNote.d.ts +8 -8
  75. package/dist/modules/supply/documentSet.d.ts +11 -11
  76. package/dist/modules/supply/documentType.d.ts +17 -17
  77. package/dist/modules/supply/externalDocumentHeader.d.ts +15 -15
  78. package/dist/modules/supply/externalDocumentType.d.ts +6 -6
  79. package/dist/modules/supply/moloniRequest.d.ts +5 -5
  80. package/dist/modules/supply/orderManagement.d.ts +10 -12
  81. package/dist/modules/supply/payment.d.ts +26 -26
  82. package/dist/modules/supply/preSale.d.ts +19 -19
  83. package/dist/modules/supply/preSaleProduct.d.ts +5 -5
  84. package/dist/modules/supply/providerCurrentAccount.d.ts +6 -6
  85. package/dist/modules/supply/startDocumentHeaderLastUpdate.d.ts +5 -5
  86. package/dist/modules/supply/vatValidation.d.ts +4 -4
  87. package/dist/modules/supply/workflow.d.ts +13 -13
  88. package/dist/modules/tickets/channel.d.ts +11 -11
  89. package/dist/modules/tickets/clt.d.ts +10 -10
  90. package/dist/modules/tickets/language.d.ts +10 -10
  91. package/dist/modules/tickets/tickets.d.ts +10 -10
  92. package/dist/modules/user/bankData.d.ts +15 -15
  93. package/dist/modules/user/clientType.d.ts +15 -15
  94. package/dist/modules/user/clients.d.ts +21 -21
  95. package/dist/modules/user/commissioner.d.ts +18 -18
  96. package/dist/modules/user/country.d.ts +15 -15
  97. package/dist/modules/user/deliveryMethods.d.ts +11 -11
  98. package/dist/modules/user/favorites.d.ts +7 -7
  99. package/dist/modules/user/groupPermission.d.ts +9 -9
  100. package/dist/modules/user/language.d.ts +15 -15
  101. package/dist/modules/user/logout.d.ts +1 -1
  102. package/dist/modules/user/maturityDates.d.ts +11 -11
  103. package/dist/modules/user/password.d.ts +5 -5
  104. package/dist/modules/user/paymentCondition.d.ts +14 -14
  105. package/dist/modules/user/paymentMethods.d.ts +11 -11
  106. package/dist/modules/user/permission.d.ts +9 -9
  107. package/dist/modules/user/persona.d.ts +16 -14
  108. package/dist/modules/user/provider.d.ts +19 -19
  109. package/dist/modules/user/providerType.d.ts +15 -15
  110. package/dist/modules/user/purchaseCondition.d.ts +15 -15
  111. package/dist/modules/user/reasonForExemption.d.ts +15 -15
  112. package/dist/modules/user/refreshToken.d.ts +5 -5
  113. package/dist/modules/user/segmentsArea.d.ts +15 -15
  114. package/dist/modules/user/sessions.d.ts +5 -5
  115. package/dist/modules/user/shippings.d.ts +14 -14
  116. package/dist/modules/user/socialMedia.d.ts +14 -14
  117. package/dist/modules/user/storeOperator.d.ts +19 -19
  118. package/dist/modules/user/swift.d.ts +15 -15
  119. package/dist/modules/user/tenant.d.ts +8 -8
  120. package/dist/modules/user/user.d.ts +21 -21
  121. package/dist/modules/user/userPermission.d.ts +8 -8
  122. package/dist/modules/user/userPositions.d.ts +15 -15
  123. package/dist/modules/user/vehicles.d.ts +8 -8
  124. package/dist/modules/user/zipCode.d.ts +6 -6
  125. package/dist/modules/view/eventHistory.d.ts +4 -4
  126. package/package.json +18 -21
  127. package/dist/index.js +0 -478
  128. package/dist/modules/document/inventario.js +0 -60
  129. package/dist/modules/document/materialEntrance.js +0 -107
  130. package/dist/modules/document/order.js +0 -169
  131. package/dist/modules/document/propostaSheets.js +0 -148
  132. package/dist/modules/document/purchase.js +0 -100
  133. package/dist/modules/document/quebra.js +0 -100
  134. package/dist/modules/document/returnToProvider.js +0 -88
  135. package/dist/modules/document/transformado.js +0 -61
  136. package/dist/modules/document/upfrontReturn.js +0 -61
  137. package/dist/modules/documentManagement/multimedia.js +0 -82
  138. package/dist/modules/integration/dynamicData.d.ts +0 -18
  139. package/dist/modules/integration/dynamicData.js +0 -113
  140. package/dist/modules/integration/emailLog.js +0 -75
  141. package/dist/modules/integration/emailTemplate.js +0 -112
  142. package/dist/modules/integration/emailTemplateAttachment.js +0 -73
  143. package/dist/modules/integration/errorHandler.js +0 -60
  144. package/dist/modules/integration/field.d.ts +0 -35
  145. package/dist/modules/integration/field.js +0 -102
  146. package/dist/modules/integration/fieldGroup.d.ts +0 -23
  147. package/dist/modules/integration/fieldGroup.js +0 -131
  148. package/dist/modules/integration/file.js +0 -89
  149. package/dist/modules/integration/googleFilePermission.js +0 -100
  150. package/dist/modules/integration/googleSheets.js +0 -101
  151. package/dist/modules/integration/history.d.ts +0 -17
  152. package/dist/modules/integration/history.js +0 -66
  153. package/dist/modules/integration/observation.js +0 -102
  154. package/dist/modules/integration/observationType.js +0 -115
  155. package/dist/modules/integration/projectInfo.js +0 -60
  156. package/dist/modules/integration/settings.js +0 -115
  157. package/dist/modules/integration/task.d.ts +0 -19
  158. package/dist/modules/integration/task.js +0 -121
  159. package/dist/modules/integration/taskAttachment.d.ts +0 -14
  160. package/dist/modules/integration/taskAttachment.js +0 -76
  161. package/dist/modules/integration/taskGroup.d.ts +0 -18
  162. package/dist/modules/integration/taskGroup.js +0 -113
  163. package/dist/modules/integration/taskNote.d.ts +0 -17
  164. package/dist/modules/integration/taskNote.js +0 -100
  165. package/dist/modules/print/npc.js +0 -74
  166. package/dist/modules/print/printer.js +0 -87
  167. package/dist/modules/print/schedulePrintJob.js +0 -98
  168. package/dist/modules/stock/attribute.js +0 -160
  169. package/dist/modules/stock/attributeValue.js +0 -156
  170. package/dist/modules/stock/color.js +0 -155
  171. package/dist/modules/stock/composition.js +0 -141
  172. package/dist/modules/stock/compositionMaterial.js +0 -156
  173. package/dist/modules/stock/location.js +0 -156
  174. package/dist/modules/stock/maintenance.js +0 -156
  175. package/dist/modules/stock/maintenanceAssoc.js +0 -141
  176. package/dist/modules/stock/maintenancePreset.js +0 -126
  177. package/dist/modules/stock/maintenancePresetAssoc.js +0 -99
  178. package/dist/modules/stock/maintenanceType.js +0 -156
  179. package/dist/modules/stock/primaryColor.js +0 -156
  180. package/dist/modules/stock/prison.js +0 -128
  181. package/dist/modules/stock/product.js +0 -291
  182. package/dist/modules/stock/productAttribute.js +0 -141
  183. package/dist/modules/stock/productCategory.js +0 -156
  184. package/dist/modules/stock/productColor.js +0 -141
  185. package/dist/modules/stock/productImage.js +0 -145
  186. package/dist/modules/stock/productName.js +0 -156
  187. package/dist/modules/stock/productNamePreset.js +0 -156
  188. package/dist/modules/stock/productPart.js +0 -155
  189. package/dist/modules/stock/productSubCategory.js +0 -155
  190. package/dist/modules/stock/productUse.js +0 -156
  191. package/dist/modules/stock/productUseAssoc.js +0 -140
  192. package/dist/modules/stock/promotion.js +0 -176
  193. package/dist/modules/stock/promotionAssoc.js +0 -141
  194. package/dist/modules/stock/queryList.js +0 -158
  195. package/dist/modules/stock/queryParameter.js +0 -129
  196. package/dist/modules/stock/returnReason.js +0 -100
  197. package/dist/modules/stock/savedEmPicking.js +0 -74
  198. package/dist/modules/stock/savedProviderProposal.js +0 -100
  199. package/dist/modules/stock/schedule.js +0 -64
  200. package/dist/modules/stock/similarProduct.js +0 -141
  201. package/dist/modules/stock/stockMovement.js +0 -103
  202. package/dist/modules/stock/typeOfInventory.js +0 -156
  203. package/dist/modules/stock/typeOfLocation.js +0 -156
  204. package/dist/modules/stock/unitOfMeasure.js +0 -156
  205. package/dist/modules/stock/vatTax.js +0 -156
  206. package/dist/modules/stock/vatTaxZone.js +0 -156
  207. package/dist/modules/supply/cabide.js +0 -177
  208. package/dist/modules/supply/cabideProduct.js +0 -166
  209. package/dist/modules/supply/clientCurrentAccount.js +0 -132
  210. package/dist/modules/supply/documentHeader.js +0 -476
  211. package/dist/modules/supply/documentLine.js +0 -173
  212. package/dist/modules/supply/documentLineAssoc.js +0 -99
  213. package/dist/modules/supply/documentLineFolder.js +0 -100
  214. package/dist/modules/supply/documentLineNote.js +0 -87
  215. package/dist/modules/supply/documentSet.js +0 -126
  216. package/dist/modules/supply/documentType.js +0 -130
  217. package/dist/modules/supply/externalDocumentHeader.js +0 -151
  218. package/dist/modules/supply/externalDocumentType.js +0 -74
  219. package/dist/modules/supply/moloniRequest.js +0 -60
  220. package/dist/modules/supply/orderManagement.js +0 -91
  221. package/dist/modules/supply/payment.js +0 -262
  222. package/dist/modules/supply/preSale.js +0 -152
  223. package/dist/modules/supply/preSaleProduct.js +0 -74
  224. package/dist/modules/supply/providerCurrentAccount.js +0 -63
  225. package/dist/modules/supply/startDocumentHeaderLastUpdate.js +0 -61
  226. package/dist/modules/supply/vatValidation.js +0 -65
  227. package/dist/modules/supply/workflow.js +0 -113
  228. package/dist/modules/tickets/channel.js +0 -126
  229. package/dist/modules/tickets/clt.js +0 -126
  230. package/dist/modules/tickets/language.js +0 -126
  231. package/dist/modules/tickets/tickets.js +0 -100
  232. package/dist/modules/user/bankData.js +0 -141
  233. package/dist/modules/user/clientType.js +0 -141
  234. package/dist/modules/user/clients.js +0 -169
  235. package/dist/modules/user/commissioner.js +0 -156
  236. package/dist/modules/user/country.js +0 -156
  237. package/dist/modules/user/deliveryMethods.js +0 -128
  238. package/dist/modules/user/entityList.d.ts +0 -17
  239. package/dist/modules/user/entityList.js +0 -119
  240. package/dist/modules/user/favorites.js +0 -100
  241. package/dist/modules/user/groupPermission.js +0 -102
  242. package/dist/modules/user/language.js +0 -141
  243. package/dist/modules/user/logout.js +0 -60
  244. package/dist/modules/user/maturityDates.js +0 -128
  245. package/dist/modules/user/password.js +0 -72
  246. package/dist/modules/user/paymentCondition.js +0 -141
  247. package/dist/modules/user/paymentMethods.js +0 -128
  248. package/dist/modules/user/permission.js +0 -102
  249. package/dist/modules/user/persona.js +0 -130
  250. package/dist/modules/user/provider.js +0 -184
  251. package/dist/modules/user/providerType.js +0 -141
  252. package/dist/modules/user/purchaseCondition.js +0 -141
  253. package/dist/modules/user/reasonForExemption.js +0 -141
  254. package/dist/modules/user/refreshToken.js +0 -61
  255. package/dist/modules/user/segmentsArea.js +0 -141
  256. package/dist/modules/user/sessions.js +0 -61
  257. package/dist/modules/user/shippings.js +0 -141
  258. package/dist/modules/user/socialMedia.js +0 -141
  259. package/dist/modules/user/storeOperator.js +0 -169
  260. package/dist/modules/user/swift.js +0 -141
  261. package/dist/modules/user/tenant.js +0 -100
  262. package/dist/modules/user/user.js +0 -167
  263. package/dist/modules/user/userPermission.js +0 -89
  264. package/dist/modules/user/userPositions.js +0 -141
  265. package/dist/modules/user/vehicles.js +0 -100
  266. package/dist/modules/user/zipCode.js +0 -73
  267. package/dist/modules/view/eventHistory.js +0 -61
@@ -1,65 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.findByLatest = function (nif) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.get("".concat(this.route), {
52
- params: {
53
- nif: nif,
54
- },
55
- })];
56
- case 1:
57
- response = _a.sent();
58
- return [2, response.data];
59
- }
60
- });
61
- });
62
- };
63
- return Repository;
64
- }());
65
- exports.default = Repository;
@@ -1,113 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.find = function (params) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.get("".concat(this.route), { params: params })];
52
- case 1:
53
- response = _a.sent();
54
- return [2, response.data];
55
- }
56
- });
57
- });
58
- };
59
- Repository.prototype.findByOwnerId = function (params) {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var response;
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4, this.api.get("".concat(this.route, "by_owner"), { params: params })];
65
- case 1:
66
- response = _a.sent();
67
- return [2, response.data];
68
- }
69
- });
70
- });
71
- };
72
- Repository.prototype.create = function (body) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var response;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0: return [4, this.api.post("".concat(this.route), body)];
78
- case 1:
79
- response = _a.sent();
80
- return [2, response.data];
81
- }
82
- });
83
- });
84
- };
85
- Repository.prototype.update = function (selector, body) {
86
- return __awaiter(this, void 0, void 0, function () {
87
- var response;
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
91
- case 1:
92
- response = _a.sent();
93
- return [2, response.data];
94
- }
95
- });
96
- });
97
- };
98
- Repository.prototype.deleteOne = function (selector) {
99
- return __awaiter(this, void 0, void 0, function () {
100
- var response;
101
- return __generator(this, function (_a) {
102
- switch (_a.label) {
103
- case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
104
- case 1:
105
- response = _a.sent();
106
- return [2, response.data];
107
- }
108
- });
109
- });
110
- };
111
- return Repository;
112
- }());
113
- exports.default = Repository;
@@ -1,126 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.create = function (body) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.post("".concat(this.route), body)];
52
- case 1:
53
- response = _a.sent();
54
- return [2, response.data];
55
- }
56
- });
57
- });
58
- };
59
- Repository.prototype.find = function () {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var response;
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4, this.api.get("".concat(this.route))];
65
- case 1:
66
- response = _a.sent();
67
- return [2, response.data];
68
- }
69
- });
70
- });
71
- };
72
- Repository.prototype.findMinified = function (params) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var response;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0: return [4, this.api.get("".concat(this.route, "minified"), {
78
- params: params,
79
- })];
80
- case 1:
81
- response = _a.sent();
82
- return [2, response.data];
83
- }
84
- });
85
- });
86
- };
87
- Repository.prototype.findById = function (id) {
88
- return __awaiter(this, void 0, void 0, function () {
89
- var response;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0: return [4, this.api.get("".concat(this.route).concat(id))];
93
- case 1:
94
- response = _a.sent();
95
- return [2, response.data];
96
- }
97
- });
98
- });
99
- };
100
- Repository.prototype.update = function (id, body) {
101
- return __awaiter(this, void 0, void 0, function () {
102
- return __generator(this, function (_a) {
103
- switch (_a.label) {
104
- case 0: return [4, this.api.post("".concat(this.route).concat(id), body)];
105
- case 1:
106
- _a.sent();
107
- return [2];
108
- }
109
- });
110
- });
111
- };
112
- Repository.prototype.deleteOne = function (id) {
113
- return __awaiter(this, void 0, void 0, function () {
114
- return __generator(this, function (_a) {
115
- switch (_a.label) {
116
- case 0: return [4, this.api.delete("".concat(this.route).concat(id))];
117
- case 1:
118
- _a.sent();
119
- return [2];
120
- }
121
- });
122
- });
123
- };
124
- return Repository;
125
- }());
126
- exports.default = Repository;
@@ -1,126 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.create = function (body) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.post("".concat(this.route), body)];
52
- case 1:
53
- response = _a.sent();
54
- return [2, response.data];
55
- }
56
- });
57
- });
58
- };
59
- Repository.prototype.find = function () {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var response;
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4, this.api.get("".concat(this.route))];
65
- case 1:
66
- response = _a.sent();
67
- return [2, response.data];
68
- }
69
- });
70
- });
71
- };
72
- Repository.prototype.findMinified = function (params) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var response;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0: return [4, this.api.get("".concat(this.route, "minified"), {
78
- params: params,
79
- })];
80
- case 1:
81
- response = _a.sent();
82
- return [2, response.data];
83
- }
84
- });
85
- });
86
- };
87
- Repository.prototype.findById = function (id) {
88
- return __awaiter(this, void 0, void 0, function () {
89
- var response;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0: return [4, this.api.get("".concat(this.route).concat(id))];
93
- case 1:
94
- response = _a.sent();
95
- return [2, response.data];
96
- }
97
- });
98
- });
99
- };
100
- Repository.prototype.update = function (id, body) {
101
- return __awaiter(this, void 0, void 0, function () {
102
- return __generator(this, function (_a) {
103
- switch (_a.label) {
104
- case 0: return [4, this.api.post("".concat(this.route).concat(id), body)];
105
- case 1:
106
- _a.sent();
107
- return [2];
108
- }
109
- });
110
- });
111
- };
112
- Repository.prototype.deleteOne = function (id) {
113
- return __awaiter(this, void 0, void 0, function () {
114
- return __generator(this, function (_a) {
115
- switch (_a.label) {
116
- case 0: return [4, this.api.delete("".concat(this.route).concat(id))];
117
- case 1:
118
- _a.sent();
119
- return [2];
120
- }
121
- });
122
- });
123
- };
124
- return Repository;
125
- }());
126
- exports.default = Repository;
@@ -1,126 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.create = function (body) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.post("".concat(this.route), body)];
52
- case 1:
53
- response = _a.sent();
54
- return [2, response.data];
55
- }
56
- });
57
- });
58
- };
59
- Repository.prototype.find = function () {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var response;
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4, this.api.get("".concat(this.route))];
65
- case 1:
66
- response = _a.sent();
67
- return [2, response.data];
68
- }
69
- });
70
- });
71
- };
72
- Repository.prototype.findMinified = function (params) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var response;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0: return [4, this.api.get("".concat(this.route, "minified"), {
78
- params: params,
79
- })];
80
- case 1:
81
- response = _a.sent();
82
- return [2, response.data];
83
- }
84
- });
85
- });
86
- };
87
- Repository.prototype.findById = function (id) {
88
- return __awaiter(this, void 0, void 0, function () {
89
- var response;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0: return [4, this.api.get("".concat(this.route).concat(id))];
93
- case 1:
94
- response = _a.sent();
95
- return [2, response.data];
96
- }
97
- });
98
- });
99
- };
100
- Repository.prototype.update = function (id, body) {
101
- return __awaiter(this, void 0, void 0, function () {
102
- return __generator(this, function (_a) {
103
- switch (_a.label) {
104
- case 0: return [4, this.api.post("".concat(this.route).concat(id), body)];
105
- case 1:
106
- _a.sent();
107
- return [2];
108
- }
109
- });
110
- });
111
- };
112
- Repository.prototype.deleteOne = function (id) {
113
- return __awaiter(this, void 0, void 0, function () {
114
- return __generator(this, function (_a) {
115
- switch (_a.label) {
116
- case 0: return [4, this.api.delete("".concat(this.route).concat(id))];
117
- case 1:
118
- _a.sent();
119
- return [2];
120
- }
121
- });
122
- });
123
- };
124
- return Repository;
125
- }());
126
- exports.default = Repository;
@@ -1,100 +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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var Repository = (function () {
40
- function Repository(_a) {
41
- var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
42
- this.api = api;
43
- this.route = route;
44
- this.publicRoute = publicRoute;
45
- }
46
- Repository.prototype.create = function (body) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var response;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4, this.api.post("".concat(this.route), body)];
52
- case 1:
53
- response = _a.sent();
54
- return [2, response.data];
55
- }
56
- });
57
- });
58
- };
59
- Repository.prototype.findToday = function () {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var response;
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4, this.api.get("".concat(this.route, "find_today"))];
65
- case 1:
66
- response = _a.sent();
67
- return [2, response.data];
68
- }
69
- });
70
- });
71
- };
72
- Repository.prototype.update = function (body) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- var response;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0: return [4, this.api.put("".concat(this.route), body)];
78
- case 1:
79
- response = _a.sent();
80
- return [2, response.data];
81
- }
82
- });
83
- });
84
- };
85
- Repository.prototype.undoLastCall = function () {
86
- return __awaiter(this, void 0, void 0, function () {
87
- var response;
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0: return [4, this.api.put("".concat(this.route, "undo_last_call"))];
91
- case 1:
92
- response = _a.sent();
93
- return [2, response.data];
94
- }
95
- });
96
- });
97
- };
98
- return Repository;
99
- }());
100
- exports.default = Repository;