@futdevpro/fsm-dynamo 1.5.38 → 1.5.43

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 (398) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/src/_collections/_constants/country-codes-ISO-3166.json +3239 -0
  4. package/src/_collections/_constants/country-phone-codes.json +1203 -0
  5. package/src/_collections/_constants/country-sub-divisions-ISO-3166.json +4994 -0
  6. package/src/_collections/_constants/country-subdivisions/afghanistan.json +138 -0
  7. package/src/_collections/_constants/country-subdivisions/albania.json +50 -0
  8. package/src/_collections/_constants/country-subdivisions/algeria.json +194 -0
  9. package/src/_collections/_constants/country-subdivisions/andorra.json +30 -0
  10. package/src/_collections/_constants/country-subdivisions/angola.json +74 -0
  11. package/src/_collections/_constants/country-subdivisions/antigua-and-barbuda.json +34 -0
  12. package/src/_collections/_constants/country-subdivisions/argentina.json +98 -0
  13. package/src/_collections/_constants/country-subdivisions/armenia.json +46 -0
  14. package/src/_collections/_constants/country-subdivisions/australia.json +34 -0
  15. package/src/_collections/_constants/country-subdivisions/austria.json +38 -0
  16. package/src/_collections/_constants/country-subdivisions/azerbaijan.json +6 -0
  17. package/src/_collections/_constants/country-subdivisions/bahamas.json +126 -0
  18. package/src/_collections/_constants/country-subdivisions/bahrain.json +22 -0
  19. package/src/_collections/_constants/country-subdivisions/bangladesh.json +30 -0
  20. package/src/_collections/_constants/country-subdivisions/barbados.json +46 -0
  21. package/src/_collections/_constants/country-subdivisions/belarus.json +30 -0
  22. package/src/_collections/_constants/country-subdivisions/belgium.json +14 -0
  23. package/src/_collections/_constants/country-subdivisions/belize.json +26 -0
  24. package/src/_collections/_constants/country-subdivisions/benin.json +50 -0
  25. package/src/_collections/_constants/country-subdivisions/bhutan.json +82 -0
  26. package/src/_collections/_constants/country-subdivisions/bolivia.json +38 -0
  27. package/src/_collections/_constants/country-subdivisions/bosnia-and-herzegovina.json +14 -0
  28. package/src/_collections/_constants/country-subdivisions/botswana.json +66 -0
  29. package/src/_collections/_constants/country-subdivisions/brazil.json +110 -0
  30. package/src/_collections/_constants/country-subdivisions/brunei-darussalam.json +18 -0
  31. package/src/_collections/_constants/country-subdivisions/bulgaria.json +114 -0
  32. package/src/_collections/_constants/country-subdivisions/burkina-faso.json +54 -0
  33. package/src/_collections/_constants/country-subdivisions/burundi.json +70 -0
  34. package/src/_collections/_constants/country-subdivisions/cambodia.json +98 -0
  35. package/src/_collections/_constants/country-subdivisions/cameroon.json +42 -0
  36. package/src/_collections/_constants/country-subdivisions/canada.json +80 -0
  37. package/src/_collections/_constants/country-subdivisions/cape-verde.json +10 -0
  38. package/src/_collections/_constants/country-subdivisions/central-african-republic.json +70 -0
  39. package/src/_collections/_constants/country-subdivisions/chad.json +90 -0
  40. package/src/_collections/_constants/country-subdivisions/chile.json +62 -0
  41. package/src/_collections/_constants/country-subdivisions/china.json +206 -0
  42. package/src/_collections/_constants/country-subdivisions/colombia.json +134 -0
  43. package/src/_collections/_constants/country-subdivisions/comoros.json +14 -0
  44. package/src/_collections/_constants/country-subdivisions/congo-the-democratic-republic-of-the.json +46 -0
  45. package/src/_collections/_constants/country-subdivisions/congo.json +50 -0
  46. package/src/_collections/_constants/country-subdivisions/costa-rica.json +30 -0
  47. package/src/_collections/_constants/country-subdivisions/cote-d-ivoire-republic-of.json +78 -0
  48. package/src/_collections/_constants/country-subdivisions/croatia.json +86 -0
  49. package/src/_collections/_constants/country-subdivisions/cuba.json +66 -0
  50. package/src/_collections/_constants/country-subdivisions/cyprus.json +26 -0
  51. package/src/_collections/_constants/country-subdivisions/czech-republic.json +58 -0
  52. package/src/_collections/_constants/country-subdivisions/denmark.json +22 -0
  53. package/src/_collections/_constants/country-subdivisions/djibouti.json +26 -0
  54. package/src/_collections/_constants/country-subdivisions/dominica.json +42 -0
  55. package/src/_collections/_constants/country-subdivisions/dominican-republic.json +42 -0
  56. package/src/_collections/_constants/country-subdivisions/ecuador.json +98 -0
  57. package/src/_collections/_constants/country-subdivisions/egypt.json +118 -0
  58. package/src/_collections/_constants/country-subdivisions/el-salvador.json +58 -0
  59. package/src/_collections/_constants/country-subdivisions/equatorial-guinea.json +10 -0
  60. package/src/_collections/_constants/country-subdivisions/eritrea.json +26 -0
  61. package/src/_collections/_constants/country-subdivisions/estonia.json +62 -0
  62. package/src/_collections/_constants/country-subdivisions/ethiopia.json +46 -0
  63. package/src/_collections/_constants/country-subdivisions/fiji.json +22 -0
  64. package/src/_collections/_constants/country-subdivisions/finland.json +78 -0
  65. package/src/_collections/_constants/country-subdivisions/france.json +134 -0
  66. package/src/_collections/_constants/country-subdivisions/gabon.json +38 -0
  67. package/src/_collections/_constants/country-subdivisions/gambia.json +26 -0
  68. package/src/_collections/_constants/country-subdivisions/georgia.json +50 -0
  69. package/src/_collections/_constants/country-subdivisions/germany.json +66 -0
  70. package/src/_collections/_constants/country-subdivisions/ghana.json +42 -0
  71. package/src/_collections/_constants/country-subdivisions/greece.json +54 -0
  72. package/src/_collections/_constants/country-subdivisions/greenland.json +18 -0
  73. package/src/_collections/_constants/country-subdivisions/grenada.json +30 -0
  74. package/src/_collections/_constants/country-subdivisions/guatemala.json +90 -0
  75. package/src/_collections/_constants/country-subdivisions/guinea-bissau.json +14 -0
  76. package/src/_collections/_constants/country-subdivisions/guinea.json +34 -0
  77. package/src/_collections/_constants/country-subdivisions/guyana.json +42 -0
  78. package/src/_collections/_constants/country-subdivisions/haiti.json +42 -0
  79. package/src/_collections/_constants/country-subdivisions/honduras.json +74 -0
  80. package/src/_collections/_constants/country-subdivisions/hong-kong.json +5 -0
  81. package/src/_collections/_constants/country-subdivisions/hungary.json +174 -0
  82. package/src/_collections/_constants/country-subdivisions/iceland.json +38 -0
  83. package/src/_collections/_constants/country-subdivisions/india.json +182 -0
  84. package/src/_collections/_constants/country-subdivisions/indonesia.json +30 -0
  85. package/src/_collections/_constants/country-subdivisions/iran-islamic-republic-of.json +126 -0
  86. package/src/_collections/_constants/country-subdivisions/iraq.json +74 -0
  87. package/src/_collections/_constants/country-subdivisions/ireland.json +18 -0
  88. package/src/_collections/_constants/country-subdivisions/israel.json +26 -0
  89. package/src/_collections/_constants/country-subdivisions/italy.json +82 -0
  90. package/src/_collections/_constants/country-subdivisions/jamaica.json +58 -0
  91. package/src/_collections/_constants/country-subdivisions/japan.json +190 -0
  92. package/src/_collections/_constants/country-subdivisions/jordan.json +50 -0
  93. package/src/_collections/_constants/country-subdivisions/kazakhstan.json +66 -0
  94. package/src/_collections/_constants/country-subdivisions/kenya.json +34 -0
  95. package/src/_collections/_constants/country-subdivisions/kiribati.json +14 -0
  96. package/src/_collections/_constants/country-subdivisions/korea-democratic-people-s-republic-of.json +46 -0
  97. package/src/_collections/_constants/country-subdivisions/korea-republic-of.json +70 -0
  98. package/src/_collections/_constants/country-subdivisions/kuwait.json +26 -0
  99. package/src/_collections/_constants/country-subdivisions/kyrgyzstan.json +34 -0
  100. package/src/_collections/_constants/country-subdivisions/lao-people-s-democratic-republic.json +74 -0
  101. package/src/_collections/_constants/country-subdivisions/latvia.json +478 -0
  102. package/src/_collections/_constants/country-subdivisions/lebanon.json +34 -0
  103. package/src/_collections/_constants/country-subdivisions/lesotho.json +42 -0
  104. package/src/_collections/_constants/country-subdivisions/liechtenstein.json +46 -0
  105. package/src/_collections/_constants/country-subdivisions/lithuania.json +42 -0
  106. package/src/_collections/_constants/country-subdivisions/luxembourg.json +14 -0
  107. package/src/_collections/_constants/country-subdivisions/macedonia-the-former-yugoslav-republic-of.json +338 -0
  108. package/src/_collections/_constants/country-subdivisions/madagascar.json +26 -0
  109. package/src/_collections/_constants/country-subdivisions/malawi.json +14 -0
  110. package/src/_collections/_constants/country-subdivisions/malaysia.json +82 -0
  111. package/src/_collections/_constants/country-subdivisions/maldives.json +34 -0
  112. package/src/_collections/_constants/country-subdivisions/mali.json +38 -0
  113. package/src/_collections/_constants/country-subdivisions/malta.json +274 -0
  114. package/src/_collections/_constants/country-subdivisions/marshall-islands.json +10 -0
  115. package/src/_collections/_constants/country-subdivisions/mauritania.json +54 -0
  116. package/src/_collections/_constants/country-subdivisions/mauritius.json +70 -0
  117. package/src/_collections/_constants/country-subdivisions/mexico.json +162 -0
  118. package/src/_collections/_constants/country-subdivisions/micronesia-federated-states-of.json +18 -0
  119. package/src/_collections/_constants/country-subdivisions/moldova-republic-of.json +150 -0
  120. package/src/_collections/_constants/country-subdivisions/monaco.json +70 -0
  121. package/src/_collections/_constants/country-subdivisions/mongolia.json +90 -0
  122. package/src/_collections/_constants/country-subdivisions/montenegro.json +94 -0
  123. package/src/_collections/_constants/country-subdivisions/morocco.json +66 -0
  124. package/src/_collections/_constants/country-subdivisions/mozambique.json +46 -0
  125. package/src/_collections/_constants/country-subdivisions/myanmar.json +58 -0
  126. package/src/_collections/_constants/country-subdivisions/namibia.json +58 -0
  127. package/src/_collections/_constants/country-subdivisions/nauru.json +58 -0
  128. package/src/_collections/_constants/country-subdivisions/nepal.json +22 -0
  129. package/src/_collections/_constants/country-subdivisions/netherlands.json +92 -0
  130. package/src/_collections/_constants/country-subdivisions/new-zealand.json +112 -0
  131. package/src/_collections/_constants/country-subdivisions/nicaragua.json +70 -0
  132. package/src/_collections/_constants/country-subdivisions/niger.json +34 -0
  133. package/src/_collections/_constants/country-subdivisions/nigeria.json +150 -0
  134. package/src/_collections/_constants/country-subdivisions/norway.json +86 -0
  135. package/src/_collections/_constants/country-subdivisions/oman.json +38 -0
  136. package/src/_collections/_constants/country-subdivisions/pakistan.json +34 -0
  137. package/src/_collections/_constants/country-subdivisions/palau.json +66 -0
  138. package/src/_collections/_constants/country-subdivisions/palestinian-territory-occupied.json +66 -0
  139. package/src/_collections/_constants/country-subdivisions/panama.json +54 -0
  140. package/src/_collections/_constants/country-subdivisions/papua-new-guinea.json +82 -0
  141. package/src/_collections/_constants/country-subdivisions/paraguay.json +74 -0
  142. package/src/_collections/_constants/country-subdivisions/peru.json +106 -0
  143. package/src/_collections/_constants/country-subdivisions/philippines.json +70 -0
  144. package/src/_collections/_constants/country-subdivisions/poland.json +66 -0
  145. package/src/_collections/_constants/country-subdivisions/portugal.json +82 -0
  146. package/src/_collections/_constants/country-subdivisions/qatar.json +30 -0
  147. package/src/_collections/_constants/country-subdivisions/romania.json +170 -0
  148. package/src/_collections/_constants/country-subdivisions/russian-federation.json +500 -0
  149. package/src/_collections/_constants/country-subdivisions/rwanda.json +22 -0
  150. package/src/_collections/_constants/country-subdivisions/saint-helena-ascension-and-tristan-da-cunha.json +14 -0
  151. package/src/_collections/_constants/country-subdivisions/saint-kitts-and-nevis.json +10 -0
  152. package/src/_collections/_constants/country-subdivisions/saint-lucia.json +46 -0
  153. package/src/_collections/_constants/country-subdivisions/saint-vincent-and-the-grenadines.json +26 -0
  154. package/src/_collections/_constants/country-subdivisions/samoa.json +46 -0
  155. package/src/_collections/_constants/country-subdivisions/san-marino.json +38 -0
  156. package/src/_collections/_constants/country-subdivisions/sao-tome-and-principe.json +10 -0
  157. package/src/_collections/_constants/country-subdivisions/saudi-arabia.json +54 -0
  158. package/src/_collections/_constants/country-subdivisions/senegal.json +58 -0
  159. package/src/_collections/_constants/country-subdivisions/serbia.json +10 -0
  160. package/src/_collections/_constants/country-subdivisions/seychelles.json +102 -0
  161. package/src/_collections/_constants/country-subdivisions/sierra-leone.json +18 -0
  162. package/src/_collections/_constants/country-subdivisions/singapore.json +22 -0
  163. package/src/_collections/_constants/country-subdivisions/slovakia.json +34 -0
  164. package/src/_collections/_constants/country-subdivisions/slovenia.json +842 -0
  165. package/src/_collections/_constants/country-subdivisions/solomon-islands.json +42 -0
  166. package/src/_collections/_constants/country-subdivisions/somalia.json +74 -0
  167. package/src/_collections/_constants/country-subdivisions/south-africa.json +38 -0
  168. package/src/_collections/_constants/country-subdivisions/south-sudan.json +42 -0
  169. package/src/_collections/_constants/country-subdivisions/spain.json +347 -0
  170. package/src/_collections/_constants/country-subdivisions/sri-lanka.json +38 -0
  171. package/src/_collections/_constants/country-subdivisions/sudan.json +70 -0
  172. package/src/_collections/_constants/country-subdivisions/suriname.json +42 -0
  173. package/src/_collections/_constants/country-subdivisions/swaziland.json +18 -0
  174. package/src/_collections/_constants/country-subdivisions/sweden.json +86 -0
  175. package/src/_collections/_constants/country-subdivisions/switzerland.json +106 -0
  176. package/src/_collections/_constants/country-subdivisions/syrian-arab-republic.json +58 -0
  177. package/src/_collections/_constants/country-subdivisions/taiwan-province-of-china.json +94 -0
  178. package/src/_collections/_constants/country-subdivisions/tajikistan.json +18 -0
  179. package/src/_collections/_constants/country-subdivisions/tanzania-united-republic-of.json +106 -0
  180. package/src/_collections/_constants/country-subdivisions/thailand.json +314 -0
  181. package/src/_collections/_constants/country-subdivisions/timor-leste.json +54 -0
  182. package/src/_collections/_constants/country-subdivisions/togo.json +22 -0
  183. package/src/_collections/_constants/country-subdivisions/tonga.json +22 -0
  184. package/src/_collections/_constants/country-subdivisions/trinidad-and-tobago.json +66 -0
  185. package/src/_collections/_constants/country-subdivisions/tunisia.json +98 -0
  186. package/src/_collections/_constants/country-subdivisions/turkey.json +326 -0
  187. package/src/_collections/_constants/country-subdivisions/turkmenistan.json +26 -0
  188. package/src/_collections/_constants/country-subdivisions/tuvalu.json +34 -0
  189. package/src/_collections/_constants/country-subdivisions/uganda.json +18 -0
  190. package/src/_collections/_constants/country-subdivisions/ukraine.json +110 -0
  191. package/src/_collections/_constants/country-subdivisions/united-arab-emirates.json +30 -0
  192. package/src/_collections/_constants/country-subdivisions/united-kingdom.json +1197 -0
  193. package/src/_collections/_constants/country-subdivisions/united-states-minor-outlying-islands.json +38 -0
  194. package/src/_collections/_constants/country-subdivisions/united-states.json +287 -0
  195. package/src/_collections/_constants/country-subdivisions/uruguay.json +78 -0
  196. package/src/_collections/_constants/country-subdivisions/uzbekistan.json +58 -0
  197. package/src/_collections/_constants/country-subdivisions/vanuatu.json +26 -0
  198. package/src/_collections/_constants/country-subdivisions/venezuela.json +102 -0
  199. package/src/_collections/_constants/country-subdivisions/viet-nam.json +258 -0
  200. package/src/_collections/_constants/country-subdivisions/yemen.json +86 -0
  201. package/src/_collections/_constants/country-subdivisions/zambia.json +38 -0
  202. package/src/_collections/_constants/country-subdivisions/zimbabwe.json +42 -0
  203. package/src/_collections/_tools/dynamo-location.ts +46 -0
  204. package/src/_collections/_tools/dynamo-log.ts +60 -0
  205. package/src/_collections/_tools/dynamo-random.ts +64 -0
  206. package/src/_collections/_tools/dynamo-regions.ts +60 -0
  207. package/src/_collections/_tools/dynamo-round-list.ts +42 -0
  208. package/src/_collections/_tools/dynamo-shared.service.ts +151 -0
  209. package/src/_collections/_tools/dynamo-time.ts +47 -0
  210. package/src/_collections/_tools/dynamo-trigonometry.ts +63 -0
  211. package/src/_collections/_tools/utilities.ts +67 -0
  212. package/src/_collections/_tools/vector.ts +119 -0
  213. package/src/_collections/index.ts +12 -3
  214. package/src/_enums/region.enum.ts +9 -0
  215. package/src/_enums/sub-region.enum.ts +26 -0
  216. package/src/_models/control-models/country-iso.ts +16 -0
  217. package/src/_models/control-models/country-phone-code.ts +7 -0
  218. package/src/_models/control-models/dynamo-error.ts +15 -2
  219. package/src/_models/control-models/random-weight.ts +7 -0
  220. package/src/_models/control-models/subdivision-collection.ts +10 -0
  221. package/src/_models/control-models/subdivision-region-data.ts +49 -0
  222. package/src/_models/index.ts +10 -4
  223. package/src/_modules/shared-service.index.ts +1 -1
  224. package/lib/_collections/dynamo-shared.service.d.ts +0 -87
  225. package/lib/_collections/dynamo-shared.service.d.ts.map +0 -1
  226. package/lib/_collections/dynamo-shared.service.js +0 -261
  227. package/lib/_collections/dynamo-shared.service.js.map +0 -1
  228. package/lib/_collections/index.d.ts +0 -2
  229. package/lib/_collections/index.d.ts.map +0 -1
  230. package/lib/_collections/index.js +0 -6
  231. package/lib/_collections/index.js.map +0 -1
  232. package/lib/_constants/index.d.ts +0 -4
  233. package/lib/_constants/index.d.ts.map +0 -1
  234. package/lib/_constants/index.js +0 -9
  235. package/lib/_constants/index.js.map +0 -1
  236. package/lib/_constants/module-settings/test-module-settings.d.ts +0 -3
  237. package/lib/_constants/module-settings/test-module-settings.d.ts.map +0 -1
  238. package/lib/_constants/module-settings/test-module-settings.js +0 -16
  239. package/lib/_constants/module-settings/test-module-settings.js.map +0 -1
  240. package/lib/_constants/module-settings/usage-module-settings.d.ts +0 -3
  241. package/lib/_constants/module-settings/usage-module-settings.d.ts.map +0 -1
  242. package/lib/_constants/module-settings/usage-module-settings.js +0 -13
  243. package/lib/_constants/module-settings/usage-module-settings.js.map +0 -1
  244. package/lib/_constants/times.d.ts +0 -8
  245. package/lib/_constants/times.d.ts.map +0 -1
  246. package/lib/_constants/times.js +0 -11
  247. package/lib/_constants/times.js.map +0 -1
  248. package/lib/_enums/data-model-type.enum.d.ts +0 -6
  249. package/lib/_enums/data-model-type.enum.d.ts.map +0 -1
  250. package/lib/_enums/data-model-type.enum.js +0 -10
  251. package/lib/_enums/data-model-type.enum.js.map +0 -1
  252. package/lib/_enums/index.d.ts +0 -3
  253. package/lib/_enums/index.d.ts.map +0 -1
  254. package/lib/_enums/index.js +0 -7
  255. package/lib/_enums/index.js.map +0 -1
  256. package/lib/_enums/log-style.enum.d.ts +0 -26
  257. package/lib/_enums/log-style.enum.d.ts.map +0 -1
  258. package/lib/_enums/log-style.enum.js +0 -30
  259. package/lib/_enums/log-style.enum.js.map +0 -1
  260. package/lib/_models/control-models/daily-usage-data.d.ts +0 -18
  261. package/lib/_models/control-models/daily-usage-data.d.ts.map +0 -1
  262. package/lib/_models/control-models/daily-usage-data.js +0 -22
  263. package/lib/_models/control-models/daily-usage-data.js.map +0 -1
  264. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts +0 -18
  265. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts.map +0 -1
  266. package/lib/_models/control-models/dynamo-daily-usage-data.js +0 -22
  267. package/lib/_models/control-models/dynamo-daily-usage-data.js.map +0 -1
  268. package/lib/_models/control-models/dynamo-error.d.ts +0 -263
  269. package/lib/_models/control-models/dynamo-error.d.ts.map +0 -1
  270. package/lib/_models/control-models/dynamo-error.js +0 -102
  271. package/lib/_models/control-models/dynamo-error.js.map +0 -1
  272. package/lib/_models/control-models/dynamo-module-settings.d.ts +0 -7
  273. package/lib/_models/control-models/dynamo-module-settings.d.ts.map +0 -1
  274. package/lib/_models/control-models/dynamo-module-settings.js +0 -3
  275. package/lib/_models/control-models/dynamo-module-settings.js.map +0 -1
  276. package/lib/_models/control-models/dynamo-nts-data-params.d.ts +0 -14
  277. package/lib/_models/control-models/dynamo-nts-data-params.d.ts.map +0 -1
  278. package/lib/_models/control-models/dynamo-nts-data-params.js +0 -19
  279. package/lib/_models/control-models/dynamo-nts-data-params.js.map +0 -1
  280. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts +0 -45
  281. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts.map +0 -1
  282. package/lib/_models/control-models/dynamo-nts-data-property-params.js +0 -61
  283. package/lib/_models/control-models/dynamo-nts-data-property-params.js.map +0 -1
  284. package/lib/_models/control-models/dynamo-nts-error.d.ts +0 -19
  285. package/lib/_models/control-models/dynamo-nts-error.d.ts.map +0 -1
  286. package/lib/_models/control-models/dynamo-nts-error.js +0 -190
  287. package/lib/_models/control-models/dynamo-nts-error.js.map +0 -1
  288. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts +0 -7
  289. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts.map +0 -1
  290. package/lib/_models/control-models/dynamo-nts-module-settings.js +0 -3
  291. package/lib/_models/control-models/dynamo-nts-module-settings.js.map +0 -1
  292. package/lib/_models/control-models/dynamo-poll.d.ts +0 -31
  293. package/lib/_models/control-models/dynamo-poll.d.ts.map +0 -1
  294. package/lib/_models/control-models/dynamo-poll.js +0 -90
  295. package/lib/_models/control-models/dynamo-poll.js.map +0 -1
  296. package/lib/_models/control-models/dynamo-usage-action.d.ts +0 -9
  297. package/lib/_models/control-models/dynamo-usage-action.d.ts.map +0 -1
  298. package/lib/_models/control-models/dynamo-usage-action.js +0 -13
  299. package/lib/_models/control-models/dynamo-usage-action.js.map +0 -1
  300. package/lib/_models/control-models/dynamo-usage-data.d.ts +0 -14
  301. package/lib/_models/control-models/dynamo-usage-data.d.ts.map +0 -1
  302. package/lib/_models/control-models/dynamo-usage-data.js +0 -16
  303. package/lib/_models/control-models/dynamo-usage-data.js.map +0 -1
  304. package/lib/_models/control-models/dynamobe-data-params.d.ts +0 -14
  305. package/lib/_models/control-models/dynamobe-data-params.d.ts.map +0 -1
  306. package/lib/_models/control-models/dynamobe-data-params.js +0 -19
  307. package/lib/_models/control-models/dynamobe-data-params.js.map +0 -1
  308. package/lib/_models/control-models/dynamobe-data-property-params.d.ts +0 -28
  309. package/lib/_models/control-models/dynamobe-data-property-params.d.ts.map +0 -1
  310. package/lib/_models/control-models/dynamobe-data-property-params.js +0 -57
  311. package/lib/_models/control-models/dynamobe-data-property-params.js.map +0 -1
  312. package/lib/_models/control-models/dynamobe-error.d.ts +0 -19
  313. package/lib/_models/control-models/dynamobe-error.d.ts.map +0 -1
  314. package/lib/_models/control-models/dynamobe-error.js +0 -188
  315. package/lib/_models/control-models/dynamobe-error.js.map +0 -1
  316. package/lib/_models/control-models/geo-ip-location.d.ts +0 -26
  317. package/lib/_models/control-models/geo-ip-location.d.ts.map +0 -1
  318. package/lib/_models/control-models/geo-ip-location.js +0 -3
  319. package/lib/_models/control-models/geo-ip-location.js.map +0 -1
  320. package/lib/_models/control-models/location-coordinates.d.ts +0 -5
  321. package/lib/_models/control-models/location-coordinates.d.ts.map +0 -1
  322. package/lib/_models/control-models/location-coordinates.js +0 -3
  323. package/lib/_models/control-models/location-coordinates.js.map +0 -1
  324. package/lib/_models/control-models/usage-action.d.ts +0 -9
  325. package/lib/_models/control-models/usage-action.d.ts.map +0 -1
  326. package/lib/_models/control-models/usage-action.js +0 -13
  327. package/lib/_models/control-models/usage-action.js.map +0 -1
  328. package/lib/_models/control-models/usage-data.d.ts +0 -14
  329. package/lib/_models/control-models/usage-data.d.ts.map +0 -1
  330. package/lib/_models/control-models/usage-data.js +0 -16
  331. package/lib/_models/control-models/usage-data.js.map +0 -1
  332. package/lib/_models/data-models/custom-data.d.ts +0 -16
  333. package/lib/_models/data-models/custom-data.d.ts.map +0 -1
  334. package/lib/_models/data-models/custom-data.js +0 -28
  335. package/lib/_models/data-models/custom-data.js.map +0 -1
  336. package/lib/_models/data-models/dynamo-custom-data.d.ts +0 -16
  337. package/lib/_models/data-models/dynamo-custom-data.d.ts.map +0 -1
  338. package/lib/_models/data-models/dynamo-custom-data.js +0 -28
  339. package/lib/_models/data-models/dynamo-custom-data.js.map +0 -1
  340. package/lib/_models/data-models/dynamo-metadata.d.ts +0 -17
  341. package/lib/_models/data-models/dynamo-metadata.d.ts.map +0 -1
  342. package/lib/_models/data-models/dynamo-metadata.js +0 -17
  343. package/lib/_models/data-models/dynamo-metadata.js.map +0 -1
  344. package/lib/_models/data-models/dynamo-usage-session.d.ts +0 -34
  345. package/lib/_models/data-models/dynamo-usage-session.d.ts.map +0 -1
  346. package/lib/_models/data-models/dynamo-usage-session.js +0 -53
  347. package/lib/_models/data-models/dynamo-usage-session.js.map +0 -1
  348. package/lib/_models/data-models/metadata.d.ts +0 -17
  349. package/lib/_models/data-models/metadata.d.ts.map +0 -1
  350. package/lib/_models/data-models/metadata.js +0 -17
  351. package/lib/_models/data-models/metadata.js.map +0 -1
  352. package/lib/_models/data-models/usage-session.d.ts +0 -34
  353. package/lib/_models/data-models/usage-session.d.ts.map +0 -1
  354. package/lib/_models/data-models/usage-session.js +0 -53
  355. package/lib/_models/data-models/usage-session.js.map +0 -1
  356. package/lib/_models/index.d.ts +0 -13
  357. package/lib/_models/index.d.ts.map +0 -1
  358. package/lib/_models/index.js +0 -19
  359. package/lib/_models/index.js.map +0 -1
  360. package/lib/_modules/data-models.index.d.ts +0 -3
  361. package/lib/_modules/data-models.index.d.ts.map +0 -1
  362. package/lib/_modules/data-models.index.js +0 -7
  363. package/lib/_modules/data-models.index.js.map +0 -1
  364. package/lib/_modules/data-module.index.d.ts +0 -5
  365. package/lib/_modules/data-module.index.d.ts.map +0 -1
  366. package/lib/_modules/data-module.index.js +0 -9
  367. package/lib/_modules/data-module.index.js.map +0 -1
  368. package/lib/_modules/data-modules.index.d.ts +0 -6
  369. package/lib/_modules/data-modules.index.d.ts.map +0 -1
  370. package/lib/_modules/data-modules.index.js +0 -10
  371. package/lib/_modules/data-modules.index.js.map +0 -1
  372. package/lib/_modules/error-module.index.d.ts +0 -2
  373. package/lib/_modules/error-module.index.d.ts.map +0 -1
  374. package/lib/_modules/error-module.index.js +0 -6
  375. package/lib/_modules/error-module.index.js.map +0 -1
  376. package/lib/_modules/shared-service.index.d.ts +0 -8
  377. package/lib/_modules/shared-service.index.d.ts.map +0 -1
  378. package/lib/_modules/shared-service.index.js +0 -12
  379. package/lib/_modules/shared-service.index.js.map +0 -1
  380. package/lib/_modules/test-module.index.d.ts +0 -3
  381. package/lib/_modules/test-module.index.d.ts.map +0 -1
  382. package/lib/_modules/test-module.index.js +0 -7
  383. package/lib/_modules/test-module.index.js.map +0 -1
  384. package/lib/_modules/usage-module.index.d.ts +0 -6
  385. package/lib/_modules/usage-module.index.d.ts.map +0 -1
  386. package/lib/_modules/usage-module.index.js +0 -10
  387. package/lib/_modules/usage-module.index.js.map +0 -1
  388. package/lib/data-models.d.ts +0 -3
  389. package/lib/data-models.d.ts.map +0 -1
  390. package/lib/data-models.js +0 -7
  391. package/lib/data-models.js.map +0 -1
  392. package/lib/index.d.ts +0 -5
  393. package/lib/index.d.ts.map +0 -1
  394. package/lib/index.js +0 -12
  395. package/lib/index.js.map +0 -1
  396. package/lib/tsconfig.tsbuildinfo +0 -2761
  397. package/src/_collections/dynamo-shared.service.ts +0 -277
  398. package/src/version.json +0 -2
@@ -0,0 +1,151 @@
1
+
2
+ import { clone } from './utilities';
3
+
4
+ export class Dynamo_Shared {
5
+
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: object[], paths: string[][]): object[] {
34
+ let newObjList = [...objList];
35
+ newObjList = newObjList.map(obj => {
36
+ const newObj = {};
37
+ paths.forEach((path: string[]) => {
38
+ newObj[path[path.length - 1]] = this.getNestedData(obj, path);
39
+ });
40
+ return newObj;
41
+ });
42
+ return newObjList;
43
+ }
44
+
45
+ /**
46
+ * returns nested value from object
47
+ * @param parentObj data source object
48
+ * @param nestedDataKeys path of value as string list
49
+ * etc.: ['nestLvl1', 'nestLvl2', 'nestLvl3'] as parentObj.nestLvl1.nestLvl2.nestLvl3
50
+ * @returns data from object by path
51
+ */
52
+ static getNestedData(parentObj: object, nestedDataKeys: string[]): any {
53
+ let newData = clone(parentObj); // {...parentObj};
54
+ nestedDataKeys.forEach((dk: string) => {
55
+ if (newData) {
56
+ newData = newData[dk];
57
+ }
58
+ });
59
+ return newData;
60
+ }
61
+
62
+ /**
63
+ * recursive function that nests data
64
+ * @param newData the object that that is needed to be updated
65
+ * @param nestKeys the path where the data should be updated
66
+ * @param dataToSet the actual value that will be setted
67
+ * @returns modified data
68
+ */
69
+ static nestData(parentObj: object, nestKeys: string[], dataToSet: any): object {
70
+ const newData = clone(parentObj); // {...parentObj};
71
+ if (nestKeys.length > 1) {
72
+ const keys = [...nestKeys];
73
+ const nextNestKey = keys.shift();
74
+ newData[nextNestKey] = this.nestData(newData[nextNestKey], keys, dataToSet);
75
+ } else {
76
+ newData[nestKeys[0]] = dataToSet;
77
+ }
78
+ return newData;
79
+ }
80
+
81
+ /**
82
+ * recursive function that adds to nested data
83
+ * @param newData the object that that is needed to be updated
84
+ * @param nestKeys the path where the data should be updated
85
+ * @param dataToAdd the actual value that will be setted
86
+ * @returns modified data
87
+ */
88
+ static addToNestedData(parentObj: object, nestKeys: string[], dataToAdd: any): object {
89
+ const newData = clone(parentObj); // {...parentObj};
90
+ if (nestKeys.length > 1) {
91
+ const keys = [...nestKeys];
92
+ const nextNestKey = keys.shift();
93
+ newData[nextNestKey] = this.addToNestedData(newData[nextNestKey], keys, dataToAdd);
94
+ } else {
95
+ newData[nestKeys[0]] += dataToAdd;
96
+ }
97
+ return newData;
98
+ }
99
+
100
+ /**
101
+ * recursive function that pushes to nested data
102
+ * @param newData the object that that is needed to be updated
103
+ * @param nestKeys the path where the data should be updated
104
+ * @param dataToPush the actual value that will be setted
105
+ * @returns modified data
106
+ */
107
+ static pushToNestedData(parentObj: object, nestKeys: string[], dataToPush: any): object {
108
+ const newData = clone(parentObj); // {...parentObj};
109
+ if (nestKeys.length > 1) {
110
+ const keys = [...nestKeys];
111
+ const nextNestKey = keys.shift();
112
+ newData[nextNestKey] = this.pushToNestedData(newData[nextNestKey], keys, dataToPush);
113
+ } else {
114
+ if (Array.isArray(newData[nestKeys[0]])) {
115
+ newData[nestKeys[0]].push(dataToPush);
116
+ } else {
117
+ newData[nestKeys[0]] = [dataToPush];
118
+ }
119
+ }
120
+ return newData;
121
+ }
122
+
123
+ /**
124
+ * recursive function that nests data on recursive data structure etc.: xData: { ..., 'nestedListKey': xData[] }
125
+ * @param newData the object that that is needed to be updated
126
+ * @param nestedListKey the location of nested dataList
127
+ * @param nestIndexes path to the subject ect.: xData.listKey[1].listKey[4].listKey[0] will be [1, 4, 0]
128
+ * @param dataToSet the actual value that will be setted on location
129
+ * @returns modified data
130
+ */
131
+ static nestRecursiveListedData<T>(parentObj: T, nestedListKey: string, nestIndexes: number[], dataToSet: any): T {
132
+ const newData = clone(parentObj); // parentObj; // {...parentObj};
133
+ if (nestIndexes.length > 1) {
134
+ const indexes = [...nestIndexes];
135
+ const nextLevelKey = indexes.shift();
136
+ newData[nestedListKey][nextLevelKey] = this.nestRecursiveListedData(
137
+ newData[nestedListKey][nextLevelKey], nestedListKey, indexes, dataToSet);
138
+ } else {
139
+ newData[nestedListKey][nestIndexes[0]] = dataToSet;
140
+ }
141
+ return newData;
142
+ }
143
+
144
+ static addMetadataToSchema(schema: any): any {
145
+ schema.__created = { type: Date };
146
+ schema.__createdBy = { type: String };
147
+ schema.__lastModified = { type: Date };
148
+ schema.__lastModifiedBy = { type: String };
149
+ return schema;
150
+ }
151
+ }
@@ -0,0 +1,47 @@
1
+
2
+ import { day, hour, month, week, year } from '../../_constants/times';
3
+
4
+ export class Dynamo_Time {
5
+
6
+ static getAge(birthDate: Date | number | string) {
7
+ return this.getYear(+new Date() - +new Date(birthDate));
8
+ }
9
+
10
+ static getYear(date: Date | number | string) {
11
+ if (typeof date === 'string') {
12
+ date = new Date(date);
13
+ }
14
+ return (+date / year);
15
+ }
16
+
17
+ static getHour(date: Date | number | string) {
18
+ if (typeof date === 'string') {
19
+ date = new Date(date);
20
+ }
21
+ return (+date / hour);
22
+ }
23
+
24
+ static getDateByAge(age: number) {
25
+ return new Date(+new Date() - (year * age));
26
+ }
27
+
28
+ static oneHourAgo(): Date {
29
+ return new Date(+new Date() - hour);
30
+ }
31
+
32
+ static oneDayAgo(): Date {
33
+ return new Date(+new Date() - day);
34
+ }
35
+
36
+ static oneWeekAgo(): Date {
37
+ return new Date(+new Date() - week);
38
+ }
39
+
40
+ static oneMonthAgo(): Date {
41
+ return new Date(+new Date() - month);
42
+ }
43
+
44
+ static oneYearAgo(): Date {
45
+ return new Date(+new Date() - year);
46
+ }
47
+ }
@@ -0,0 +1,63 @@
1
+
2
+ export class Dynamo_Trigonometry {
3
+
4
+ /**
5
+ * Befogó
6
+ * a Befogó mérete az átfogó, és a befogóval szemközti szög alapján
7
+ * a szemközti szög értéke opcionális
8
+ * (amennyiben nem adjuk meg, 45 fokos szöggel számolunk)
9
+ * @param c átfogó
10
+ * @param angle a befogó oldallal szemközti szög (fokban)
11
+ * @returns befogó
12
+ */
13
+ static getClamp(c: number, angle?: number): number {
14
+ angle = angle !== undefined ? angle : 45;
15
+ return Math.sin(this.angleToRadians(angle)) * c;
16
+ }
17
+
18
+ /**
19
+ * Befogó
20
+ * a Befogó mérete az átfogó és a másik befogó alapján
21
+ * @param a befogó
22
+ * @param c átfogó
23
+ * @returns befogó
24
+ */
25
+ static getClampByClampAndHypotenuse(a: number, c: number): number {
26
+ if (a > c) {
27
+ throw { errorMessage: `getClampByClampAndHypotenuse error hypotenuse is smaller than clamp (a:${a} > c:${c})` };
28
+ }
29
+ return Math.sqrt((c * c) - (a * a));
30
+ }
31
+
32
+ /**
33
+ * Átfogó
34
+ * az Átfogó mérete a befogók alapján
35
+ * a második befogó értéke opcionális
36
+ * (amennyiben nem adjuk meg, egyenlő szárú háromszöggel számolunk)
37
+ * @param a egyik befogó
38
+ * @param b másik befogó
39
+ * @returns átfogó
40
+ */
41
+ static getHypotenuse(a: number, b?: number): number {
42
+ b = b !== undefined ? b : a;
43
+ return Math.sqrt((a * a) + (b * b));
44
+ }
45
+
46
+ /**
47
+ * Szög fokmértéket átalakítja radiánsra
48
+ * @param angle szög fok
49
+ * @returns szög radiáns
50
+ */
51
+ static angleToRadians(angle: number): number {
52
+ return angle * Math.PI / 180;
53
+ }
54
+
55
+ /**
56
+ * Szög radiáns mértéket átalakítja fokra
57
+ * @param radians szög radiáns
58
+ * @returns szög fok
59
+ */
60
+ static radiansToAngle(radians: number): number {
61
+ return radians / Math.PI * 180;
62
+ }
63
+ }
@@ -0,0 +1,67 @@
1
+
2
+
3
+ export function clone<T>(object: T): T {
4
+ try {
5
+ return object ? JSON.parse(JSON.stringify(object)) as T : object;
6
+ } catch (error) {
7
+ console.error('clone() failed. This might be happening becouse the object you trying to clone, containes object hooks for its own objects, therefore its creating an object loop. See further information in the detailed error:');
8
+ throw error;
9
+ }
10
+ }
11
+
12
+ export function sameObjects<T>(objA: T, objB: T): boolean {
13
+ return JSON.stringify(objA) === JSON.stringify(objB);
14
+ }
15
+
16
+ /**
17
+ * sets values if its existing on To, even if its null (but if undefined)
18
+ * @param setOn
19
+ * @param setTo
20
+ */
21
+ export function setExisitngValuesOnly(setOn: any, setTo: any): void {
22
+ for (const key in setTo) {
23
+ if (setTo[key] != undefined) {
24
+ setOn[key] = setTo[key];
25
+ }
26
+ }
27
+ }
28
+
29
+ export function delay(ms: number): Promise<void> {
30
+ return new Promise(resolve => setTimeout(resolve, ms) );
31
+ }
32
+
33
+ /**
34
+ * You might be use getSortForTrueFn instead for a shorter expression
35
+ *
36
+ * @param a
37
+ * @param b
38
+ * @param check
39
+ * @returns
40
+ *
41
+ * @example
42
+ * codes.sort((a,b) => sortForTrue(a,b,(c: Code) => c.haveImg));
43
+ */
44
+ export function sortForTrue<T>(a: T, b: T, check: (a: T) => boolean): 0 | 1 | -1 {
45
+ const isA = check(a);
46
+ return isA === check(b) ? 0 : isA ? -1 : 1;
47
+ }
48
+
49
+ /**
50
+ *
51
+ * @param checkFor
52
+ * @returns
53
+ *
54
+ * @example
55
+ * codes.sort(getSortForTrueFn((c: Code) => c.haveImg));
56
+ */
57
+ export function getSortForTrueFn<T>(checkFor: (a: T) => boolean): (a: T, b: T) => 0 | 1 | -1 {
58
+ return (a: T, b: T) => sortForTrue<T>(a, b, checkFor);
59
+ }
60
+
61
+ export function JSONListify<T>(JSONList): T[] {
62
+ const result: T[] = [];
63
+ for (let i = 0; JSONList[i]; i++) {
64
+ result.push(JSONList[i] as T);
65
+ }
66
+ return result;
67
+ }
@@ -0,0 +1,119 @@
1
+
2
+ import { Dynamo_Trigonometry } from './dynamo-trigonometry';
3
+
4
+ export class Vector2 {
5
+ private _x: number;
6
+ set x (value: number) {
7
+ this._x = value;
8
+ this.calcMagnitude();
9
+ };
10
+ get x (): number {
11
+ return this._x;
12
+ }
13
+
14
+ private _y: number;
15
+ set y (value: number) {
16
+ this._y = value;
17
+ this.calcMagnitude();
18
+ };
19
+ get y (): number {
20
+ return this._y;
21
+ }
22
+
23
+ private _magintude: number;
24
+ get magintude (): number {
25
+ return this._magintude;
26
+ }
27
+
28
+ constructor(x: number, y: number) {
29
+ this._x = x;
30
+ this._y = y;
31
+ this.calcMagnitude();
32
+ }
33
+
34
+ static readonly zero: Vector2 = new Vector2(0, 0);
35
+ static readonly left: Vector2 = new Vector2(-1, 0);
36
+ static readonly right: Vector2 = new Vector2(1, 0);
37
+ static readonly up: Vector2 = new Vector2(0, 1);
38
+ static readonly down: Vector2 = new Vector2(0, -1);
39
+
40
+ static distance(a: Vector2, b: Vector2): number {
41
+ return this.minus(a, b).magintude;
42
+ }
43
+ distanceTo(to: Vector2): number {
44
+ return Vector2.distance(this, to);
45
+ }
46
+
47
+ static minus(a: Vector2, b: Vector2): Vector2 {
48
+ return this.plus(a, this.negative(b));
49
+ }
50
+ minus(vector: Vector2): void {
51
+ this.newVector(Vector2.minus(this, vector));
52
+ }
53
+
54
+ static plus(a: Vector2, b: Vector2): Vector2 {
55
+ return new Vector2(a.x + b.x, a.y + b.y);
56
+ }
57
+ plus(vector: Vector2): void {
58
+ this.newVector(Vector2.plus(this, vector));
59
+ }
60
+
61
+ static multiply(v: Vector2, n: number): Vector2 {
62
+ return new Vector2(v.x * n, v.y * n);
63
+ }
64
+ multiply(n: number): void {
65
+ this.newVector(Vector2.multiply(this, n));
66
+ }
67
+
68
+ static negative(v: Vector2): Vector2 {
69
+ return new Vector2(-v.x, -v.y);
70
+ }
71
+ getNegative(): Vector2 {
72
+ return Vector2.negative(this);
73
+ }
74
+ negate(): void {
75
+ this.newVector(Vector2.negative(this));
76
+ }
77
+
78
+ static rebase(v: Vector2, baseFrom: Vector2, baseTo: Vector2): Vector2 {
79
+ return this.plus(v, this.minus(baseTo, baseFrom));
80
+ }
81
+ rebase(baseFrom: Vector2, baseTo: Vector2): void {
82
+ this.newVector(Vector2.rebase(this, baseFrom, baseTo));
83
+ }
84
+
85
+ static rotate(vector: Vector2, angle: number): Vector2 {
86
+ const rad = Dynamo_Trigonometry.angleToRadians(angle);
87
+ return this.rotateRad(vector, rad);
88
+ }
89
+ static rotateRad(vector: Vector2, rad: number): Vector2 {
90
+ const cos = Math.cos(rad);
91
+ const sin = Math.sin(rad);
92
+ const newX = (vector.x * cos) - (vector.y * sin);
93
+ const newY = (vector.x * sin) + (vector.y * cos);
94
+ return new Vector2(newX, newY);
95
+ }
96
+ rotate(angle: number): void {
97
+ this.newVector(Vector2.rotate(this, angle));
98
+ }
99
+ rotateRad(rad: number): void {
100
+ this.newVector(Vector2.rotateRad(this, rad));
101
+ }
102
+
103
+ private newVector(newV: Vector2): void {
104
+ this.newXY(newV.x, newV.y);
105
+ }
106
+ newXY(newX: number, newY: number): void {
107
+ this._x = newX;
108
+ this._y = newY;
109
+ this.calcMagnitude();
110
+ }
111
+
112
+ private calcMagnitude() {
113
+ this._magintude = Dynamo_Trigonometry.getHypotenuse(this._x, this._y);
114
+ }
115
+
116
+ clone() {
117
+ return new Vector2(this._x, this._y);
118
+ }
119
+ }
@@ -1,6 +1,15 @@
1
1
 
2
- // COLLECTIONS
3
- export * from './dynamo-shared.service';
4
-
2
+ // TOOLS
3
+ export * from './_tools/dynamo-shared.service';
4
+ export * from './_tools/dynamo-regions';
5
+ export * from './_tools/dynamo-location';
6
+ export * from './_tools/dynamo-log';
7
+ export * from './_tools/dynamo-random';
8
+ export * from './_tools/dynamo-location';
9
+ export * from './_tools/dynamo-round-list';
10
+ export * from './_tools/dynamo-time';
11
+ export * from './_tools/dynamo-trigonometry';
12
+ export * from './_tools/utilities';
13
+ export * from './_tools/vector';
5
14
 
6
15
 
@@ -0,0 +1,9 @@
1
+
2
+ export enum Region {
3
+ europe = 'Europe',
4
+ asia = 'Asia',
5
+ africa = 'Africa',
6
+ oceania = 'Oceania',
7
+ americas = 'Americas',
8
+ }
9
+
@@ -0,0 +1,26 @@
1
+
2
+ export enum SubRegion {
3
+ northernEurope = 'Northern Europe',
4
+ southernEurope = 'Southern Europe',
5
+ westernEurope = 'Western Europe',
6
+ easternEurope = 'Eastern Europe',
7
+
8
+ northernAfrica = 'Northern Africa',
9
+ subSaharanAfrica = 'Sub-Saharan Africa',
10
+
11
+ northernAmerica = 'Northern America',
12
+ latinAmericaAndTheCaribbean = 'Latin America and the Caribbean',
13
+
14
+ southEasternAsia = 'South-eastern Asia',
15
+ easternAsia = 'Eastern Asia',
16
+ southernAsia = 'Southern Asia',
17
+
18
+ westernAsia = 'Western Asia',
19
+ centralAsia = 'Central Asia',
20
+
21
+ australiaAndNewZealand = 'Australia and New Zealand',
22
+ melanesia = 'Melanesia',
23
+ micronesia = 'Micronesia',
24
+ polynesia = 'Polynesia',
25
+ }
26
+
@@ -0,0 +1,16 @@
1
+ import { Region } from '../../_enums/region.enum';
2
+ import { SubRegion } from '../../_enums/sub-region.enum';
3
+
4
+ export interface CountryISO {
5
+ name: string;
6
+ iso2: string;
7
+ iso3: string;
8
+ countryCode: string;
9
+ fullIso: string;
10
+ region: Region;
11
+ regionCode: string;
12
+ subRegion: SubRegion;
13
+ subRegionCode: string;
14
+ subdivisionRegion: string;
15
+ subdivisionRegionCode: string;
16
+ }
@@ -0,0 +1,7 @@
1
+
2
+ export interface CountryPhoneCode {
3
+ country: string;
4
+ code: string;
5
+ iso: string;
6
+ }
7
+
@@ -100,9 +100,9 @@ export class Dynamo_Error {
100
100
  }
101
101
  if (set.error.userMessages) {
102
102
  if (Array.isArray(set.error.userMessages)) {
103
- if (set.error.userMessages[0] == this.userMessages[0]) {
103
+ /* if (set.error.userMessages[0] == this.userMessages[0]) {
104
104
  set.error.userMessages.shift();
105
- }
105
+ } */
106
106
  this.userMessages.push(...set.error.userMessages);
107
107
  } else {
108
108
  this.userMessages.push(set.error.userMessages);
@@ -116,6 +116,19 @@ export class Dynamo_Error {
116
116
  this.message = set?.message ?? this.messages[0];
117
117
  this.error = set?.error ?? this.errors[0] ?? new Error(this.message);
118
118
 
119
+ if (0 < this.errorCodes.length && this.errorCode === this.errorCodes[0]) {
120
+ this.errorCodes.shift();
121
+ }
122
+ if (0 < this.userMessages.length && this.userMessage === this.userMessages[0]) {
123
+ this.userMessages.shift();
124
+ }
125
+ if (0 < this.messages.length && this.message === this.messages[0]) {
126
+ this.messages.shift();
127
+ }
128
+ if (0 < this.errors.length && this.error === this.errors[0]) {
129
+ this.errors.shift();
130
+ }
131
+
119
132
  if (set.addECToUserMsg) {
120
133
  this.userMessage += `\nErrorCode: ${this.errorCode}`
121
134
  }
@@ -0,0 +1,7 @@
1
+
2
+
3
+ export interface RandomWeight<T> {
4
+ chance: number;
5
+ result: T;
6
+ }
7
+
@@ -0,0 +1,10 @@
1
+
2
+ export interface SubdivisionCollection {
3
+ [iso2: string]: {
4
+ name: string;
5
+ divisions: {
6
+ [subDivisionCode: string]: string
7
+ }
8
+ }
9
+ }
10
+
@@ -0,0 +1,49 @@
1
+ import { CountryISO } from './country-iso';
2
+
3
+ export interface SubdivisionRegionData extends CountryISO {
4
+ type?: SubdivisionRegionType;
5
+ }
6
+
7
+
8
+ export enum SubdivisionRegionType {
9
+ parish,
10
+ emirate,
11
+ province,
12
+ dependency,
13
+ county,
14
+ city,
15
+ region,
16
+ state,
17
+ territory,
18
+ autonomousRepublic,
19
+ municipate,
20
+ rayon,
21
+ division,
22
+ district,
23
+ governorate,
24
+ department,
25
+ specialMunicipality,
26
+ federalDistrict,
27
+ island,
28
+ town,
29
+ oblast,
30
+ commune,
31
+ prefecture,
32
+ economicPrefecture,
33
+ canton,
34
+ autonomousRegion,
35
+ specialAdministrativeRegion,
36
+ capitalDistrict,
37
+ geographicalRegion,
38
+ capitalCity,
39
+ ruralMunicipality,
40
+ urbanMunicipality,
41
+ autonomousCommunity,
42
+ autonomousCity,
43
+ administration,
44
+ regionalState,
45
+ metropolitanRegion,
46
+ overseasCollectivity,
47
+ // ... reduce specials // non-finished
48
+ }
49
+
@@ -1,15 +1,21 @@
1
1
 
2
2
  // MODELS
3
3
  // Control models
4
+ export * from './control-models/country-iso';
5
+ export * from './control-models/country-phone-code';
4
6
  export * from './control-models/dynamo-daily-usage-data';
7
+ export * from './control-models/dynamo-error';
5
8
  export * from './control-models/dynamo-nts-data-params';
6
9
  export * from './control-models/dynamo-nts-data-property-params';
7
- export * from './control-models/dynamo-error';
8
- export * from './control-models/geo-ip-location';
9
- export * from './control-models/location-coordinates';
10
+ export * from './control-models/dynamo-nts-module-settings';
11
+ export * from './control-models/dynamo-poll';
10
12
  export * from './control-models/dynamo-usage-action';
11
13
  export * from './control-models/dynamo-usage-data';
12
- export * from './control-models/dynamo-poll';
14
+ export * from './control-models/geo-ip-location';
15
+ export * from './control-models/location-coordinates';
16
+ export * from './control-models/random-weight';
17
+ export * from './control-models/subdivision-collection';
18
+ export * from './control-models/subdivision-region-data';
13
19
  // Data models
14
20
  export * from './data-models/dynamo-custom-data';
15
21
  export * from './data-models/dynamo-metadata';
@@ -1,6 +1,6 @@
1
1
 
2
2
  // SHARED SERVICE MODULE
3
- export * from '../_collections/dynamo-shared.service';
3
+ export * from '../_collections/_tools/dynamo-shared.service';
4
4
  export * from '../_constants/times';
5
5
  export * from '../_enums/log-style.enum';
6
6
  export * from '../_models/control-models/dynamo-error';