@8ms/helpers 1.40.0 → 1.40.2

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 (504) hide show
  1. package/dist/api/ApiResponse.d.mts +73 -0
  2. package/dist/api/ApiResponse.mjs +91 -0
  3. package/dist/api/index.d.mts +1 -11
  4. package/dist/api/isError.d.mts +9 -0
  5. package/dist/api/isError.mjs +7 -0
  6. package/dist/api/isSuccess.d.mts +9 -0
  7. package/dist/api/isSuccess.mjs +7 -0
  8. package/dist/api/response.d.mts +2 -0
  9. package/dist/api/response.mjs +9 -0
  10. package/dist/array/contains.d.mts +11 -0
  11. package/dist/array/contains.mjs +7 -0
  12. package/dist/array/getArray.d.mts +10 -0
  13. package/dist/array/getArray.mjs +8 -0
  14. package/dist/atInternet/request.d.mts +31 -0
  15. package/dist/atInternet/request.mjs +1 -0
  16. package/dist/aws/athenaExpress/initClient.d.mts +15 -0
  17. package/dist/aws/athenaExpress/initClient.mjs +28 -0
  18. package/dist/aws/athenaExpress/query.d.mts +10 -0
  19. package/dist/aws/athenaExpress/query.mjs +13 -0
  20. package/dist/aws/ec2/initClient.d.mts +14 -0
  21. package/dist/aws/ec2/initClient.mjs +18 -0
  22. package/dist/aws/ec2/startInstances.d.mts +13 -0
  23. package/dist/aws/ec2/startInstances.mjs +17 -0
  24. package/dist/aws/ec2/stopInstances.d.mts +14 -0
  25. package/dist/aws/ec2/stopInstances.mjs +18 -0
  26. package/dist/aws/ecs/getClusters.d.mts +11 -0
  27. package/dist/aws/ecs/getClusters.mjs +23 -0
  28. package/dist/aws/ecs/getTaskDefinitions.d.mts +16 -0
  29. package/dist/aws/ecs/getTaskDefinitions.mjs +26 -0
  30. package/dist/aws/ecs/getTasks.d.mts +19 -0
  31. package/dist/aws/ecs/getTasks.mjs +29 -0
  32. package/dist/aws/ecs/initClient.d.mts +14 -0
  33. package/dist/aws/ecs/initClient.mjs +18 -0
  34. package/dist/aws/ecs/runTask.d.mts +19 -0
  35. package/dist/aws/ecs/runTask.mjs +24 -0
  36. package/dist/aws/getConfig.d.mts +18 -0
  37. package/dist/aws/getConfig.mjs +17 -0
  38. package/dist/aws/glue/initClient.d.mts +13 -0
  39. package/dist/aws/glue/initClient.mjs +17 -0
  40. package/dist/aws/glue/invoke.d.mts +11 -0
  41. package/dist/aws/glue/invoke.mjs +14 -0
  42. package/dist/aws/isResponse200.d.mts +11 -0
  43. package/dist/aws/isResponse200.mjs +16 -0
  44. package/dist/aws/lambda/getHandlerPath.d.mts +7 -0
  45. package/dist/aws/lambda/getHandlerPath.mjs +6 -0
  46. package/dist/aws/lambda/initClient.d.mts +13 -0
  47. package/dist/aws/lambda/initClient.mjs +17 -0
  48. package/dist/aws/lambda/invoke.d.mts +15 -0
  49. package/dist/aws/lambda/invoke.mjs +31 -0
  50. package/dist/aws/s3/copyFile.d.mts +18 -0
  51. package/dist/aws/s3/copyFile.mjs +15 -0
  52. package/dist/aws/s3/deleteFile.d.mts +14 -0
  53. package/dist/aws/s3/deleteFile.mjs +14 -0
  54. package/dist/aws/s3/deleteFiles.d.mts +14 -0
  55. package/dist/aws/s3/deleteFiles.mjs +14 -0
  56. package/dist/aws/s3/deleteFolder.d.mts +14 -0
  57. package/dist/aws/s3/deleteFolder.mjs +26 -0
  58. package/dist/aws/s3/getGlueJson.d.mts +12 -0
  59. package/dist/aws/s3/getGlueJson.mjs +8 -0
  60. package/dist/aws/s3/getPresignedPost.d.mts +28 -0
  61. package/dist/aws/s3/getPresignedPost.mjs +19 -0
  62. package/dist/aws/s3/getSignedUrl.d.mts +19 -0
  63. package/dist/aws/s3/getSignedUrl.mjs +17 -0
  64. package/dist/aws/s3/initClient.d.mts +15 -0
  65. package/dist/aws/s3/initClient.mjs +17 -0
  66. package/dist/aws/s3/isFileExists.d.mts +11 -0
  67. package/dist/aws/s3/isFileExists.mjs +21 -0
  68. package/dist/aws/s3/listFiles.d.mts +14 -0
  69. package/dist/aws/s3/listFiles.mjs +27 -0
  70. package/dist/aws/s3/listFilesIteratively.d.mts +11 -0
  71. package/dist/aws/s3/listFilesIteratively.mjs +40 -0
  72. package/dist/aws/s3/listFolders.d.mts +14 -0
  73. package/dist/aws/s3/listFolders.mjs +23 -0
  74. package/dist/aws/s3/moveFile.d.mts +16 -0
  75. package/dist/aws/s3/moveFile.mjs +18 -0
  76. package/dist/aws/s3/readBrotli.d.mts +18 -0
  77. package/dist/aws/s3/readBrotli.mjs +20 -0
  78. package/dist/aws/s3/readBuffer.d.mts +19 -0
  79. package/dist/aws/s3/readBuffer.mjs +29 -0
  80. package/dist/aws/s3/readFile.d.mts +38 -0
  81. package/dist/aws/s3/readFile.mjs +64 -0
  82. package/dist/aws/s3/readGzip.d.mts +18 -0
  83. package/dist/aws/s3/readGzip.mjs +20 -0
  84. package/dist/aws/s3/writeBrotli.d.mts +20 -0
  85. package/dist/aws/s3/writeBrotli.mjs +18 -0
  86. package/dist/aws/s3/writeFile.d.mts +18 -0
  87. package/dist/aws/s3/writeFile.mjs +16 -0
  88. package/dist/aws/s3/writeGzip.d.mts +20 -0
  89. package/dist/aws/s3/writeGzip.mjs +18 -0
  90. package/dist/aws/s3/writePresignedPost.d.mts +24 -0
  91. package/dist/aws/s3/writePresignedPost.mjs +28 -0
  92. package/dist/aws/s3/writeUrlContents.d.mts +16 -0
  93. package/dist/aws/s3/writeUrlContents.mjs +19 -0
  94. package/dist/aws/s3cache/getCache.d.mts +19 -0
  95. package/dist/aws/s3cache/getCache.mjs +25 -0
  96. package/dist/aws/s3cache/getKey.d.mts +15 -0
  97. package/dist/aws/s3cache/getKey.mjs +15 -0
  98. package/dist/aws/s3cache/index.d.mts +1 -1
  99. package/dist/aws/s3cache/saveCache.d.mts +16 -0
  100. package/dist/aws/s3cache/saveCache.mjs +14 -0
  101. package/dist/aws/s3cache/updateCache.d.mts +18 -0
  102. package/dist/aws/s3cache/updateCache.mjs +26 -0
  103. package/dist/aws/ses/SimpleEmail.d.mts +79 -0
  104. package/dist/aws/ses/SimpleEmail.mjs +122 -0
  105. package/dist/aws/ses/initClient.d.mts +15 -0
  106. package/dist/aws/ses/initClient.mjs +17 -0
  107. package/dist/aws/sqs/addToQueue.d.mts +35 -0
  108. package/dist/aws/sqs/addToQueue.mjs +20 -0
  109. package/dist/aws/sqs/deleteFromQueue.d.mts +16 -0
  110. package/dist/aws/sqs/deleteFromQueue.mjs +15 -0
  111. package/dist/aws/sqs/index.d.mts +18 -0
  112. package/dist/aws/sqs/initClient.d.mts +15 -0
  113. package/dist/aws/sqs/initClient.mjs +17 -0
  114. package/dist/aws/sqs/isEventSqs.d.mts +1 -0
  115. package/dist/aws/sqs/isEventSqs.mjs +1 -0
  116. package/dist/aws/ssm/getParameter.d.mts +16 -0
  117. package/dist/aws/ssm/getParameter.mjs +22 -0
  118. package/dist/aws/ssm/initClient.d.mts +15 -0
  119. package/dist/aws/ssm/initClient.mjs +17 -0
  120. package/dist/axios/delete.d.mts +14 -0
  121. package/dist/axios/delete.mjs +25 -0
  122. package/dist/axios/get.d.mts +16 -0
  123. package/dist/axios/get.mjs +24 -0
  124. package/dist/axios/post.d.mts +18 -0
  125. package/dist/axios/post.mjs +25 -0
  126. package/dist/boolean/getBoolean.d.mts +11 -0
  127. package/dist/boolean/getBoolean.mjs +11 -0
  128. package/dist/brightData/getCustomerId.d.mts +13 -0
  129. package/dist/brightData/getCustomerId.mjs +10 -0
  130. package/dist/brightData/getZone.d.mts +12 -0
  131. package/dist/brightData/getZone.mjs +10 -0
  132. package/dist/brightData/param.d.mts +11 -0
  133. package/dist/brightData/param.mjs +4 -0
  134. package/dist/brightData/serpApi/buildGoogleSerpUrl.d.mts +34 -0
  135. package/dist/brightData/serpApi/buildGoogleSerpUrl.mjs +100 -0
  136. package/dist/brightData/serpApi/buildGoogleTrendsUrl.d.mts +24 -0
  137. package/dist/brightData/serpApi/buildGoogleTrendsUrl.mjs +51 -0
  138. package/dist/brightData/serpApi/getAsyncRequestId.d.mts +17 -0
  139. package/dist/brightData/serpApi/getAsyncRequestId.mjs +35 -0
  140. package/dist/brightData/serpApi/getAsyncResults.d.mts +15 -0
  141. package/dist/brightData/serpApi/getAsyncResults.mjs +25 -0
  142. package/dist/brightData/serpApi/getRealtime.d.mts +13 -0
  143. package/dist/brightData/serpApi/getRealtime.mjs +25 -0
  144. package/dist/brightData/serpApi/type.d.mts +13 -0
  145. package/dist/brightData/serpApi/type.mjs +14 -0
  146. package/dist/brightData/webScraperIde/getBatch.d.mts +17 -0
  147. package/dist/brightData/webScraperIde/getBatch.mjs +22 -0
  148. package/dist/brightData/webScraperIde/getRealtime.d.mts +16 -0
  149. package/dist/brightData/webScraperIde/getRealtime.mjs +44 -0
  150. package/dist/chunk-y_GBKt04.mjs +5 -0
  151. package/dist/class/BaseClass.d.mts +45 -0
  152. package/dist/class/BaseClass.mjs +46 -0
  153. package/dist/crypto/getDecrypt.d.mts +16 -0
  154. package/dist/crypto/getDecrypt.mjs +13 -0
  155. package/dist/crypto/getEncrypt.d.mts +16 -0
  156. package/dist/crypto/getEncrypt.mjs +13 -0
  157. package/dist/crypto/getRandom.d.mts +12 -0
  158. package/dist/crypto/getRandom.mjs +10 -0
  159. package/dist/crypto/getSha256.d.mts +12 -0
  160. package/dist/crypto/getSha256.mjs +13 -0
  161. package/dist/date/format.d.mts +13 -0
  162. package/dist/date/format.mjs +17 -0
  163. package/dist/date/getDate.d.mts +17 -0
  164. package/dist/date/getDate.mjs +107 -0
  165. package/dist/date/getDatesBetween.d.mts +16 -0
  166. package/dist/date/getDatesBetween.mjs +37 -0
  167. package/dist/date/getDurationHours.d.mts +11 -0
  168. package/dist/date/getDurationHours.mjs +24 -0
  169. package/dist/date/getDurationMinutes.d.mts +11 -0
  170. package/dist/date/getDurationMinutes.mjs +22 -0
  171. package/dist/date/getFinancialYear.d.mts +12 -0
  172. package/dist/date/getFinancialYear.mjs +31 -0
  173. package/dist/date/getFinancialYearToDate.d.mts +10 -0
  174. package/dist/date/getFinancialYearToDate.mjs +15 -0
  175. package/dist/date/getFinancialYearToYesterday.d.mts +10 -0
  176. package/dist/date/getFinancialYearToYesterday.mjs +15 -0
  177. package/dist/date/getFinancialYearWeeks.d.mts +12 -0
  178. package/dist/date/getFinancialYearWeeks.mjs +23 -0
  179. package/dist/date/getLastWeek.d.mts +16 -0
  180. package/dist/date/getLastWeek.mjs +30 -0
  181. package/dist/date/getMax.d.mts +16 -0
  182. package/dist/date/getMax.mjs +21 -0
  183. package/dist/date/getMidnight.d.mts +2 -0
  184. package/dist/date/getMidnight.mjs +11 -0
  185. package/dist/date/getMin.d.mts +16 -0
  186. package/dist/date/getMin.mjs +21 -0
  187. package/dist/date/getMonday.d.mts +18 -0
  188. package/dist/date/getMonday.mjs +31 -0
  189. package/dist/date/getNumber.d.mts +10 -0
  190. package/dist/date/getNumber.mjs +17 -0
  191. package/dist/date/getPredefinedTimeframe.d.mts +13 -0
  192. package/dist/date/getPredefinedTimeframe.mjs +15 -0
  193. package/dist/date/getSunday.d.mts +18 -0
  194. package/dist/date/getSunday.mjs +27 -0
  195. package/dist/date/getThisWeek.d.mts +16 -0
  196. package/dist/date/getThisWeek.mjs +36 -0
  197. package/dist/date/getTimeZoned.d.mts +2 -0
  198. package/dist/date/getTimeZoned.mjs +53 -0
  199. package/dist/date/getToday.d.mts +12 -0
  200. package/dist/date/getToday.mjs +21 -0
  201. package/dist/date/getTodayYmd.d.mts +7 -0
  202. package/dist/date/getTodayYmd.mjs +16 -0
  203. package/dist/date/getTodayYmdhis.d.mts +7 -0
  204. package/dist/date/getTodayYmdhis.mjs +16 -0
  205. package/dist/date/getTwoWeeksAgo.d.mts +16 -0
  206. package/dist/date/getTwoWeeksAgo.mjs +36 -0
  207. package/dist/date/getWeeksAgo.d.mts +22 -0
  208. package/dist/date/getWeeksAgo.mjs +22 -0
  209. package/dist/date/getYesterday.d.mts +15 -0
  210. package/dist/date/getYesterday.mjs +24 -0
  211. package/dist/date/index.d.mts +1 -57
  212. package/dist/date/isDateValid.d.mts +11 -0
  213. package/dist/date/isDateValid.mjs +16 -0
  214. package/dist/date/isLastWeek.d.mts +12 -0
  215. package/dist/date/isLastWeek.mjs +11 -0
  216. package/dist/date/isThisWeek.d.mts +12 -0
  217. package/dist/date/isThisWeek.mjs +11 -0
  218. package/dist/date/parseExcelDate.d.mts +12 -0
  219. package/dist/date/parseExcelDate.mjs +18 -0
  220. package/dist/environment/getEnvironment.d.mts +9 -0
  221. package/dist/environment/getEnvironment.mjs +27 -0
  222. package/dist/environment/isAws.d.mts +7 -0
  223. package/dist/environment/isAws.mjs +8 -0
  224. package/dist/environment/isDevelopment.d.mts +4 -0
  225. package/dist/environment/isDevelopment.mjs +6 -0
  226. package/dist/environment/isLocalhost.d.mts +7 -0
  227. package/dist/environment/isLocalhost.mjs +15 -0
  228. package/dist/environment/isProduction.d.mts +4 -0
  229. package/dist/environment/isProduction.mjs +6 -0
  230. package/dist/environment/isStaging.d.mts +4 -0
  231. package/dist/environment/isStaging.mjs +6 -0
  232. package/dist/environment/isVercel.d.mts +7 -0
  233. package/dist/environment/isVercel.mjs +7 -0
  234. package/dist/eskimi/ageGroups.d.mts +7 -0
  235. package/dist/eskimi/ageGroups.mjs +41 -0
  236. package/dist/eskimi/campaign.d.mts +22 -0
  237. package/dist/eskimi/campaign.mjs +1 -0
  238. package/dist/eskimi/devices.d.mts +7 -0
  239. package/dist/eskimi/devices.mjs +10 -0
  240. package/dist/eskimi/endpoints.d.mts +18 -0
  241. package/dist/eskimi/endpoints.mjs +16 -0
  242. package/dist/eskimi/genders.d.mts +7 -0
  243. package/dist/eskimi/genders.mjs +10 -0
  244. package/dist/eskimi/getAccessToken.d.mts +14 -0
  245. package/dist/eskimi/getAccessToken.mjs +19 -0
  246. package/dist/eskimi/getAgeGroup.d.mts +11 -0
  247. package/dist/eskimi/getAgeGroup.mjs +12 -0
  248. package/dist/eskimi/getCampaignIds.d.mts +11 -0
  249. package/dist/eskimi/getCampaignIds.mjs +9 -0
  250. package/dist/eskimi/getData.d.mts +13 -0
  251. package/dist/eskimi/getData.mjs +20 -0
  252. package/dist/eskimi/getDevice.d.mts +11 -0
  253. package/dist/eskimi/getDevice.mjs +12 -0
  254. package/dist/eskimi/getGender.d.mts +11 -0
  255. package/dist/eskimi/getGender.mjs +12 -0
  256. package/dist/file/createDirectory.d.mts +13 -0
  257. package/dist/file/createDirectory.mjs +16 -0
  258. package/dist/file/writeFile.d.mts +1 -0
  259. package/dist/file/writeFile.mjs +1 -0
  260. package/dist/getMidnight-Cr5sAuOj.d.mts +12 -0
  261. package/dist/getTimeZoned-D7uY_mE6.d.mts +15 -0
  262. package/dist/global/forceUpdate.d.mts +12 -0
  263. package/dist/global/forceUpdate.mjs +16 -0
  264. package/dist/global/init.d.mts +16 -0
  265. package/dist/global/init.mjs +16 -0
  266. package/dist/global/isSet.d.mts +12 -0
  267. package/dist/global/isSet.mjs +9 -0
  268. package/dist/global/maxCache.d.mts +12 -0
  269. package/dist/global/maxCache.mjs +15 -0
  270. package/dist/global/read.d.mts +12 -0
  271. package/dist/global/read.mjs +15 -0
  272. package/dist/global.d.mts +42 -0
  273. package/dist/google/bigQuery/IsTableExists.d.mts +17 -0
  274. package/dist/google/bigQuery/IsTableExists.mjs +19 -0
  275. package/dist/google/bigQuery/createDataset.d.mts +17 -0
  276. package/dist/google/bigQuery/createDataset.mjs +15 -0
  277. package/dist/google/bigQuery/createTable.d.mts +20 -0
  278. package/dist/google/bigQuery/createTable.mjs +21 -0
  279. package/dist/google/bigQuery/getClient.d.mts +11 -0
  280. package/dist/google/bigQuery/getClient.mjs +19 -0
  281. package/dist/google/bigQuery/getDatasets.d.mts +17 -0
  282. package/dist/google/bigQuery/getDatasets.mjs +17 -0
  283. package/dist/google/bigQuery/getTables.d.mts +14 -0
  284. package/dist/google/bigQuery/getTables.mjs +13 -0
  285. package/dist/google/bigQuery/initClient.d.mts +17 -0
  286. package/dist/google/bigQuery/initClient.mjs +27 -0
  287. package/dist/google/bigQuery/isDatasetExists.d.mts +16 -0
  288. package/dist/google/bigQuery/isDatasetExists.mjs +20 -0
  289. package/dist/google/bigQuery/loadData.d.mts +23 -0
  290. package/dist/google/bigQuery/loadData.mjs +20 -0
  291. package/dist/google/bigQuery/query.d.mts +24 -0
  292. package/dist/google/bigQuery/query.mjs +10 -0
  293. package/dist/google/getConfig.d.mts +24 -0
  294. package/dist/google/getConfig.mjs +21 -0
  295. package/dist/google/sheets/getAssociatedData.d.mts +18 -0
  296. package/dist/google/sheets/getAssociatedData.mjs +35 -0
  297. package/dist/google/sheets/getBatchData.d.mts +23 -0
  298. package/dist/google/sheets/getBatchData.mjs +15 -0
  299. package/dist/google/sheets/initClient.d.mts +16 -0
  300. package/dist/google/sheets/initClient.mjs +21 -0
  301. package/dist/google/sheets/isCellNa.d.mts +11 -0
  302. package/dist/google/sheets/isCellNa.mjs +7 -0
  303. package/dist/google/storage/copyToCloud.d.mts +18 -0
  304. package/dist/google/storage/copyToCloud.mjs +10 -0
  305. package/dist/google/storage/getClient.d.mts +12 -0
  306. package/dist/google/storage/getClient.mjs +19 -0
  307. package/dist/google/storage/initClient.d.mts +18 -0
  308. package/dist/google/storage/initClient.mjs +27 -0
  309. package/dist/google/storage/isFileExists.d.mts +12 -0
  310. package/dist/google/storage/isFileExists.mjs +11 -0
  311. package/dist/google/storage/writeFile.d.mts +13 -0
  312. package/dist/google/storage/writeFile.mjs +28 -0
  313. package/dist/googleAds/getCustomer.d.mts +12 -0
  314. package/dist/googleAds/getCustomer.mjs +13 -0
  315. package/dist/googleAds/initClient.d.mts +20 -0
  316. package/dist/googleAds/initClient.mjs +25 -0
  317. package/dist/googleAds/keywordPlanner/request.d.mts +21 -0
  318. package/dist/googleAds/keywordPlanner/request.mjs +13 -0
  319. package/dist/googleAds/keywordPlanner/response.d.mts +28 -0
  320. package/dist/googleAds/keywordPlanner/response.mjs +1 -0
  321. package/dist/index-CiGy7MyK.d.mts +58 -0
  322. package/dist/index-gGQBTUJU.d.mts +12 -0
  323. package/dist/initClients.d.mts +46 -0
  324. package/dist/initClients.mjs +56 -0
  325. package/dist/json/getJsonNewline.d.mts +9 -0
  326. package/dist/json/getJsonNewline.mjs +7 -0
  327. package/dist/json/isJson.d.mts +12 -0
  328. package/dist/json/isJson.mjs +17 -0
  329. package/dist/littleWarden/getUrlStatus.d.mts +14 -0
  330. package/dist/littleWarden/getUrlStatus.mjs +16 -0
  331. package/dist/littleWarden/isAllGood.d.mts +11 -0
  332. package/dist/littleWarden/isAllGood.mjs +12 -0
  333. package/dist/littleWarden/isDanger.d.mts +11 -0
  334. package/dist/littleWarden/isDanger.mjs +12 -0
  335. package/dist/littleWarden/isWarning.d.mts +11 -0
  336. package/dist/littleWarden/isWarning.mjs +12 -0
  337. package/dist/lumar/api/buildRequest.d.mts +28 -0
  338. package/dist/lumar/api/buildRequest.mjs +58 -0
  339. package/dist/lumar/api/filter.d.mts +8 -0
  340. package/dist/lumar/api/filter.mjs +1 -0
  341. package/dist/lumar/api/getData.d.mts +11 -0
  342. package/dist/lumar/api/getData.mjs +10 -0
  343. package/dist/lumar/api/initClient.d.mts +17 -0
  344. package/dist/lumar/api/initClient.mjs +28 -0
  345. package/dist/lumar/api/operands.d.mts +13 -0
  346. package/dist/lumar/api/operands.mjs +13 -0
  347. package/dist/lumar/api/orders.d.mts +11 -0
  348. package/dist/lumar/api/orders.mjs +7 -0
  349. package/dist/lumar/api/reports.d.mts +13 -0
  350. package/dist/lumar/api/reports.mjs +13 -0
  351. package/dist/lumar/graphql/columns.d.mts +31 -0
  352. package/dist/lumar/graphql/columns.mjs +31 -0
  353. package/dist/lumar/graphql/getData.d.mts +15 -0
  354. package/dist/lumar/graphql/getData.mjs +18 -0
  355. package/dist/lumar/graphql/getReportKey.d.mts +14 -0
  356. package/dist/lumar/graphql/getReportKey.mjs +9 -0
  357. package/dist/lumar/graphql/initClient.d.mts +16 -0
  358. package/dist/lumar/graphql/initClient.mjs +34 -0
  359. package/dist/lumar/graphql/operands.d.mts +18 -0
  360. package/dist/lumar/graphql/operands.mjs +18 -0
  361. package/dist/lumar/graphql/queries/crawl.d.mts +8 -0
  362. package/dist/lumar/graphql/queries/crawl.mjs +1 -0
  363. package/dist/lumar/graphql/queries/getCrawls.d.mts +23 -0
  364. package/dist/lumar/graphql/queries/getCrawls.mjs +33 -0
  365. package/dist/lumar/graphql/queries/getReportDifferences.d.mts +30 -0
  366. package/dist/lumar/graphql/queries/getReportDifferences.mjs +37 -0
  367. package/dist/lumar/graphql/queries/getRows.d.mts +50 -0
  368. package/dist/lumar/graphql/queries/getRows.mjs +57 -0
  369. package/dist/lumar/graphql/queries/getTotals.d.mts +33 -0
  370. package/dist/lumar/graphql/queries/getTotals.mjs +40 -0
  371. package/dist/lumar/graphql/queries/row.d.mts +159 -0
  372. package/dist/lumar/graphql/queries/row.mjs +1 -0
  373. package/dist/lumar/graphql/reportTemplates.d.mts +70 -0
  374. package/dist/lumar/graphql/reportTemplates.mjs +70 -0
  375. package/dist/lumar/graphql/reportTypes.d.mts +9 -0
  376. package/dist/lumar/graphql/reportTypes.mjs +9 -0
  377. package/dist/myTarget/getAccessToken.d.mts +14 -0
  378. package/dist/myTarget/getAccessToken.mjs +19 -0
  379. package/dist/myTarget/request.d.mts +15 -0
  380. package/dist/myTarget/request.mjs +17 -0
  381. package/dist/nextAuth/isSessionReady.d.mts +8 -0
  382. package/dist/nextAuth/isSessionReady.mjs +10 -0
  383. package/dist/nextJs/getIp.d.mts +11 -0
  384. package/dist/nextJs/getIp.mjs +11 -0
  385. package/dist/nextJs/getUserAgent.d.mts +11 -0
  386. package/dist/nextJs/getUserAgent.mjs +7 -0
  387. package/dist/number/format.d.mts +13 -0
  388. package/dist/number/format.mjs +16 -0
  389. package/dist/number/getCurrency.d.mts +15 -0
  390. package/dist/number/getCurrency.mjs +17 -0
  391. package/dist/number/getDecimal.d.mts +11 -0
  392. package/dist/number/getDecimal.mjs +11 -0
  393. package/dist/number/getDivide.d.mts +13 -0
  394. package/dist/number/getDivide.mjs +17 -0
  395. package/dist/number/getNumber.d.mts +13 -0
  396. package/dist/number/getNumber.mjs +23 -0
  397. package/dist/number/getPercentIncrease.d.mts +16 -0
  398. package/dist/number/getPercentIncrease.mjs +13 -0
  399. package/dist/object/replaceKeys.d.mts +15 -0
  400. package/dist/object/replaceKeys.mjs +27 -0
  401. package/dist/prisma/getDecimal.d.mts +11 -0
  402. package/dist/prisma/getDecimal.mjs +17 -0
  403. package/dist/prisma/initClient.d.mts +8 -0
  404. package/dist/prisma/initClient.mjs +25 -0
  405. package/dist/response-CKsarnP-.d.mts +11 -0
  406. package/dist/snapchat/getAccessToken.d.mts +14 -0
  407. package/dist/snapchat/getAccessToken.mjs +29 -0
  408. package/dist/sorting/byNumberAscending.d.mts +13 -0
  409. package/dist/sorting/byNumberAscending.mjs +13 -0
  410. package/dist/sorting/byNumberDescending.d.mts +13 -0
  411. package/dist/sorting/byNumberDescending.mjs +13 -0
  412. package/dist/sorting/byStringAscending.d.mts +13 -0
  413. package/dist/sorting/byStringAscending.mjs +13 -0
  414. package/dist/sorting/byStringDescending.d.mts +13 -0
  415. package/dist/sorting/byStringDescending.mjs +13 -0
  416. package/dist/stream/sort.d.mts +16 -0
  417. package/dist/stream/sort.mjs +46 -0
  418. package/dist/string/getCapitalised.d.mts +15 -0
  419. package/dist/string/getCapitalised.mjs +13 -0
  420. package/dist/string/getClean.d.mts +32 -0
  421. package/dist/string/getClean.mjs +28 -0
  422. package/dist/string/getDecoded.d.mts +14 -0
  423. package/dist/string/getDecoded.mjs +19 -0
  424. package/dist/string/getFolder.d.mts +12 -0
  425. package/dist/string/getFolder.mjs +10 -0
  426. package/dist/string/getProperCase.d.mts +13 -0
  427. package/dist/string/getProperCase.mjs +14 -0
  428. package/dist/string/getString.d.mts +11 -0
  429. package/dist/string/getString.mjs +18 -0
  430. package/dist/string/getStringFromStream.d.mts +12 -0
  431. package/dist/string/getStringFromStream.mjs +15 -0
  432. package/dist/string/getWithoutAccents.d.mts +13 -0
  433. package/dist/string/getWithoutAccents.mjs +11 -0
  434. package/dist/string/getWithoutHtmlTags.d.mts +13 -0
  435. package/dist/string/getWithoutHtmlTags.mjs +11 -0
  436. package/dist/string/getWithoutPunctuation.d.mts +13 -0
  437. package/dist/string/getWithoutPunctuation.mjs +11 -0
  438. package/dist/string/getWithoutUnderscores.d.mts +12 -0
  439. package/dist/string/getWithoutUnderscores.mjs +10 -0
  440. package/dist/string/getWithoutWhitespaces.d.mts +13 -0
  441. package/dist/string/getWithoutWhitespaces.mjs +11 -0
  442. package/dist/swr/isAllData.d.mts +11 -0
  443. package/dist/swr/isAllData.mjs +12 -0
  444. package/dist/swr/isAnyError.d.mts +11 -0
  445. package/dist/swr/isAnyError.mjs +12 -0
  446. package/dist/swr/isAnyLoading.d.mts +11 -0
  447. package/dist/swr/isAnyLoading.mjs +12 -0
  448. package/dist/swr/isData.d.mts +11 -0
  449. package/dist/swr/isData.mjs +7 -0
  450. package/dist/swr/isError.d.mts +11 -0
  451. package/dist/swr/isError.mjs +7 -0
  452. package/dist/swr/isLoading.d.mts +11 -0
  453. package/dist/swr/isLoading.mjs +9 -0
  454. package/dist/upTimeRobot/getMonitors.d.mts +1 -0
  455. package/dist/upTimeRobot/getMonitors.mjs +3 -0
  456. package/dist/upTimeRobot/logTypes.d.mts +9 -0
  457. package/dist/upTimeRobot/logTypes.mjs +9 -0
  458. package/dist/upTimeRobot/monitorStatuses.d.mts +10 -0
  459. package/dist/upTimeRobot/monitorStatuses.mjs +10 -0
  460. package/dist/upTimeRobot/monitorSubTypes.d.mts +12 -0
  461. package/dist/upTimeRobot/monitorSubTypes.mjs +12 -0
  462. package/dist/upTimeRobot/monitorTypes.d.mts +10 -0
  463. package/dist/upTimeRobot/monitorTypes.mjs +10 -0
  464. package/dist/upTimeRobot/requestStatuses.d.mts +7 -0
  465. package/dist/upTimeRobot/requestStatuses.mjs +7 -0
  466. package/dist/url/buildParameters.d.mts +13 -0
  467. package/dist/url/buildParameters.mjs +17 -0
  468. package/dist/url/buildRelative.d.mts +13 -0
  469. package/dist/url/buildRelative.mjs +13 -0
  470. package/dist/url/buildUrl.d.mts +16 -0
  471. package/dist/url/buildUrl.mjs +18 -0
  472. package/dist/url/isAbsolute.d.mts +11 -0
  473. package/dist/url/isAbsolute.mjs +14 -0
  474. package/dist/url/isRelative.d.mts +11 -0
  475. package/dist/url/isRelative.mjs +7 -0
  476. package/dist/url/url.d.mts +9 -0
  477. package/dist/url/url.mjs +1 -0
  478. package/dist/url/writeUrlContents.d.mts +16 -0
  479. package/dist/url/writeUrlContents.mjs +30 -0
  480. package/dist/util/defaultTo.d.mts +12 -0
  481. package/dist/util/defaultTo.mjs +20 -0
  482. package/dist/util/getBrotliCompressed.d.mts +14 -0
  483. package/dist/util/getBrotliCompressed.mjs +15 -0
  484. package/dist/util/getBrotliDecompressed.d.mts +14 -0
  485. package/dist/util/getBrotliDecompressed.mjs +17 -0
  486. package/dist/util/getClean.d.mts +18 -0
  487. package/dist/util/getClean.mjs +15 -0
  488. package/dist/util/getGzipCompressed.d.mts +14 -0
  489. package/dist/util/getGzipCompressed.mjs +15 -0
  490. package/dist/util/getGzipDecompressed.d.mts +14 -0
  491. package/dist/util/getGzipDecompressed.mjs +17 -0
  492. package/dist/util/getWithoutHash.d.mts +12 -0
  493. package/dist/util/getWithoutHash.mjs +14 -0
  494. package/dist/util/getWithoutParameter.d.mts +12 -0
  495. package/dist/util/getWithoutParameter.mjs +14 -0
  496. package/dist/util/isUndefined.d.mts +14 -0
  497. package/dist/util/isUndefined.mjs +15 -0
  498. package/dist/util/promiseChunks.d.mts +12 -0
  499. package/dist/util/promiseChunks.mjs +18 -0
  500. package/dist/util/sleep.d.mts +7 -0
  501. package/dist/util/sleep.mjs +6 -0
  502. package/dist/xml/getXml.d.mts +7 -0
  503. package/dist/xml/getXml.mjs +14 -0
  504. package/package.json +247 -1
@@ -0,0 +1,10 @@
1
+ import trim from "lodash/trim.js";
2
+ //#region src/string/getFolder.ts
3
+ /**
4
+ * Take an input that may have a / before or after the input and return just the folder.
5
+ */
6
+ const getFolder = ({ input }) => {
7
+ return trim(input, "/").trim();
8
+ };
9
+ //#endregion
10
+ export { getFolder as default };
@@ -0,0 +1,13 @@
1
+ //#region src/string/getProperCase.d.ts
2
+ type GetProperCase = {
3
+ input: any;
4
+ hyphen?: boolean;
5
+ pipe?: boolean;
6
+ underscore?: boolean;
7
+ };
8
+ /**
9
+ * Return a string "With Proper Casing".
10
+ */
11
+ declare const getProperCase: (props: GetProperCase) => string;
12
+ //#endregion
13
+ export { getProperCase as default };
@@ -0,0 +1,14 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getProperCase.ts
3
+ /**
4
+ * Return a string "With Proper Casing".
5
+ */
6
+ const getProperCase = (props) => {
7
+ let string = getString({ input: props.input });
8
+ if (props?.hyphen) string = string.split(/-/g).join(" ");
9
+ if (props?.pipe) string = string.split(/\|/g).join(" ");
10
+ if (props?.underscore) string = string.split(/_/g).join(" ");
11
+ return string.replace(/\w\S*/g, (word) => word.charAt(0).toUpperCase() + word.substr(1).toLowerCase());
12
+ };
13
+ //#endregion
14
+ export { getProperCase as default };
@@ -0,0 +1,11 @@
1
+ //#region src/string/getString.d.ts
2
+ /**
3
+ * Convert into string.
4
+ */
5
+ declare const getString: ({
6
+ input
7
+ }: {
8
+ input: any;
9
+ }) => string;
10
+ //#endregion
11
+ export { getString as default };
@@ -0,0 +1,18 @@
1
+ import getNumber from "../date/getNumber.mjs";
2
+ import isObject from "lodash/isObject.js";
3
+ import isArray from "lodash/isArray.js";
4
+ import isDate from "lodash/isDate.js";
5
+ //#region src/string/getString.ts
6
+ /**
7
+ * Convert into string.
8
+ */
9
+ const getString = ({ input }) => {
10
+ let string = "";
11
+ if ("string" === typeof input) string = input;
12
+ else if ("number" === typeof input) string = input.toString();
13
+ else if (isObject(input) || isArray(input)) string = JSON.stringify(input);
14
+ else if (isDate(input)) string = getNumber({ input }).toString();
15
+ return string;
16
+ };
17
+ //#endregion
18
+ export { getString as default };
@@ -0,0 +1,12 @@
1
+ //#region src/string/getStringFromStream.d.ts
2
+ /**
3
+ * Converts a stream into a string.
4
+ * https://stackoverflow.com/a/49428486
5
+ */
6
+ declare const getStringFromStream: ({
7
+ stream
8
+ }: {
9
+ stream: any;
10
+ }) => Promise<string>;
11
+ //#endregion
12
+ export { getStringFromStream as default };
@@ -0,0 +1,15 @@
1
+ //#region src/string/getStringFromStream.ts
2
+ /**
3
+ * Converts a stream into a string.
4
+ * https://stackoverflow.com/a/49428486
5
+ */
6
+ const getStringFromStream = ({ stream }) => {
7
+ const chunks = [];
8
+ return new Promise((resolve, reject) => {
9
+ stream.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
10
+ stream.on("error", (err) => reject(err));
11
+ stream.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));
12
+ });
13
+ };
14
+ //#endregion
15
+ export { getStringFromStream as default };
@@ -0,0 +1,13 @@
1
+ //#region src/string/getWithoutAccents.d.ts
2
+ type GetWithoutAccents = {
3
+ input: string;
4
+ };
5
+ /**
6
+ * Remove the accents from a string.
7
+ * https://stackoverflow.com/a/37511463
8
+ */
9
+ declare const getWithoutAccents: ({
10
+ input
11
+ }: GetWithoutAccents) => string;
12
+ //#endregion
13
+ export { getWithoutAccents as default };
@@ -0,0 +1,11 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getWithoutAccents.ts
3
+ /**
4
+ * Remove the accents from a string.
5
+ * https://stackoverflow.com/a/37511463
6
+ */
7
+ const getWithoutAccents = ({ input }) => {
8
+ return getString({ input }).normalize("NFD").replace(/[\u0300-\u036f]/g, "");
9
+ };
10
+ //#endregion
11
+ export { getWithoutAccents as default };
@@ -0,0 +1,13 @@
1
+ //#region src/string/getWithoutHtmlTags.d.ts
2
+ type GetWithoutHtmlTags = {
3
+ input: any;
4
+ };
5
+ /**
6
+ * Removes all HTML tags from an input.
7
+ * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
8
+ */
9
+ declare const getWithoutHtmlTags: ({
10
+ input
11
+ }: GetWithoutHtmlTags) => string;
12
+ //#endregion
13
+ export { getWithoutHtmlTags as default };
@@ -0,0 +1,11 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getWithoutHtmlTags.ts
3
+ /**
4
+ * Removes all HTML tags from an input.
5
+ * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
6
+ */
7
+ const getWithoutHtmlTags = ({ input }) => {
8
+ return getString({ input }).replace(/(<([^>]+)>)/gi, "");
9
+ };
10
+ //#endregion
11
+ export { getWithoutHtmlTags as default };
@@ -0,0 +1,13 @@
1
+ //#region src/string/getWithoutPunctuation.d.ts
2
+ type GetWithoutPunctuation = {
3
+ input: string;
4
+ };
5
+ /**
6
+ * Remove all punctuation from a string and replace with a space.
7
+ * https://stackoverflow.com/a/25575009
8
+ */
9
+ declare const getWithoutPunctuation: ({
10
+ input
11
+ }: GetWithoutPunctuation) => string;
12
+ //#endregion
13
+ export { getWithoutPunctuation as default };
@@ -0,0 +1,11 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getWithoutPunctuation.ts
3
+ /**
4
+ * Remove all punctuation from a string and replace with a space.
5
+ * https://stackoverflow.com/a/25575009
6
+ */
7
+ const getWithoutPunctuation = ({ input }) => {
8
+ return getString({ input }).replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g, "").replace(/\s+/g, " ");
9
+ };
10
+ //#endregion
11
+ export { getWithoutPunctuation as default };
@@ -0,0 +1,12 @@
1
+ //#region src/string/getWithoutUnderscores.d.ts
2
+ type GetWithoutUnderscores = {
3
+ input: string;
4
+ };
5
+ /**
6
+ * Replace all underscores with a space.
7
+ */
8
+ declare const getWithoutUnderscores: ({
9
+ input
10
+ }: GetWithoutUnderscores) => string;
11
+ //#endregion
12
+ export { getWithoutUnderscores as default };
@@ -0,0 +1,10 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getWithoutUnderscores.ts
3
+ /**
4
+ * Replace all underscores with a space.
5
+ */
6
+ const getWithoutUnderscores = ({ input }) => {
7
+ return getString({ input }).replace("_", " ");
8
+ };
9
+ //#endregion
10
+ export { getWithoutUnderscores as default };
@@ -0,0 +1,13 @@
1
+ //#region src/string/getWithoutWhitespaces.d.ts
2
+ type GetWithoutWhitespaces = {
3
+ input: string;
4
+ };
5
+ /**
6
+ * Remove all new lines, tabs multiple spaces, with a single space.
7
+ * https://stackoverflow.com/a/45029224
8
+ */
9
+ declare const getWithoutWhitespaces: ({
10
+ input
11
+ }: GetWithoutWhitespaces) => string;
12
+ //#endregion
13
+ export { getWithoutWhitespaces as default };
@@ -0,0 +1,11 @@
1
+ import getString from "./getString.mjs";
2
+ //#region src/string/getWithoutWhitespaces.ts
3
+ /**
4
+ * Remove all new lines, tabs multiple spaces, with a single space.
5
+ * https://stackoverflow.com/a/45029224
6
+ */
7
+ const getWithoutWhitespaces = ({ input }) => {
8
+ return getString({ input }).replace(/\s+/g, " ").trim();
9
+ };
10
+ //#endregion
11
+ export { getWithoutWhitespaces as default };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isAllData.d.ts
2
+ /**
3
+ * Are all SWRs data ready.
4
+ */
5
+ declare const isAllData: ({
6
+ swrs
7
+ }: {
8
+ swrs: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isAllData as default };
@@ -0,0 +1,12 @@
1
+ import isData from "./isData.mjs";
2
+ //#region src/swr/isAllData.ts
3
+ /**
4
+ * Are all SWRs data ready.
5
+ */
6
+ const isAllData = ({ swrs }) => {
7
+ let fetcherWithData = 0;
8
+ for (const swr in swrs) if (isData({ swr: swrs[swr] })) fetcherWithData++;
9
+ return fetcherWithData === Object.keys(swrs).length;
10
+ };
11
+ //#endregion
12
+ export { isAllData as default };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isAnyError.d.ts
2
+ /**
3
+ * Are any of the SWRs marked as an error.
4
+ */
5
+ declare const isAnyError: ({
6
+ swrs
7
+ }: {
8
+ swrs: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isAnyError as default };
@@ -0,0 +1,12 @@
1
+ import isError from "./isError.mjs";
2
+ //#region src/swr/isAnyError.ts
3
+ /**
4
+ * Are any of the SWRs marked as an error.
5
+ */
6
+ const isAnyError = ({ swrs }) => {
7
+ let fetcherError = 0;
8
+ for (const swr in swrs) if (isError({ swr: swrs[swr] })) fetcherError++;
9
+ return fetcherError > 0;
10
+ };
11
+ //#endregion
12
+ export { isAnyError as default };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isAnyLoading.d.ts
2
+ /**
3
+ * Are any of SWRs loading
4
+ */
5
+ declare const isAnyLoading: ({
6
+ swrs
7
+ }: {
8
+ swrs: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isAnyLoading as default, isAnyLoading };
@@ -0,0 +1,12 @@
1
+ import isLoading from "./isLoading.mjs";
2
+ //#region src/swr/isAnyLoading.ts
3
+ /**
4
+ * Are any of SWRs loading
5
+ */
6
+ const isAnyLoading = ({ swrs }) => {
7
+ let fetcherLoading = 0;
8
+ for (const swr in swrs) if (isLoading({ swr: swrs[swr] })) fetcherLoading++;
9
+ return fetcherLoading > 0;
10
+ };
11
+ //#endregion
12
+ export { isAnyLoading as default, isAnyLoading };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isData.d.ts
2
+ /**
3
+ * Check to see if a single SWR has an error.
4
+ */
5
+ declare const isData: ({
6
+ swr
7
+ }: {
8
+ swr: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isData as default };
@@ -0,0 +1,7 @@
1
+ //#region src/swr/isData.ts
2
+ /**
3
+ * Check to see if a single SWR has an error.
4
+ */
5
+ const isData = ({ swr }) => (void 0 === swr.error || null === swr.error) && void 0 !== swr.data && "undefined" !== swr.data;
6
+ //#endregion
7
+ export { isData as default };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isError.d.ts
2
+ /**
3
+ * Check to see if a single SWR has an error.
4
+ */
5
+ declare const isError: ({
6
+ swr
7
+ }: {
8
+ swr: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isError as default };
@@ -0,0 +1,7 @@
1
+ //#region src/swr/isError.ts
2
+ /**
3
+ * Check to see if a single SWR has an error.
4
+ */
5
+ const isError = ({ swr }) => void 0 !== swr.error && null !== swr.error;
6
+ //#endregion
7
+ export { isError as default };
@@ -0,0 +1,11 @@
1
+ //#region src/swr/isLoading.d.ts
2
+ /**
3
+ * Check to see if a single SWR is loading.
4
+ */
5
+ declare const isLoading: ({
6
+ swr
7
+ }: {
8
+ swr: any;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isLoading as default };
@@ -0,0 +1,9 @@
1
+ import isData from "./isData.mjs";
2
+ import isError from "./isError.mjs";
3
+ //#region src/swr/isLoading.ts
4
+ /**
5
+ * Check to see if a single SWR is loading.
6
+ */
7
+ const isLoading = ({ swr }) => !isError({ swr }) && !isData({ swr });
8
+ //#endregion
9
+ export { isLoading as default };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,3 @@
1
+ import "../axios/post.mjs";
2
+ import "lodash/isArray.js";
3
+ export {};
@@ -0,0 +1,9 @@
1
+ //#region src/upTimeRobot/logTypes.d.ts
2
+ declare const logTypes: {
3
+ DOWN: number;
4
+ UP: number;
5
+ PAUSED: number;
6
+ STARTED: number;
7
+ };
8
+ //#endregion
9
+ export { logTypes as default };
@@ -0,0 +1,9 @@
1
+ //#region src/upTimeRobot/logTypes.ts
2
+ const logTypes = {
3
+ DOWN: 1,
4
+ UP: 2,
5
+ PAUSED: 99,
6
+ STARTED: 98
7
+ };
8
+ //#endregion
9
+ export { logTypes as default };
@@ -0,0 +1,10 @@
1
+ //#region src/upTimeRobot/monitorStatuses.d.ts
2
+ declare const monitorStatuses: {
3
+ PAUSED: number;
4
+ NOT_CHECKED: number;
5
+ UP: number;
6
+ SEEMS_DOWN: number;
7
+ DOWN: number;
8
+ };
9
+ //#endregion
10
+ export { monitorStatuses as default };
@@ -0,0 +1,10 @@
1
+ //#region src/upTimeRobot/monitorStatuses.ts
2
+ const monitorStatuses = {
3
+ PAUSED: 0,
4
+ NOT_CHECKED: 1,
5
+ UP: 2,
6
+ SEEMS_DOWN: 8,
7
+ DOWN: 9
8
+ };
9
+ //#endregion
10
+ export { monitorStatuses as default };
@@ -0,0 +1,12 @@
1
+ //#region src/upTimeRobot/monitorSubTypes.d.ts
2
+ declare const monitorSubTypes: {
3
+ HTTP: number;
4
+ HTTPS: number;
5
+ FTP: number;
6
+ SMTP: number;
7
+ POP3: number;
8
+ IMAP: number;
9
+ CUSTOM_PORT: number;
10
+ };
11
+ //#endregion
12
+ export { monitorSubTypes as default };
@@ -0,0 +1,12 @@
1
+ //#region src/upTimeRobot/monitorSubTypes.ts
2
+ const monitorSubTypes = {
3
+ HTTP: 1,
4
+ HTTPS: 2,
5
+ FTP: 3,
6
+ SMTP: 4,
7
+ POP3: 5,
8
+ IMAP: 6,
9
+ CUSTOM_PORT: 99
10
+ };
11
+ //#endregion
12
+ export { monitorSubTypes as default };
@@ -0,0 +1,10 @@
1
+ //#region src/upTimeRobot/monitorTypes.d.ts
2
+ declare const monitorTypes: {
3
+ HTTPS: number;
4
+ KEYWORD: number;
5
+ PING: number;
6
+ PORT: number;
7
+ HEARTBEAT: number;
8
+ };
9
+ //#endregion
10
+ export { monitorTypes as default };
@@ -0,0 +1,10 @@
1
+ //#region src/upTimeRobot/monitorTypes.ts
2
+ const monitorTypes = {
3
+ HTTPS: 1,
4
+ KEYWORD: 2,
5
+ PING: 3,
6
+ PORT: 4,
7
+ HEARTBEAT: 5
8
+ };
9
+ //#endregion
10
+ export { monitorTypes as default };
@@ -0,0 +1,7 @@
1
+ //#region src/upTimeRobot/requestStatuses.d.ts
2
+ declare const requestStatuses: {
3
+ ERROR: string;
4
+ SUCCESS: string;
5
+ };
6
+ //#endregion
7
+ export { requestStatuses as default };
@@ -0,0 +1,7 @@
1
+ //#region src/upTimeRobot/requestStatuses.ts
2
+ const requestStatuses = {
3
+ ERROR: "fail",
4
+ SUCCESS: "ok"
5
+ };
6
+ //#endregion
7
+ export { requestStatuses as default };
@@ -0,0 +1,13 @@
1
+ //#region src/url/buildParameters.d.ts
2
+ /**
3
+ * Take an object and return the parameter for a given URL irrespective of path.
4
+ */
5
+ declare const buildParameters: ({
6
+ existing,
7
+ updated
8
+ }: {
9
+ existing: object;
10
+ updated: object;
11
+ }) => string;
12
+ //#endregion
13
+ export { buildParameters as default };
@@ -0,0 +1,17 @@
1
+ import merge from "lodash/merge.js";
2
+ //#region src/url/buildParameters.ts
3
+ /**
4
+ * Take an object and return the parameter for a given URL irrespective of path.
5
+ */
6
+ const buildParameters = ({ existing, updated }) => {
7
+ const merged = merge(existing, updated);
8
+ let response = "";
9
+ if (Object.values(merged).length) for (const key in merged) {
10
+ const value = void 0 === updated[key] ? existing[key] : updated[key];
11
+ response += "" === response ? "?" : "&";
12
+ response += `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
13
+ }
14
+ return response;
15
+ };
16
+ //#endregion
17
+ export { buildParameters as default };
@@ -0,0 +1,13 @@
1
+ //#region src/url/buildRelative.d.ts
2
+ /**
3
+ * Create a new relative URL based on the current path.
4
+ */
5
+ declare const buildRelative: ({
6
+ router,
7
+ updated
8
+ }: {
9
+ router: any;
10
+ updated: object;
11
+ }) => string;
12
+ //#endregion
13
+ export { buildRelative as default };
@@ -0,0 +1,13 @@
1
+ import buildParameters from "./buildParameters.mjs";
2
+ //#region src/url/buildRelative.ts
3
+ /**
4
+ * Create a new relative URL based on the current path.
5
+ */
6
+ const buildRelative = ({ router, updated }) => {
7
+ return `${router.pathname}${buildParameters({
8
+ existing: router.query,
9
+ updated: updated || {}
10
+ })}`;
11
+ };
12
+ //#endregion
13
+ export { buildRelative as default };
@@ -0,0 +1,16 @@
1
+ import { Url } from "./url.mjs";
2
+
3
+ //#region src/url/buildUrl.d.ts
4
+ type BuildUrlType = {
5
+ path: string;
6
+ url: Url;
7
+ };
8
+ /**
9
+ * Get the current base url.
10
+ */
11
+ declare const buildUrl: ({
12
+ path,
13
+ url
14
+ }: BuildUrlType) => string;
15
+ //#endregion
16
+ export { buildUrl as default };
@@ -0,0 +1,18 @@
1
+ import isDevelopment from "../environment/isDevelopment.mjs";
2
+ import isLocalhost from "../environment/isLocalhost.mjs";
3
+ import isProduction from "../environment/isProduction.mjs";
4
+ import isStaging from "../environment/isStaging.mjs";
5
+ //#region src/url/buildUrl.ts
6
+ /**
7
+ * Get the current base url.
8
+ */
9
+ const buildUrl = ({ path, url }) => {
10
+ let response;
11
+ if (isDevelopment() && isLocalhost()) response = url.localhost;
12
+ else if (isStaging()) response = url.staging;
13
+ else if (isProduction()) response = url.production;
14
+ else response = url.development;
15
+ return response + path || "";
16
+ };
17
+ //#endregion
18
+ export { buildUrl as default };
@@ -0,0 +1,11 @@
1
+ //#region src/url/isAbsolute.d.ts
2
+ /**
3
+ * Does the URL begin with HTTP or HTTPS?
4
+ */
5
+ declare const isAbsolute: ({
6
+ input
7
+ }: {
8
+ input: string;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isAbsolute as default };
@@ -0,0 +1,14 @@
1
+ //#region src/url/isAbsolute.ts
2
+ /**
3
+ * Does the URL begin with HTTP or HTTPS?
4
+ */
5
+ const isAbsolute = ({ input }) => {
6
+ try {
7
+ new URL(input);
8
+ } catch (error) {
9
+ return false;
10
+ }
11
+ return true;
12
+ };
13
+ //#endregion
14
+ export { isAbsolute as default };
@@ -0,0 +1,11 @@
1
+ //#region src/url/isRelative.d.ts
2
+ /**
3
+ * Does the URL begin with a slash.
4
+ */
5
+ declare const isRelative: ({
6
+ input
7
+ }: {
8
+ input: string;
9
+ }) => boolean;
10
+ //#endregion
11
+ export { isRelative as default };
@@ -0,0 +1,7 @@
1
+ //#region src/url/isRelative.ts
2
+ /**
3
+ * Does the URL begin with a slash.
4
+ */
5
+ const isRelative = ({ input }) => "/" === input.trim().charAt(0);
6
+ //#endregion
7
+ export { isRelative as default };