@futdevpro/fsm-dynamo 1.5.43 → 1.5.44

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 (284) hide show
  1. package/lib/_collections/_constants/country-codes-ISO-3166.json +3239 -0
  2. package/lib/_collections/_constants/country-iso.d.ts +67 -0
  3. package/lib/_collections/_constants/country-iso.d.ts.map +1 -0
  4. package/lib/_collections/_constants/country-iso.js +47 -0
  5. package/lib/_collections/_constants/country-iso.js.map +1 -0
  6. package/lib/_collections/_constants/country-phone-code.d.ts +6 -0
  7. package/lib/_collections/_constants/country-phone-code.d.ts.map +1 -0
  8. package/lib/_collections/_constants/country-phone-code.js +3 -0
  9. package/lib/_collections/_constants/country-phone-code.js.map +1 -0
  10. package/lib/_collections/_constants/country-phone-codes.json +1202 -0
  11. package/lib/_collections/_constants/country-sub-divisions-ISO-3166.json +4994 -0
  12. package/lib/_collections/_tools/dynamo-location.d.ts +6 -0
  13. package/lib/_collections/_tools/dynamo-location.d.ts.map +1 -0
  14. package/lib/_collections/_tools/dynamo-location.js +40 -0
  15. package/lib/_collections/_tools/dynamo-location.js.map +1 -0
  16. package/lib/_collections/_tools/dynamo-log.d.ts +11 -0
  17. package/lib/_collections/_tools/dynamo-log.d.ts.map +1 -0
  18. package/lib/_collections/_tools/dynamo-log.js +59 -0
  19. package/lib/_collections/_tools/dynamo-log.js.map +1 -0
  20. package/lib/_collections/_tools/dynamo-random.d.ts +8 -0
  21. package/lib/_collections/_tools/dynamo-random.d.ts.map +1 -0
  22. package/lib/_collections/_tools/dynamo-random.js +60 -0
  23. package/lib/_collections/_tools/dynamo-random.js.map +1 -0
  24. package/lib/_collections/_tools/dynamo-regions.d.ts +16 -0
  25. package/lib/_collections/_tools/dynamo-regions.d.ts.map +1 -0
  26. package/lib/_collections/_tools/dynamo-regions.js +58 -0
  27. package/lib/_collections/_tools/dynamo-regions.js.map +1 -0
  28. package/lib/_collections/_tools/dynamo-round-list.d.ts +8 -0
  29. package/lib/_collections/_tools/dynamo-round-list.d.ts.map +1 -0
  30. package/lib/_collections/_tools/dynamo-round-list.js +39 -0
  31. package/lib/_collections/_tools/dynamo-round-list.js.map +1 -0
  32. package/lib/_collections/_tools/dynamo-shared.service.d.ts +73 -0
  33. package/lib/_collections/_tools/dynamo-shared.service.d.ts.map +1 -0
  34. package/lib/_collections/_tools/dynamo-shared.service.js +151 -0
  35. package/lib/_collections/_tools/dynamo-shared.service.js.map +1 -0
  36. package/lib/_collections/_tools/dynamo-time.d.ts +12 -0
  37. package/lib/_collections/_tools/dynamo-time.d.ts.map +1 -0
  38. package/lib/_collections/_tools/dynamo-time.js +41 -0
  39. package/lib/_collections/_tools/dynamo-time.js.map +1 -0
  40. package/lib/_collections/_tools/dynamo-trigonometry.d.ts +43 -0
  41. package/lib/_collections/_tools/dynamo-trigonometry.d.ts.map +1 -0
  42. package/lib/_collections/_tools/dynamo-trigonometry.js +62 -0
  43. package/lib/_collections/_tools/dynamo-trigonometry.js.map +1 -0
  44. package/lib/_collections/_tools/location.d.ts +6 -0
  45. package/lib/_collections/_tools/location.d.ts.map +1 -0
  46. package/lib/_collections/_tools/location.js +40 -0
  47. package/lib/_collections/_tools/location.js.map +1 -0
  48. package/lib/_collections/_tools/log.d.ts +10 -0
  49. package/lib/_collections/_tools/log.d.ts.map +1 -0
  50. package/lib/_collections/_tools/log.js +53 -0
  51. package/lib/_collections/_tools/log.js.map +1 -0
  52. package/lib/_collections/_tools/random.d.ts +8 -0
  53. package/lib/_collections/_tools/random.d.ts.map +1 -0
  54. package/lib/_collections/_tools/random.js +60 -0
  55. package/lib/_collections/_tools/random.js.map +1 -0
  56. package/lib/_collections/_tools/region-translator.d.ts +12 -0
  57. package/lib/_collections/_tools/region-translator.d.ts.map +1 -0
  58. package/lib/_collections/_tools/region-translator.js +48 -0
  59. package/lib/_collections/_tools/region-translator.js.map +1 -0
  60. package/lib/_collections/_tools/round-list.d.ts +8 -0
  61. package/lib/_collections/_tools/round-list.d.ts.map +1 -0
  62. package/lib/_collections/_tools/round-list.js +39 -0
  63. package/lib/_collections/_tools/round-list.js.map +1 -0
  64. package/lib/_collections/_tools/time.d.ts +12 -0
  65. package/lib/_collections/_tools/time.d.ts.map +1 -0
  66. package/lib/_collections/_tools/time.js +41 -0
  67. package/lib/_collections/_tools/time.js.map +1 -0
  68. package/lib/_collections/_tools/trigonometry.d.ts +43 -0
  69. package/lib/_collections/_tools/trigonometry.d.ts.map +1 -0
  70. package/lib/_collections/_tools/trigonometry.js +62 -0
  71. package/lib/_collections/_tools/trigonometry.js.map +1 -0
  72. package/lib/_collections/_tools/utilities.d.ts +32 -0
  73. package/lib/_collections/_tools/utilities.d.ts.map +1 -0
  74. package/lib/_collections/_tools/utilities.js +71 -0
  75. package/lib/_collections/_tools/utilities.js.map +1 -0
  76. package/lib/_collections/_tools/vector.d.ts +38 -0
  77. package/lib/_collections/_tools/vector.d.ts.map +1 -0
  78. package/lib/_collections/_tools/vector.js +107 -0
  79. package/lib/_collections/_tools/vector.js.map +1 -0
  80. package/lib/_collections/dynamo-shared.service.d.ts +87 -0
  81. package/lib/_collections/dynamo-shared.service.d.ts.map +1 -0
  82. package/lib/_collections/dynamo-shared.service.js +261 -0
  83. package/lib/_collections/dynamo-shared.service.js.map +1 -0
  84. package/lib/_collections/index.d.ts +11 -0
  85. package/lib/_collections/index.d.ts.map +1 -0
  86. package/lib/_collections/index.js +15 -0
  87. package/lib/_collections/index.js.map +1 -0
  88. package/lib/_constants/index.d.ts +4 -0
  89. package/lib/_constants/index.d.ts.map +1 -0
  90. package/lib/_constants/index.js +9 -0
  91. package/lib/_constants/index.js.map +1 -0
  92. package/lib/_constants/module-settings/test-module-settings.d.ts +3 -0
  93. package/lib/_constants/module-settings/test-module-settings.d.ts.map +1 -0
  94. package/lib/_constants/module-settings/test-module-settings.js +16 -0
  95. package/lib/_constants/module-settings/test-module-settings.js.map +1 -0
  96. package/lib/_constants/module-settings/usage-module-settings.d.ts +3 -0
  97. package/lib/_constants/module-settings/usage-module-settings.d.ts.map +1 -0
  98. package/lib/_constants/module-settings/usage-module-settings.js +13 -0
  99. package/lib/_constants/module-settings/usage-module-settings.js.map +1 -0
  100. package/lib/_constants/times.d.ts +8 -0
  101. package/lib/_constants/times.d.ts.map +1 -0
  102. package/lib/_constants/times.js +11 -0
  103. package/lib/_constants/times.js.map +1 -0
  104. package/lib/_enums/data-model-type.enum.d.ts +6 -0
  105. package/lib/_enums/data-model-type.enum.d.ts.map +1 -0
  106. package/lib/_enums/data-model-type.enum.js +10 -0
  107. package/lib/_enums/data-model-type.enum.js.map +1 -0
  108. package/lib/_enums/index.d.ts +3 -0
  109. package/lib/_enums/index.d.ts.map +1 -0
  110. package/lib/_enums/index.js +7 -0
  111. package/lib/_enums/index.js.map +1 -0
  112. package/lib/_enums/log-style.enum.d.ts +26 -0
  113. package/lib/_enums/log-style.enum.d.ts.map +1 -0
  114. package/lib/_enums/log-style.enum.js +30 -0
  115. package/lib/_enums/log-style.enum.js.map +1 -0
  116. package/lib/_enums/region.enum.d.ts +8 -0
  117. package/lib/_enums/region.enum.d.ts.map +1 -0
  118. package/lib/_enums/region.enum.js +12 -0
  119. package/lib/_enums/region.enum.js.map +1 -0
  120. package/lib/_enums/sub-region.enum.d.ts +20 -0
  121. package/lib/_enums/sub-region.enum.d.ts.map +1 -0
  122. package/lib/_enums/sub-region.enum.js +24 -0
  123. package/lib/_enums/sub-region.enum.js.map +1 -0
  124. package/lib/_models/control-models/country-iso.d.ts +16 -0
  125. package/lib/_models/control-models/country-iso.d.ts.map +1 -0
  126. package/lib/_models/control-models/country-iso.js +3 -0
  127. package/lib/_models/control-models/country-iso.js.map +1 -0
  128. package/lib/_models/control-models/country-phone-code.d.ts +6 -0
  129. package/lib/_models/control-models/country-phone-code.d.ts.map +1 -0
  130. package/lib/_models/control-models/country-phone-code.js +3 -0
  131. package/lib/_models/control-models/country-phone-code.js.map +1 -0
  132. package/lib/_models/control-models/daily-usage-data.d.ts +18 -0
  133. package/lib/_models/control-models/daily-usage-data.d.ts.map +1 -0
  134. package/lib/_models/control-models/daily-usage-data.js +22 -0
  135. package/lib/_models/control-models/daily-usage-data.js.map +1 -0
  136. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts +18 -0
  137. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts.map +1 -0
  138. package/lib/_models/control-models/dynamo-daily-usage-data.js +22 -0
  139. package/lib/_models/control-models/dynamo-daily-usage-data.js.map +1 -0
  140. package/lib/_models/control-models/dynamo-error.d.ts +263 -0
  141. package/lib/_models/control-models/dynamo-error.d.ts.map +1 -0
  142. package/lib/_models/control-models/dynamo-error.js +114 -0
  143. package/lib/_models/control-models/dynamo-error.js.map +1 -0
  144. package/lib/_models/control-models/dynamo-module-settings.d.ts +7 -0
  145. package/lib/_models/control-models/dynamo-module-settings.d.ts.map +1 -0
  146. package/lib/_models/control-models/dynamo-module-settings.js +3 -0
  147. package/lib/_models/control-models/dynamo-module-settings.js.map +1 -0
  148. package/lib/_models/control-models/dynamo-nts-data-params.d.ts +14 -0
  149. package/lib/_models/control-models/dynamo-nts-data-params.d.ts.map +1 -0
  150. package/lib/_models/control-models/dynamo-nts-data-params.js +19 -0
  151. package/lib/_models/control-models/dynamo-nts-data-params.js.map +1 -0
  152. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts +45 -0
  153. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts.map +1 -0
  154. package/lib/_models/control-models/dynamo-nts-data-property-params.js +61 -0
  155. package/lib/_models/control-models/dynamo-nts-data-property-params.js.map +1 -0
  156. package/lib/_models/control-models/dynamo-nts-error.d.ts +19 -0
  157. package/lib/_models/control-models/dynamo-nts-error.d.ts.map +1 -0
  158. package/lib/_models/control-models/dynamo-nts-error.js +190 -0
  159. package/lib/_models/control-models/dynamo-nts-error.js.map +1 -0
  160. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts +7 -0
  161. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts.map +1 -0
  162. package/lib/_models/control-models/dynamo-nts-module-settings.js +3 -0
  163. package/lib/_models/control-models/dynamo-nts-module-settings.js.map +1 -0
  164. package/lib/_models/control-models/dynamo-poll.d.ts +31 -0
  165. package/lib/_models/control-models/dynamo-poll.d.ts.map +1 -0
  166. package/lib/_models/control-models/dynamo-poll.js +90 -0
  167. package/lib/_models/control-models/dynamo-poll.js.map +1 -0
  168. package/lib/_models/control-models/dynamo-usage-action.d.ts +9 -0
  169. package/lib/_models/control-models/dynamo-usage-action.d.ts.map +1 -0
  170. package/lib/_models/control-models/dynamo-usage-action.js +13 -0
  171. package/lib/_models/control-models/dynamo-usage-action.js.map +1 -0
  172. package/lib/_models/control-models/dynamo-usage-data.d.ts +14 -0
  173. package/lib/_models/control-models/dynamo-usage-data.d.ts.map +1 -0
  174. package/lib/_models/control-models/dynamo-usage-data.js +16 -0
  175. package/lib/_models/control-models/dynamo-usage-data.js.map +1 -0
  176. package/lib/_models/control-models/dynamobe-data-params.d.ts +14 -0
  177. package/lib/_models/control-models/dynamobe-data-params.d.ts.map +1 -0
  178. package/lib/_models/control-models/dynamobe-data-params.js +19 -0
  179. package/lib/_models/control-models/dynamobe-data-params.js.map +1 -0
  180. package/lib/_models/control-models/dynamobe-data-property-params.d.ts +28 -0
  181. package/lib/_models/control-models/dynamobe-data-property-params.d.ts.map +1 -0
  182. package/lib/_models/control-models/dynamobe-data-property-params.js +57 -0
  183. package/lib/_models/control-models/dynamobe-data-property-params.js.map +1 -0
  184. package/lib/_models/control-models/dynamobe-error.d.ts +19 -0
  185. package/lib/_models/control-models/dynamobe-error.d.ts.map +1 -0
  186. package/lib/_models/control-models/dynamobe-error.js +188 -0
  187. package/lib/_models/control-models/dynamobe-error.js.map +1 -0
  188. package/lib/_models/control-models/geo-ip-location.d.ts +26 -0
  189. package/lib/_models/control-models/geo-ip-location.d.ts.map +1 -0
  190. package/lib/_models/control-models/geo-ip-location.js +3 -0
  191. package/lib/_models/control-models/geo-ip-location.js.map +1 -0
  192. package/lib/_models/control-models/location-coordinates.d.ts +5 -0
  193. package/lib/_models/control-models/location-coordinates.d.ts.map +1 -0
  194. package/lib/_models/control-models/location-coordinates.js +3 -0
  195. package/lib/_models/control-models/location-coordinates.js.map +1 -0
  196. package/lib/_models/control-models/random-weight.d.ts +5 -0
  197. package/lib/_models/control-models/random-weight.d.ts.map +1 -0
  198. package/lib/_models/control-models/random-weight.js +3 -0
  199. package/lib/_models/control-models/random-weight.js.map +1 -0
  200. package/lib/_models/control-models/subdivision-collection.d.ts +9 -0
  201. package/lib/_models/control-models/subdivision-collection.d.ts.map +1 -0
  202. package/lib/_models/control-models/subdivision-collection.js +3 -0
  203. package/lib/_models/control-models/subdivision-collection.js.map +1 -0
  204. package/lib/_models/control-models/subdivision-region-data.d.ts +45 -0
  205. package/lib/_models/control-models/subdivision-region-data.d.ts.map +1 -0
  206. package/lib/_models/control-models/subdivision-region-data.js +46 -0
  207. package/lib/_models/control-models/subdivision-region-data.js.map +1 -0
  208. package/lib/_models/control-models/usage-action.d.ts +9 -0
  209. package/lib/_models/control-models/usage-action.d.ts.map +1 -0
  210. package/lib/_models/control-models/usage-action.js +13 -0
  211. package/lib/_models/control-models/usage-action.js.map +1 -0
  212. package/lib/_models/control-models/usage-data.d.ts +14 -0
  213. package/lib/_models/control-models/usage-data.d.ts.map +1 -0
  214. package/lib/_models/control-models/usage-data.js +16 -0
  215. package/lib/_models/control-models/usage-data.js.map +1 -0
  216. package/lib/_models/data-models/custom-data.d.ts +16 -0
  217. package/lib/_models/data-models/custom-data.d.ts.map +1 -0
  218. package/lib/_models/data-models/custom-data.js +28 -0
  219. package/lib/_models/data-models/custom-data.js.map +1 -0
  220. package/lib/_models/data-models/dynamo-custom-data.d.ts +16 -0
  221. package/lib/_models/data-models/dynamo-custom-data.d.ts.map +1 -0
  222. package/lib/_models/data-models/dynamo-custom-data.js +28 -0
  223. package/lib/_models/data-models/dynamo-custom-data.js.map +1 -0
  224. package/lib/_models/data-models/dynamo-metadata.d.ts +17 -0
  225. package/lib/_models/data-models/dynamo-metadata.d.ts.map +1 -0
  226. package/lib/_models/data-models/dynamo-metadata.js +17 -0
  227. package/lib/_models/data-models/dynamo-metadata.js.map +1 -0
  228. package/lib/_models/data-models/dynamo-usage-session.d.ts +34 -0
  229. package/lib/_models/data-models/dynamo-usage-session.d.ts.map +1 -0
  230. package/lib/_models/data-models/dynamo-usage-session.js +53 -0
  231. package/lib/_models/data-models/dynamo-usage-session.js.map +1 -0
  232. package/lib/_models/data-models/metadata.d.ts +17 -0
  233. package/lib/_models/data-models/metadata.d.ts.map +1 -0
  234. package/lib/_models/data-models/metadata.js +17 -0
  235. package/lib/_models/data-models/metadata.js.map +1 -0
  236. package/lib/_models/data-models/usage-session.d.ts +34 -0
  237. package/lib/_models/data-models/usage-session.d.ts.map +1 -0
  238. package/lib/_models/data-models/usage-session.js +53 -0
  239. package/lib/_models/data-models/usage-session.js.map +1 -0
  240. package/lib/_models/index.d.ts +19 -0
  241. package/lib/_models/index.d.ts.map +1 -0
  242. package/lib/_models/index.js +25 -0
  243. package/lib/_models/index.js.map +1 -0
  244. package/lib/_modules/data-models.index.d.ts +3 -0
  245. package/lib/_modules/data-models.index.d.ts.map +1 -0
  246. package/lib/_modules/data-models.index.js +7 -0
  247. package/lib/_modules/data-models.index.js.map +1 -0
  248. package/lib/_modules/data-module.index.d.ts +5 -0
  249. package/lib/_modules/data-module.index.d.ts.map +1 -0
  250. package/lib/_modules/data-module.index.js +9 -0
  251. package/lib/_modules/data-module.index.js.map +1 -0
  252. package/lib/_modules/data-modules.index.d.ts +6 -0
  253. package/lib/_modules/data-modules.index.d.ts.map +1 -0
  254. package/lib/_modules/data-modules.index.js +10 -0
  255. package/lib/_modules/data-modules.index.js.map +1 -0
  256. package/lib/_modules/error-module.index.d.ts +2 -0
  257. package/lib/_modules/error-module.index.d.ts.map +1 -0
  258. package/lib/_modules/error-module.index.js +6 -0
  259. package/lib/_modules/error-module.index.js.map +1 -0
  260. package/lib/_modules/shared-service.index.d.ts +8 -0
  261. package/lib/_modules/shared-service.index.d.ts.map +1 -0
  262. package/lib/_modules/shared-service.index.js +12 -0
  263. package/lib/_modules/shared-service.index.js.map +1 -0
  264. package/lib/_modules/test-module.index.d.ts +3 -0
  265. package/lib/_modules/test-module.index.d.ts.map +1 -0
  266. package/lib/_modules/test-module.index.js +7 -0
  267. package/lib/_modules/test-module.index.js.map +1 -0
  268. package/lib/_modules/usage-module.index.d.ts +6 -0
  269. package/lib/_modules/usage-module.index.d.ts.map +1 -0
  270. package/lib/_modules/usage-module.index.js +10 -0
  271. package/lib/_modules/usage-module.index.js.map +1 -0
  272. package/lib/data-models.d.ts +3 -0
  273. package/lib/data-models.d.ts.map +1 -0
  274. package/lib/data-models.js +7 -0
  275. package/lib/data-models.js.map +1 -0
  276. package/lib/index.d.ts +5 -0
  277. package/lib/index.d.ts.map +1 -0
  278. package/lib/index.js +12 -0
  279. package/lib/index.js.map +1 -0
  280. package/lib/tsconfig.tsbuildinfo +3088 -0
  281. package/package.json +1 -1
  282. package/src/_collections/_constants/country-subdivisions/liberia.json +62 -0
  283. package/src/_collections/_constants/country-subdivisions/libyan-arab-jamahiriya.json +90 -0
  284. package/src/_collections/index.ts +2 -3
@@ -0,0 +1,6 @@
1
+ import { LocationCoordinates } from '../../_models/control-models/location-coordinates';
2
+ export declare class Dynamo_Location {
3
+ static getDistanceInKilometres(from: LocationCoordinates, to: LocationCoordinates): number;
4
+ static getLocationDegByKilometers(latiOrLong: 'latitude' | 'longitude', distanceInKm: number, latitude?: number): number;
5
+ }
6
+ //# sourceMappingURL=dynamo-location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-location.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-location.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAGxF,qBAAa,eAAe;IAE1B,MAAM,CAAC,uBAAuB,CAC5B,IAAI,EAAE,mBAAmB,EACzB,EAAE,EAAE,mBAAmB,GACtB,MAAM;IAgBT,MAAM,CAAC,0BAA0B,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;CAiBzH"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Location = void 0;
4
+ const dynamo_error_1 = require("../../_models/control-models/dynamo-error");
5
+ const dynamo_trigonometry_1 = require("./dynamo-trigonometry");
6
+ class Dynamo_Location {
7
+ static getDistanceInKilometres(from, to) {
8
+ const R = 6371; // kilometres
9
+ const φ1 = dynamo_trigonometry_1.Dynamo_Trigonometry.angleToRadians(from.latitude);
10
+ const φ2 = dynamo_trigonometry_1.Dynamo_Trigonometry.angleToRadians(to.latitude);
11
+ const Δφ = dynamo_trigonometry_1.Dynamo_Trigonometry.angleToRadians(to.latitude - from.latitude);
12
+ const Δλ = dynamo_trigonometry_1.Dynamo_Trigonometry.angleToRadians(to.longitude - from.longitude);
13
+ const a = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +
14
+ Math.cos(φ1) * Math.cos(φ2) *
15
+ Math.sin(Δλ / 2) * Math.sin(Δλ / 2);
16
+ const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
17
+ return R * c;
18
+ }
19
+ static getLocationDegByKilometers(latiOrLong, distanceInKm, latitude) {
20
+ if (latiOrLong === 'latitude') {
21
+ return distanceInKm / 110.574;
22
+ }
23
+ else {
24
+ if (latitude) {
25
+ return distanceInKm / (Math.cos(dynamo_trigonometry_1.Dynamo_Trigonometry.angleToRadians(latitude)) * 111.320);
26
+ }
27
+ else {
28
+ throw new dynamo_error_1.Dynamo_Error({
29
+ status: 417,
30
+ errorCode: 'FSM-DSS-505',
31
+ addECToUserMsg: true,
32
+ message: `When using getLocationDegByKilometers for longitude, you need to give latitude! (latiOrLong: ${latiOrLong}, distanceInKm: ${distanceInKm}, latitude: ${latitude})`,
33
+ userMessage: `We encountered an uncought BackEnd Error, please contact the responsible development team.`
34
+ });
35
+ }
36
+ }
37
+ }
38
+ }
39
+ exports.Dynamo_Location = Dynamo_Location;
40
+ //# sourceMappingURL=dynamo-location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-location.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-location.ts"],"names":[],"mappings":";;;AACA,4EAAyE;AAEzE,+DAA4D;AAE5D,MAAa,eAAe;IAE1B,MAAM,CAAC,uBAAuB,CAC5B,IAAyB,EACzB,EAAuB;QAGvB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa;QAC7B,MAAM,EAAE,GAAG,yCAAmB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAM,EAAE,GAAG,yCAAmB,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;QAC3D,MAAM,EAAE,GAAG,yCAAmB,CAAC,cAAc,CAAC,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3E,MAAM,EAAE,GAAG,yCAAmB,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;QAE7E,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEzD,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,UAAoC,EAAE,YAAoB,EAAE,QAAiB;QAC7G,IAAI,UAAU,KAAK,UAAU,EAAE;YAC7B,OAAO,YAAY,GAAG,OAAO,CAAC;SAC/B;aAAM;YACL,IAAI,QAAQ,EAAE;gBACZ,OAAO,YAAY,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,yCAAmB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;aAC1F;iBAAM;gBACL,MAAM,IAAI,2BAAY,CAAC;oBACrB,MAAM,EAAE,GAAG;oBACX,SAAS,EAAE,aAAa;oBACxB,cAAc,EAAE,IAAI;oBACpB,OAAO,EAAE,gGAAgG,UAAU,mBAAmB,YAAY,eAAe,QAAQ,GAAG;oBAC5K,WAAW,EAAE,4FAA4F;iBAC1G,CAAC,CAAC;aACJ;SACF;IACH,CAAC;CACF;AAtCD,0CAsCC"}
@@ -0,0 +1,11 @@
1
+ import { LogStyle } from '../../_enums/log-style.enum';
2
+ export declare class Dynamo_Log {
3
+ static setLogStyle(styles: LogStyle[]): void;
4
+ static resetLogStyle(): void;
5
+ static logStyle(input: string, styles: LogStyle[], dontReset?: boolean): string;
6
+ static logSuccess(message: string, ...optionalParams: any[]): void;
7
+ static logError(message: string, ...optionalParams: any[]): void;
8
+ static logWarning(message: string, ...optionalParams: any[]): void;
9
+ static removeLogStyles(message: string): string;
10
+ }
11
+ //# sourceMappingURL=dynamo-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-log.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,qBAAa,UAAU;IAErB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI;IAO5C,MAAM,CAAC,aAAa,IAAI,IAAI;IAI5B,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM;IAY/E,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAQlE,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAQhE,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAQlE,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAMhD"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Log = void 0;
4
+ const log_style_enum_1 = require("../../_enums/log-style.enum");
5
+ class Dynamo_Log {
6
+ static setLogStyle(styles) {
7
+ let styleSets = '';
8
+ styles.forEach((style) => {
9
+ styleSets += style;
10
+ });
11
+ console.log(styleSets);
12
+ }
13
+ static resetLogStyle() {
14
+ console.log(log_style_enum_1.LogStyle.reset);
15
+ }
16
+ static logStyle(input, styles, dontReset) {
17
+ let result = '';
18
+ styles.forEach((style) => {
19
+ result += style;
20
+ });
21
+ result += input;
22
+ if (!dontReset) {
23
+ result += log_style_enum_1.LogStyle.reset;
24
+ }
25
+ return result;
26
+ }
27
+ static logSuccess(message, ...optionalParams) {
28
+ if (0 < optionalParams.length) {
29
+ console.error(`${log_style_enum_1.LogStyle.green}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
30
+ }
31
+ else {
32
+ console.error(`${log_style_enum_1.LogStyle.green}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
33
+ }
34
+ }
35
+ static logError(message, ...optionalParams) {
36
+ if (0 < optionalParams.length) {
37
+ console.error(`${log_style_enum_1.LogStyle.red}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
38
+ }
39
+ else {
40
+ console.error(`${log_style_enum_1.LogStyle.red}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
41
+ }
42
+ }
43
+ static logWarning(message, ...optionalParams) {
44
+ if (0 < optionalParams.length) {
45
+ console.warn(`${log_style_enum_1.LogStyle.yellow}${log_style_enum_1.LogStyle.bright}${message}`, ...optionalParams, log_style_enum_1.LogStyle.reset);
46
+ }
47
+ else {
48
+ console.warn(`${log_style_enum_1.LogStyle.yellow}${log_style_enum_1.LogStyle.bright}${message}${log_style_enum_1.LogStyle.reset}`);
49
+ }
50
+ }
51
+ static removeLogStyles(message) {
52
+ for (let styleKey of Object(log_style_enum_1.LogStyle)) {
53
+ message = message.replace(new RegExp(log_style_enum_1.LogStyle[styleKey], 'g'), '');
54
+ }
55
+ return message;
56
+ }
57
+ }
58
+ exports.Dynamo_Log = Dynamo_Log;
59
+ //# sourceMappingURL=dynamo-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-log.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-log.ts"],"names":[],"mappings":";;;AACA,gEAAuD;AAEvD,MAAa,UAAU;IAErB,MAAM,CAAC,WAAW,CAAC,MAAkB;QACnC,IAAI,SAAS,GAAG,EAAE,CAAC;QACnB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAe,EAAE,EAAE;YACjC,SAAS,IAAI,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,CAAC,aAAa;QAClB,OAAO,CAAC,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EAAE,CAAC,CAAC;SAC/E;IACH,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAe,EAAE,GAAG,cAAqB;QACzD,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,GAAG,yBAAQ,CAAC,MAAM,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,EAAE,EAAE,GAAG,cAAc,EAAE,yBAAQ,CAAC,KAAK,CAAC,CAAC;SACnG;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,GAAG,yBAAQ,CAAC,MAAM,GAAG,yBAAQ,CAAC,MAAM,GAAG,OAAO,GAAG,yBAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;SACjF;IACH,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,OAAe;QACpC,KAAK,IAAI,QAAQ,IAAI,MAAM,CAAC,yBAAQ,CAAC,EAAE;YACrC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,yBAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;SACpE;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAvDD,gCAuDC"}
@@ -0,0 +1,8 @@
1
+ import { RandomWeight } from '../../_models/control-models/random-weight';
2
+ export declare class Dynamo_Random {
3
+ static getRandomWeightedInt(min: number, max: number, weights: RandomWeight<number>[]): number;
4
+ static getRandomInt(min: number, max: number): number;
5
+ static getRandomListElement<T>(list: T[]): T;
6
+ static getRandomWeighted<T>(weights: RandomWeight<T>[]): T;
7
+ }
8
+ //# sourceMappingURL=dynamo-random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-random.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-random.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE1E,qBAAa,aAAa;IACxB,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM;IAyB9F,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIrD,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC;IAQ5C,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;CAsB3D"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Random = void 0;
4
+ class Dynamo_Random {
5
+ static getRandomWeightedInt(min, max, weights) {
6
+ weights = weights.sort((a, b) => b.chance - a.chance);
7
+ let weightChanceSum = 0;
8
+ weights.forEach(weight => weightChanceSum += weight.chance);
9
+ if (1 < weightChanceSum) {
10
+ weights.forEach(weights => weights.chance = weights.chance / weightChanceSum);
11
+ }
12
+ const randomChance = Math.random();
13
+ let result;
14
+ let chancer = 0;
15
+ for (let i = 0; i < weights.length && result === undefined; i++) {
16
+ chancer += weights[i].chance;
17
+ if (randomChance < chancer) {
18
+ result = weights[i].result;
19
+ }
20
+ }
21
+ if (result !== undefined) {
22
+ return result;
23
+ }
24
+ else {
25
+ return this.getRandomInt(min, max);
26
+ }
27
+ }
28
+ static getRandomInt(min, max) {
29
+ return min + Math.round((max - min) * Math.random());
30
+ }
31
+ static getRandomListElement(list) {
32
+ if (0 < list.length) {
33
+ return list[this.getRandomInt(0, list.length - 1)];
34
+ }
35
+ else {
36
+ return null;
37
+ }
38
+ }
39
+ static getRandomWeighted(weights) {
40
+ if (!(weights === null || weights === void 0 ? void 0 : weights.length)) {
41
+ return null;
42
+ }
43
+ weights = weights.sort((a, b) => b.chance - a.chance);
44
+ let weightChanceSum = 0;
45
+ weights.forEach(weight => weightChanceSum += weight.chance);
46
+ weights.forEach(weights => weights.chance = weights.chance / weightChanceSum);
47
+ const randomChance = Math.random();
48
+ let result;
49
+ let chancer = 0;
50
+ for (let i = 0; i < weights.length && result === undefined; i++) {
51
+ chancer += weights[i].chance;
52
+ if (randomChance < chancer) {
53
+ result = weights[i].result;
54
+ }
55
+ }
56
+ return result;
57
+ }
58
+ }
59
+ exports.Dynamo_Random = Dynamo_Random;
60
+ //# sourceMappingURL=dynamo-random.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-random.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-random.ts"],"names":[],"mappings":";;;AAGA,MAAa,aAAa;IACxB,MAAM,CAAC,oBAAoB,CAAC,GAAW,EAAE,GAAW,EAAE,OAA+B;QACnF,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,eAAe,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG,eAAe,EAAE;YACvB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC;SAC/E;QAED,MAAM,YAAY,GAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,IAAI,MAAc,CAAC;QACnB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7B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,GAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,IAAI,MAAS,CAAC;QACd,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7B,IAAI,YAAY,GAAG,OAAO,EAAE;gBAC1B,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;aAC5B;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AA5DD,sCA4DC"}
@@ -0,0 +1,16 @@
1
+ import { Region } from '../../_enums/region.enum';
2
+ import { CountryPhoneCode } from '../../_models/control-models/country-phone-code';
3
+ import { CountryISO } from '../../_models/control-models/country-iso';
4
+ import { SubdivisionCollection } from '../../_models/control-models/subdivision-collection';
5
+ export declare class Dynamo_Regions {
6
+ static ISOs: CountryISO[];
7
+ static phoneCodes: CountryPhoneCode[];
8
+ static subdivisions: SubdivisionCollection;
9
+ private static getAllCountryISO;
10
+ private static getAllPhoneCodes;
11
+ private static getSubdivisionCollection;
12
+ static iso1ToCountryIso(iso1: string): CountryISO;
13
+ static iso1ToRegion(iso1: string): Region;
14
+ static iso1ToPhoneCode(iso1: string): CountryPhoneCode;
15
+ }
16
+ //# sourceMappingURL=dynamo-regions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-regions.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-regions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAE5F,qBAAa,cAAc;IAEzB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,CAAqC;IAC9D,MAAM,CAAC,UAAU,EAAE,gBAAgB,EAAE,CAAqC;IAC1E,MAAM,CAAC,YAAY,EAAE,qBAAqB,CAA6C;IAEvF,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAG/B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAG/B,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAIvC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAWjD,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAWzC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;CAUvD"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Regions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ISOs = tslib_1.__importStar(require("../_constants/country-codes-ISO-3166.json"));
6
+ const PhoneCodes = tslib_1.__importStar(require("../_constants/country-phone-codes.json"));
7
+ const Subdivisions = tslib_1.__importStar(require("../_constants/country-sub-divisions-ISO-3166.json"));
8
+ const _models_1 = require("../../_models");
9
+ const utilities_1 = require("./utilities");
10
+ class Dynamo_Regions {
11
+ static getAllCountryISO() {
12
+ return utilities_1.JSONListify(ISOs);
13
+ }
14
+ static getAllPhoneCodes() {
15
+ return utilities_1.JSONListify(PhoneCodes);
16
+ }
17
+ static getSubdivisionCollection() {
18
+ return Subdivisions;
19
+ }
20
+ static iso1ToCountryIso(iso1) {
21
+ const country = this.ISOs.find(iso => iso.iso2 == iso1);
22
+ if (!country) {
23
+ throw new _models_1.Dynamo_Error({
24
+ message: `Cannot find ISO-3166 code for this: ${iso1}`
25
+ });
26
+ }
27
+ else {
28
+ return country;
29
+ }
30
+ }
31
+ static iso1ToRegion(iso1) {
32
+ const region = this.ISOs.find(iso => iso.iso2 == iso1).region;
33
+ if (!region) {
34
+ throw new _models_1.Dynamo_Error({
35
+ message: `Cannot find ISO-3166 code for this: ${iso1}`
36
+ });
37
+ }
38
+ else {
39
+ return region;
40
+ }
41
+ }
42
+ static iso1ToPhoneCode(iso1) {
43
+ const phoneCode = this.phoneCodes.find(code => code.iso == iso1);
44
+ if (!phoneCode) {
45
+ throw new _models_1.Dynamo_Error({
46
+ message: `Cannot find ISO-3166 code for this: ${iso1}`
47
+ });
48
+ }
49
+ else {
50
+ return phoneCode;
51
+ }
52
+ }
53
+ }
54
+ exports.Dynamo_Regions = Dynamo_Regions;
55
+ Dynamo_Regions.ISOs = Dynamo_Regions.getAllCountryISO();
56
+ Dynamo_Regions.phoneCodes = Dynamo_Regions.getAllPhoneCodes();
57
+ Dynamo_Regions.subdivisions = Dynamo_Regions.getSubdivisionCollection();
58
+ //# sourceMappingURL=dynamo-regions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-regions.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-regions.ts"],"names":[],"mappings":";;;;AACA,wFAAkE;AAClE,2FAAqE;AACrE,wGAAkF;AAElF,2CAA6C;AAE7C,2CAA0C;AAI1C,MAAa,cAAc;IAMjB,MAAM,CAAC,gBAAgB;QAC7B,OAAO,uBAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IACO,MAAM,CAAC,gBAAgB;QAC7B,OAAO,uBAAW,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC;IACO,MAAM,CAAC,wBAAwB;QACrC,OAAO,YAAqC,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,IAAY;QAClC,MAAM,OAAO,GAAe,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;QACpE,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,sBAAY,CAAC;gBACrB,OAAO,EAAE,uCAAuC,IAAI,EAAE;aACvD,CAAC,CAAC;SACJ;aAAM;YACL,OAAO,OAAO,CAAC;SAChB;IACH,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,MAAM,MAAM,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC;QACtE,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,sBAAY,CAAC;gBACrB,OAAO,EAAE,uCAAuC,IAAI,EAAE;aACvD,CAAC,CAAC;SACJ;aAAM;YACL,OAAO,MAAM,CAAC;SACf;IACH,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,MAAM,SAAS,GAAqB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QACnF,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,sBAAY,CAAC;gBACrB,OAAO,EAAE,uCAAuC,IAAI,EAAE;aACvD,CAAC,CAAC;SACJ;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;;AA/CH,wCAgDC;AA9CQ,mBAAI,GAAiB,cAAc,CAAC,gBAAgB,EAAE,CAAC;AACvD,yBAAU,GAAuB,cAAc,CAAC,gBAAgB,EAAE,CAAC;AACnE,2BAAY,GAA0B,cAAc,CAAC,wBAAwB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare class Dynamo_RoundList {
2
+ static getOutboundedIndex(listLength: number, outboundIndex: number): number;
3
+ static getIndexOpposite(length: number, oppositeOf: number): number;
4
+ static getListIndex<T>(list: T[], outboundIndex: number): T;
5
+ static getListOpposite<T>(list: T[], oppositeOf: T): T;
6
+ static getLast<T>(list: T[]): T;
7
+ }
8
+ //# sourceMappingURL=dynamo-round-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-round-list.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-round-list.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM;IAgB5E,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAOnE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;IAI3D,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;IAItD,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC;CAOhC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_RoundList = void 0;
4
+ class Dynamo_RoundList {
5
+ static getOutboundedIndex(listLength, outboundIndex) {
6
+ if (!(0 < listLength)) {
7
+ throw new Error('roundListPlusIndex failed. list is empty!');
8
+ }
9
+ if (outboundIndex < 0) {
10
+ outboundIndex = outboundIndex % listLength;
11
+ outboundIndex = listLength + outboundIndex;
12
+ }
13
+ if (listLength <= outboundIndex) {
14
+ outboundIndex = outboundIndex % listLength;
15
+ }
16
+ return outboundIndex;
17
+ }
18
+ static getIndexOpposite(length, oppositeOf) {
19
+ const plusIndex = oppositeOf + Math.round(length / 2);
20
+ const res = this.getOutboundedIndex(length, plusIndex);
21
+ return res;
22
+ }
23
+ static getListIndex(list, outboundIndex) {
24
+ return list[this.getOutboundedIndex(list.length, outboundIndex)];
25
+ }
26
+ static getListOpposite(list, oppositeOf) {
27
+ return list[this.getIndexOpposite(list.length, list.indexOf(oppositeOf))];
28
+ }
29
+ static getLast(list) {
30
+ if (0 < list.length) {
31
+ return list[list.length - 1];
32
+ }
33
+ else {
34
+ return null;
35
+ }
36
+ }
37
+ }
38
+ exports.Dynamo_RoundList = Dynamo_RoundList;
39
+ //# sourceMappingURL=dynamo-round-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-round-list.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-round-list.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAC3B,MAAM,CAAC,kBAAkB,CAAC,UAAkB,EAAE,aAAqB;QACjE,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAC9D;QAED,IAAI,aAAa,GAAG,CAAC,EAAE;YACrB,aAAa,GAAG,aAAa,GAAG,UAAU,CAAC;YAC3C,aAAa,GAAG,UAAU,GAAG,aAAa,CAAC;SAC5C;QACD,IAAI,UAAU,IAAI,aAAa,EAAE;YAC/B,aAAa,GAAG,aAAa,GAAG,UAAU,CAAC;SAC5C;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,MAAc,EAAE,UAAkB;QACxD,MAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAEvD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,YAAY,CAAI,IAAS,EAAE,aAAqB;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,CAAC,eAAe,CAAI,IAAS,EAAE,UAAa;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,CAAC,OAAO,CAAI,IAAS;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;YACnB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAC9B;aAAM;YACL,OAAO,IAAI,CAAC;SACb;IACH,CAAC;CACF;AAvCD,4CAuCC"}
@@ -0,0 +1,73 @@
1
+ export declare class Dynamo_Shared {
2
+ /**
3
+ * returns remapped object list by path list
4
+ * @param objList object list to map
5
+ * @param paths string list of path etc.:
6
+ * ```ts
7
+ * [ [ 'first', 'sub', 'label' ], [ 'first', 'dif', 'name' ] ]
8
+ * ```
9
+ * will be...
10
+ * from
11
+ * ```ts
12
+ * {
13
+ * first: {
14
+ * sub: {
15
+ * label: 'vlmi'
16
+ * },
17
+ * dif: {
18
+ * name: 'asd'
19
+ * }
20
+ * }
21
+ * }[]
22
+ * ```
23
+ * to
24
+ * ```
25
+ * { label: 'vlmi', name: 'asd' }[]
26
+ * ```
27
+ * @returns remapped object list (the final obj will use the deepest keys)
28
+ */
29
+ static mapObjList(objList: object[], paths: string[][]): object[];
30
+ /**
31
+ * returns nested value from object
32
+ * @param parentObj data source object
33
+ * @param nestedDataKeys path of value as string list
34
+ * etc.: ['nestLvl1', 'nestLvl2', 'nestLvl3'] as parentObj.nestLvl1.nestLvl2.nestLvl3
35
+ * @returns data from object by path
36
+ */
37
+ static getNestedData(parentObj: object, nestedDataKeys: string[]): any;
38
+ /**
39
+ * recursive function that nests data
40
+ * @param newData the object that that is needed to be updated
41
+ * @param nestKeys the path where the data should be updated
42
+ * @param dataToSet the actual value that will be setted
43
+ * @returns modified data
44
+ */
45
+ static nestData(parentObj: object, nestKeys: string[], dataToSet: any): object;
46
+ /**
47
+ * recursive function that adds to nested data
48
+ * @param newData the object that that is needed to be updated
49
+ * @param nestKeys the path where the data should be updated
50
+ * @param dataToAdd the actual value that will be setted
51
+ * @returns modified data
52
+ */
53
+ static addToNestedData(parentObj: object, nestKeys: string[], dataToAdd: any): object;
54
+ /**
55
+ * recursive function that pushes to nested data
56
+ * @param newData the object that that is needed to be updated
57
+ * @param nestKeys the path where the data should be updated
58
+ * @param dataToPush the actual value that will be setted
59
+ * @returns modified data
60
+ */
61
+ static pushToNestedData(parentObj: object, nestKeys: string[], dataToPush: any): object;
62
+ /**
63
+ * recursive function that nests data on recursive data structure etc.: xData: { ..., 'nestedListKey': xData[] }
64
+ * @param newData the object that that is needed to be updated
65
+ * @param nestedListKey the location of nested dataList
66
+ * @param nestIndexes path to the subject ect.: xData.listKey[1].listKey[4].listKey[0] will be [1, 4, 0]
67
+ * @param dataToSet the actual value that will be setted on location
68
+ * @returns modified data
69
+ */
70
+ static nestRecursiveListedData<T>(parentObj: T, nestedListKey: string, nestIndexes: number[], dataToSet: any): T;
71
+ static addMetadataToSchema(schema: any): any;
72
+ }
73
+ //# sourceMappingURL=dynamo-shared.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-shared.service.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-shared.service.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE;IAYjE;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,GAAG;IAUtE;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,GAAG,MAAM;IAY9E;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,GAAG,MAAM;IAYrF;;;;;;OAMG;IACH,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM;IAgBvF;;;;;;;OAOG;IACH,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC;IAahH,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;CAO7C"}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Dynamo_Shared = void 0;
4
+ const utilities_1 = require("./utilities");
5
+ class Dynamo_Shared {
6
+ /**
7
+ * returns remapped object list by path list
8
+ * @param objList object list to map
9
+ * @param paths string list of path etc.:
10
+ * ```ts
11
+ * [ [ 'first', 'sub', 'label' ], [ 'first', 'dif', 'name' ] ]
12
+ * ```
13
+ * will be...
14
+ * from
15
+ * ```ts
16
+ * {
17
+ * first: {
18
+ * sub: {
19
+ * label: 'vlmi'
20
+ * },
21
+ * dif: {
22
+ * name: 'asd'
23
+ * }
24
+ * }
25
+ * }[]
26
+ * ```
27
+ * to
28
+ * ```
29
+ * { label: 'vlmi', name: 'asd' }[]
30
+ * ```
31
+ * @returns remapped object list (the final obj will use the deepest keys)
32
+ */
33
+ static mapObjList(objList, paths) {
34
+ let newObjList = [...objList];
35
+ newObjList = newObjList.map(obj => {
36
+ const newObj = {};
37
+ paths.forEach((path) => {
38
+ newObj[path[path.length - 1]] = this.getNestedData(obj, path);
39
+ });
40
+ return newObj;
41
+ });
42
+ return newObjList;
43
+ }
44
+ /**
45
+ * returns nested value from object
46
+ * @param parentObj data source object
47
+ * @param nestedDataKeys path of value as string list
48
+ * etc.: ['nestLvl1', 'nestLvl2', 'nestLvl3'] as parentObj.nestLvl1.nestLvl2.nestLvl3
49
+ * @returns data from object by path
50
+ */
51
+ static getNestedData(parentObj, nestedDataKeys) {
52
+ let newData = utilities_1.clone(parentObj); // {...parentObj};
53
+ nestedDataKeys.forEach((dk) => {
54
+ if (newData) {
55
+ newData = newData[dk];
56
+ }
57
+ });
58
+ return newData;
59
+ }
60
+ /**
61
+ * recursive function that nests data
62
+ * @param newData the object that that is needed to be updated
63
+ * @param nestKeys the path where the data should be updated
64
+ * @param dataToSet the actual value that will be setted
65
+ * @returns modified data
66
+ */
67
+ static nestData(parentObj, nestKeys, dataToSet) {
68
+ const newData = utilities_1.clone(parentObj); // {...parentObj};
69
+ if (nestKeys.length > 1) {
70
+ const keys = [...nestKeys];
71
+ const nextNestKey = keys.shift();
72
+ newData[nextNestKey] = this.nestData(newData[nextNestKey], keys, dataToSet);
73
+ }
74
+ else {
75
+ newData[nestKeys[0]] = dataToSet;
76
+ }
77
+ return newData;
78
+ }
79
+ /**
80
+ * recursive function that adds to nested data
81
+ * @param newData the object that that is needed to be updated
82
+ * @param nestKeys the path where the data should be updated
83
+ * @param dataToAdd the actual value that will be setted
84
+ * @returns modified data
85
+ */
86
+ static addToNestedData(parentObj, nestKeys, dataToAdd) {
87
+ const newData = utilities_1.clone(parentObj); // {...parentObj};
88
+ if (nestKeys.length > 1) {
89
+ const keys = [...nestKeys];
90
+ const nextNestKey = keys.shift();
91
+ newData[nextNestKey] = this.addToNestedData(newData[nextNestKey], keys, dataToAdd);
92
+ }
93
+ else {
94
+ newData[nestKeys[0]] += dataToAdd;
95
+ }
96
+ return newData;
97
+ }
98
+ /**
99
+ * recursive function that pushes to nested data
100
+ * @param newData the object that that is needed to be updated
101
+ * @param nestKeys the path where the data should be updated
102
+ * @param dataToPush the actual value that will be setted
103
+ * @returns modified data
104
+ */
105
+ static pushToNestedData(parentObj, nestKeys, dataToPush) {
106
+ const newData = utilities_1.clone(parentObj); // {...parentObj};
107
+ if (nestKeys.length > 1) {
108
+ const keys = [...nestKeys];
109
+ const nextNestKey = keys.shift();
110
+ newData[nextNestKey] = this.pushToNestedData(newData[nextNestKey], keys, dataToPush);
111
+ }
112
+ else {
113
+ if (Array.isArray(newData[nestKeys[0]])) {
114
+ newData[nestKeys[0]].push(dataToPush);
115
+ }
116
+ else {
117
+ newData[nestKeys[0]] = [dataToPush];
118
+ }
119
+ }
120
+ return newData;
121
+ }
122
+ /**
123
+ * recursive function that nests data on recursive data structure etc.: xData: { ..., 'nestedListKey': xData[] }
124
+ * @param newData the object that that is needed to be updated
125
+ * @param nestedListKey the location of nested dataList
126
+ * @param nestIndexes path to the subject ect.: xData.listKey[1].listKey[4].listKey[0] will be [1, 4, 0]
127
+ * @param dataToSet the actual value that will be setted on location
128
+ * @returns modified data
129
+ */
130
+ static nestRecursiveListedData(parentObj, nestedListKey, nestIndexes, dataToSet) {
131
+ const newData = utilities_1.clone(parentObj); // parentObj; // {...parentObj};
132
+ if (nestIndexes.length > 1) {
133
+ const indexes = [...nestIndexes];
134
+ const nextLevelKey = indexes.shift();
135
+ newData[nestedListKey][nextLevelKey] = this.nestRecursiveListedData(newData[nestedListKey][nextLevelKey], nestedListKey, indexes, dataToSet);
136
+ }
137
+ else {
138
+ newData[nestedListKey][nestIndexes[0]] = dataToSet;
139
+ }
140
+ return newData;
141
+ }
142
+ static addMetadataToSchema(schema) {
143
+ schema.__created = { type: Date };
144
+ schema.__createdBy = { type: String };
145
+ schema.__lastModified = { type: Date };
146
+ schema.__lastModifiedBy = { type: String };
147
+ return schema;
148
+ }
149
+ }
150
+ exports.Dynamo_Shared = Dynamo_Shared;
151
+ //# sourceMappingURL=dynamo-shared.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-shared.service.js","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-shared.service.ts"],"names":[],"mappings":";;;AACA,2CAAoC;AAEpC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CAAC;IAChB,CAAC;CACF;AAnJD,sCAmJC"}
@@ -0,0 +1,12 @@
1
+ export declare class Dynamo_Time {
2
+ static getAge(birthDate: Date | number | string): number;
3
+ static getYear(date: Date | number | string): number;
4
+ static getHour(date: Date | number | string): number;
5
+ static getDateByAge(age: number): Date;
6
+ static oneHourAgo(): Date;
7
+ static oneDayAgo(): Date;
8
+ static oneWeekAgo(): Date;
9
+ static oneMonthAgo(): Date;
10
+ static oneYearAgo(): Date;
11
+ }
12
+ //# sourceMappingURL=dynamo-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-time.d.ts","sourceRoot":"","sources":["../../../src/_collections/_tools/dynamo-time.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;IAEtB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAI/C,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAO3C,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAO3C,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM;IAI/B,MAAM,CAAC,UAAU,IAAI,IAAI;IAIzB,MAAM,CAAC,SAAS,IAAI,IAAI;IAIxB,MAAM,CAAC,UAAU,IAAI,IAAI;IAIzB,MAAM,CAAC,WAAW,IAAI,IAAI;IAI1B,MAAM,CAAC,UAAU,IAAI,IAAI;CAG1B"}