@8ms/helpers 1.1.71 → 1.1.73

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 (352) hide show
  1. package/api/response.js +1 -12
  2. package/api/states.js +1 -10
  3. package/api/unexpectedError.js +1 -4
  4. package/array/contains.js +2 -6
  5. package/array/getArray.js +2 -10
  6. package/atInternet/request.js +1 -2
  7. package/aws/athenaExpress/initClient.js +3 -27
  8. package/aws/athenaExpress/query.js +2 -9
  9. package/aws/getConfig.js +2 -26
  10. package/aws/glue/initClient.js +2 -17
  11. package/aws/glue/invoke.js +2 -22
  12. package/aws/isResponse200.js +2 -21
  13. package/aws/lambda/getHandlerPath.js +1 -7
  14. package/aws/lambda/initClient.js +2 -17
  15. package/aws/lambda/invoke.js +2 -39
  16. package/aws/s3/copyFile.js +2 -13
  17. package/aws/s3/deleteFile.js +2 -12
  18. package/aws/s3/deleteFiles.js +2 -16
  19. package/aws/s3/deleteFolder.js +2 -35
  20. package/aws/s3/getGlueJson.js +2 -15
  21. package/aws/s3/getPresignedPost.js +3 -16
  22. package/aws/s3/getSignedUrl.js +2 -15
  23. package/aws/s3/initClient.js +2 -17
  24. package/aws/s3/isFileExists.js +2 -26
  25. package/aws/s3/listFiles.js +2 -32
  26. package/aws/s3/listFolders.js +4 -31
  27. package/aws/s3/moveFile.js +2 -20
  28. package/aws/s3/readBuffer.js +2 -51
  29. package/aws/s3/readFile.js +2 -69
  30. package/aws/s3/writeFile.js +2 -15
  31. package/aws/s3/writePresignedPost.js +2 -30
  32. package/aws/s3cache/cache.js +1 -2
  33. package/aws/s3cache/getCache.js +2 -35
  34. package/aws/s3cache/getKey.js +2 -16
  35. package/aws/s3cache/saveCache.js +2 -12
  36. package/aws/s3cache/updateCache.js +2 -23
  37. package/aws/ses/SimpleEmail.js +2 -115
  38. package/aws/ses/initClient.js +2 -17
  39. package/aws/ssm/getParameter.js +2 -39
  40. package/aws/ssm/initClient.js +2 -17
  41. package/axios/get.js +1 -44
  42. package/axios/post.js +2 -46
  43. package/boolean/getBoolean.js +2 -15
  44. package/class/BaseClass.js +9 -50
  45. package/crud/actions.js +1 -10
  46. package/crypto/getDecrypt.js +2 -11
  47. package/crypto/getEncrypt.js +2 -11
  48. package/crypto/getRandom.js +2 -10
  49. package/crypto/getSha256.js +2 -15
  50. package/date/date.js +1 -2
  51. package/date/duration.js +1 -2
  52. package/date/durationComparisons.js +1 -7
  53. package/date/durations.js +1 -10
  54. package/date/financialYear.js +1 -2
  55. package/date/financialYearWeek.js +1 -2
  56. package/date/format.js +2 -18
  57. package/date/getDate.js +9 -96
  58. package/date/getDatesBetween.js +3 -25
  59. package/date/getDurationHours.js +2 -25
  60. package/date/getDurationMinutes.js +2 -24
  61. package/date/getFinancialYear.js +8 -48
  62. package/date/getFinancialYearToDate.js +2 -18
  63. package/date/getFinancialYearToYesterday.js +2 -18
  64. package/date/getFinancialYearWeeks.js +2 -29
  65. package/date/getLastWeek.js +2 -28
  66. package/date/getMax.js +2 -15
  67. package/date/getMidnight.js +2 -12
  68. package/date/getMin.js +2 -15
  69. package/date/getMonday.js +5 -32
  70. package/date/getNumber.js +2 -14
  71. package/date/getPredefinedTimeframe.js +2 -23
  72. package/date/getSunday.js +5 -32
  73. package/date/getThisWeek.js +2 -28
  74. package/date/getTimeZoned.js +5 -36
  75. package/date/getToday.js +2 -39
  76. package/date/getTwoWeeksAgo.js +2 -28
  77. package/date/getWeeksAgo.js +2 -16
  78. package/date/getYesterday.js +2 -40
  79. package/date/isDateValid.js +2 -22
  80. package/date/isLastWeek.js +2 -13
  81. package/date/isThisWeek.js +2 -13
  82. package/date/parseExcelDate.js +2 -17
  83. package/date/predefinedTimeframes.js +1 -9
  84. package/date/timeframe.js +1 -2
  85. package/date/timeframes.js +1 -7
  86. package/deepCrawl/buildRequest.js +4 -83
  87. package/deepCrawl/filter.js +1 -2
  88. package/deepCrawl/getData.js +1 -29
  89. package/deepCrawl/initClient.js +2 -31
  90. package/deepCrawl/operands.js +1 -13
  91. package/deepCrawl/orders.js +1 -7
  92. package/deepCrawl/reports.js +1 -13
  93. package/environment/environments.js +1 -8
  94. package/environment/getEnvironment.js +2 -42
  95. package/environment/isAws.js +2 -10
  96. package/environment/isDevelopment.js +1 -9
  97. package/environment/isLocalhost.js +2 -21
  98. package/environment/isProduction.js +1 -9
  99. package/environment/isStaging.js +1 -9
  100. package/environment/isVercel.js +2 -6
  101. package/environment/platforms.js +1 -7
  102. package/eskimi/ageGroups.js +1 -41
  103. package/eskimi/campaign.js +1 -2
  104. package/eskimi/devices.js +1 -13
  105. package/eskimi/endpoints.js +2 -17
  106. package/eskimi/genders.js +1 -13
  107. package/eskimi/getAccessToken.js +2 -22
  108. package/eskimi/getAgeGroup.js +2 -16
  109. package/eskimi/getCampaignIds.js +2 -11
  110. package/eskimi/getDevice.js +2 -16
  111. package/eskimi/getGender.js +2 -16
  112. package/eskimi/request.js +2 -23
  113. package/globals.d.js +1 -0
  114. package/google/bigQuery/initClient.js +2 -20
  115. package/google/bigQuery/query.js +2 -9
  116. package/google/getConfig.js +3 -21
  117. package/google/sheets/getAssociatedData.js +8 -52
  118. package/google/sheets/getBatchData.js +1 -19
  119. package/google/sheets/initClient.js +2 -22
  120. package/google/sheets/isCellNa.js +2 -6
  121. package/google/storage/initClient.js +2 -20
  122. package/google/storage/writeFile.js +2 -30
  123. package/googleAds/getCustomer.js +2 -14
  124. package/googleAds/initClient.js +2 -24
  125. package/initClients.js +5 -106
  126. package/json/isJson.js +2 -18
  127. package/littleWarden/getUrlStatus.js +2 -20
  128. package/littleWarden/isAllGood.js +2 -17
  129. package/littleWarden/isDanger.js +2 -17
  130. package/littleWarden/isWarning.js +2 -17
  131. package/littleWarden/states.js +1 -8
  132. package/myTarget/getAccessToken.js +2 -22
  133. package/myTarget/request.js +2 -23
  134. package/nextAuth/isSessionReady.js +1 -12
  135. package/nextAuth/states.js +2 -8
  136. package/nextJs/getIp.js +2 -12
  137. package/nextJs/getUserAgent.js +2 -6
  138. package/number/getDivide.js +2 -17
  139. package/number/getNumber.js +7 -50
  140. package/number/getPercent.js +2 -17
  141. package/number/getPercentIncrease.js +2 -17
  142. package/number/getRounded.js +2 -21
  143. package/package.json +47 -44
  144. package/prisma/initClient.js +3 -33
  145. package/snapchat/getAccessToken.js +2 -36
  146. package/sorting/byNumberAscending.js +2 -16
  147. package/sorting/byNumberDescending.js +2 -16
  148. package/sorting/byStringAscending.js +2 -20
  149. package/sorting/byStringDescending.js +2 -20
  150. package/string/formatCapitalise.js +2 -14
  151. package/string/getCleanFolder.js +2 -11
  152. package/string/getString.js +2 -35
  153. package/string/getStringFromStream.js +2 -14
  154. package/string/toProperCase.js +2 -17
  155. package/swr/isAllData.js +2 -18
  156. package/swr/isAnyError.js +2 -18
  157. package/swr/isAnyLoading.js +2 -20
  158. package/swr/isData.js +2 -6
  159. package/swr/isError.js +2 -6
  160. package/swr/isLoading.js +2 -11
  161. package/upTimeRobot/getMonitors.js +2 -31
  162. package/upTimeRobot/logTypes.js +1 -9
  163. package/upTimeRobot/monitorStatuses.js +1 -10
  164. package/upTimeRobot/monitorSubTypes.js +1 -12
  165. package/upTimeRobot/monitorTypes.js +1 -10
  166. package/upTimeRobot/requestStatuses.js +1 -7
  167. package/url/buildParameters.js +2 -21
  168. package/url/buildRelative.js +2 -12
  169. package/url/buildUrl.js +2 -28
  170. package/url/isAbsolute.js +2 -14
  171. package/url/isRelative.js +2 -7
  172. package/url/url.js +1 -2
  173. package/util/defaultTo.js +2 -34
  174. package/util/isUndefined.js +2 -18
  175. package/util/sleep.js +1 -6
  176. package/webWorker/states.js +1 -8
  177. package/xml/getXml.js +1 -14
  178. package/api/response.d.ts +0 -8
  179. package/api/states.d.ts +0 -9
  180. package/api/unexpectedError.d.ts +0 -2
  181. package/array/contains.d.ts +0 -8
  182. package/array/getArray.d.ts +0 -7
  183. package/atInternet/request.d.ts +0 -30
  184. package/aws/athenaExpress/initClient.d.ts +0 -12
  185. package/aws/athenaExpress/query.d.ts +0 -8
  186. package/aws/getConfig.d.ts +0 -13
  187. package/aws/glue/initClient.d.ts +0 -10
  188. package/aws/glue/invoke.d.ts +0 -9
  189. package/aws/isResponse200.d.ts +0 -7
  190. package/aws/lambda/getHandlerPath.d.ts +0 -5
  191. package/aws/lambda/initClient.d.ts +0 -10
  192. package/aws/lambda/invoke.d.ts +0 -12
  193. package/aws/s3/copyFile.d.ts +0 -13
  194. package/aws/s3/deleteFile.d.ts +0 -9
  195. package/aws/s3/deleteFiles.d.ts +0 -9
  196. package/aws/s3/deleteFolder.d.ts +0 -9
  197. package/aws/s3/getGlueJson.d.ts +0 -5
  198. package/aws/s3/getPresignedPost.d.ts +0 -20
  199. package/aws/s3/getSignedUrl.d.ts +0 -12
  200. package/aws/s3/initClient.d.ts +0 -10
  201. package/aws/s3/isFileExists.d.ts +0 -9
  202. package/aws/s3/listFiles.d.ts +0 -9
  203. package/aws/s3/listFolders.d.ts +0 -9
  204. package/aws/s3/moveFile.d.ts +0 -10
  205. package/aws/s3/readBuffer.d.ts +0 -13
  206. package/aws/s3/readFile.d.ts +0 -30
  207. package/aws/s3/writeFile.d.ts +0 -10
  208. package/aws/s3/writePresignedPost.d.ts +0 -14
  209. package/aws/s3cache/cache.d.ts +0 -7
  210. package/aws/s3cache/getCache.d.ts +0 -12
  211. package/aws/s3cache/getKey.d.ts +0 -10
  212. package/aws/s3cache/saveCache.d.ts +0 -10
  213. package/aws/s3cache/updateCache.d.ts +0 -10
  214. package/aws/ses/SimpleEmail.d.ts +0 -51
  215. package/aws/ses/initClient.d.ts +0 -10
  216. package/aws/ssm/getParameter.d.ts +0 -10
  217. package/aws/ssm/initClient.d.ts +0 -10
  218. package/axios/get.d.ts +0 -8
  219. package/axios/post.d.ts +0 -12
  220. package/boolean/getBoolean.d.ts +0 -7
  221. package/class/BaseClass.d.ts +0 -31
  222. package/crud/actions.d.ts +0 -8
  223. package/crypto/getDecrypt.d.ts +0 -10
  224. package/crypto/getEncrypt.d.ts +0 -10
  225. package/crypto/getRandom.d.ts +0 -8
  226. package/crypto/getSha256.d.ts +0 -8
  227. package/date/date.d.ts +0 -4
  228. package/date/duration.d.ts +0 -5
  229. package/date/durationComparisons.d.ts +0 -5
  230. package/date/durations.d.ts +0 -8
  231. package/date/financialYear.d.ts +0 -4
  232. package/date/financialYearWeek.d.ts +0 -6
  233. package/date/format.d.ts +0 -13
  234. package/date/getDate.d.ts +0 -12
  235. package/date/getDatesBetween.d.ts +0 -10
  236. package/date/getDurationHours.d.ts +0 -8
  237. package/date/getDurationMinutes.d.ts +0 -8
  238. package/date/getFinancialYear.d.ts +0 -9
  239. package/date/getFinancialYearToDate.d.ts +0 -7
  240. package/date/getFinancialYearToYesterday.d.ts +0 -7
  241. package/date/getFinancialYearWeeks.d.ts +0 -9
  242. package/date/getLastWeek.d.ts +0 -10
  243. package/date/getMax.d.ts +0 -12
  244. package/date/getMidnight.d.ts +0 -10
  245. package/date/getMin.d.ts +0 -12
  246. package/date/getMonday.d.ts +0 -14
  247. package/date/getNumber.d.ts +0 -11
  248. package/date/getPredefinedTimeframe.d.ts +0 -9
  249. package/date/getSunday.d.ts +0 -14
  250. package/date/getThisWeek.d.ts +0 -10
  251. package/date/getTimeZoned.d.ts +0 -13
  252. package/date/getToday.d.ts +0 -9
  253. package/date/getTwoWeeksAgo.d.ts +0 -10
  254. package/date/getWeeksAgo.d.ts +0 -12
  255. package/date/getYesterday.d.ts +0 -9
  256. package/date/isDateValid.d.ts +0 -7
  257. package/date/isLastWeek.d.ts +0 -6
  258. package/date/isThisWeek.d.ts +0 -6
  259. package/date/parseExcelDate.d.ts +0 -8
  260. package/date/predefinedTimeframes.d.ts +0 -7
  261. package/date/timeframe.d.ts +0 -8
  262. package/date/timeframes.d.ts +0 -4
  263. package/deepCrawl/buildRequest.d.ts +0 -15
  264. package/deepCrawl/filter.d.ts +0 -5
  265. package/deepCrawl/getData.d.ts +0 -5
  266. package/deepCrawl/initClient.d.ts +0 -13
  267. package/deepCrawl/operands.d.ts +0 -11
  268. package/deepCrawl/orders.d.ts +0 -9
  269. package/deepCrawl/reports.d.ts +0 -11
  270. package/environment/environments.d.ts +0 -7
  271. package/environment/getEnvironment.d.ts +0 -6
  272. package/environment/isAws.d.ts +0 -5
  273. package/environment/isDevelopment.d.ts +0 -2
  274. package/environment/isLocalhost.d.ts +0 -5
  275. package/environment/isProduction.d.ts +0 -2
  276. package/environment/isStaging.d.ts +0 -2
  277. package/environment/isVercel.d.ts +0 -5
  278. package/environment/platforms.d.ts +0 -6
  279. package/eskimi/ageGroups.d.ts +0 -5
  280. package/eskimi/campaign.d.ts +0 -19
  281. package/eskimi/devices.d.ts +0 -5
  282. package/eskimi/endpoints.d.ts +0 -16
  283. package/eskimi/genders.d.ts +0 -5
  284. package/eskimi/getAccessToken.d.ts +0 -9
  285. package/eskimi/getAgeGroup.d.ts +0 -7
  286. package/eskimi/getCampaignIds.d.ts +0 -7
  287. package/eskimi/getDevice.d.ts +0 -7
  288. package/eskimi/getGender.d.ts +0 -7
  289. package/eskimi/request.d.ts +0 -8
  290. package/google/bigQuery/initClient.d.ts +0 -11
  291. package/google/bigQuery/query.d.ts +0 -9
  292. package/google/getConfig.d.ts +0 -20
  293. package/google/sheets/getAssociatedData.d.ts +0 -16
  294. package/google/sheets/getBatchData.d.ts +0 -18
  295. package/google/sheets/initClient.d.ts +0 -11
  296. package/google/sheets/isCellNa.d.ts +0 -7
  297. package/google/storage/initClient.d.ts +0 -12
  298. package/google/storage/writeFile.d.ts +0 -12
  299. package/googleAds/getCustomer.d.ts +0 -7
  300. package/googleAds/initClient.d.ts +0 -16
  301. package/initClients.d.ts +0 -40
  302. package/json/isJson.d.ts +0 -8
  303. package/littleWarden/getUrlStatus.d.ts +0 -9
  304. package/littleWarden/isAllGood.d.ts +0 -7
  305. package/littleWarden/isDanger.d.ts +0 -7
  306. package/littleWarden/isWarning.d.ts +0 -7
  307. package/littleWarden/states.d.ts +0 -7
  308. package/myTarget/getAccessToken.d.ts +0 -9
  309. package/myTarget/request.d.ts +0 -8
  310. package/nextAuth/isSessionReady.d.ts +0 -4
  311. package/nextAuth/states.d.ts +0 -7
  312. package/nextJs/getIp.d.ts +0 -7
  313. package/nextJs/getUserAgent.d.ts +0 -7
  314. package/number/getDivide.d.ts +0 -9
  315. package/number/getNumber.d.ts +0 -8
  316. package/number/getPercent.d.ts +0 -9
  317. package/number/getPercentIncrease.d.ts +0 -9
  318. package/number/getRounded.d.ts +0 -9
  319. package/prisma/initClient.d.ts +0 -4
  320. package/snapchat/getAccessToken.d.ts +0 -9
  321. package/sorting/byNumberAscending.d.ts +0 -8
  322. package/sorting/byNumberDescending.d.ts +0 -8
  323. package/sorting/byStringAscending.d.ts +0 -8
  324. package/sorting/byStringDescending.d.ts +0 -8
  325. package/string/formatCapitalise.d.ts +0 -9
  326. package/string/getCleanFolder.d.ts +0 -7
  327. package/string/getString.d.ts +0 -7
  328. package/string/getStringFromStream.d.ts +0 -8
  329. package/string/toProperCase.d.ts +0 -7
  330. package/swr/isAllData.d.ts +0 -7
  331. package/swr/isAnyError.d.ts +0 -7
  332. package/swr/isAnyLoading.d.ts +0 -7
  333. package/swr/isData.d.ts +0 -7
  334. package/swr/isError.d.ts +0 -7
  335. package/swr/isLoading.d.ts +0 -7
  336. package/upTimeRobot/getMonitors.d.ts +0 -1
  337. package/upTimeRobot/logTypes.d.ts +0 -7
  338. package/upTimeRobot/monitorStatuses.d.ts +0 -8
  339. package/upTimeRobot/monitorSubTypes.d.ts +0 -10
  340. package/upTimeRobot/monitorTypes.d.ts +0 -8
  341. package/upTimeRobot/requestStatuses.d.ts +0 -5
  342. package/url/buildParameters.d.ts +0 -8
  343. package/url/buildRelative.d.ts +0 -8
  344. package/url/buildUrl.d.ts +0 -10
  345. package/url/isAbsolute.d.ts +0 -7
  346. package/url/isRelative.d.ts +0 -7
  347. package/url/url.d.ts +0 -6
  348. package/util/defaultTo.d.ts +0 -10
  349. package/util/isUndefined.d.ts +0 -9
  350. package/util/sleep.d.ts +0 -4
  351. package/webWorker/states.d.ts +0 -7
  352. package/xml/getXml.d.ts +0 -4
@@ -1,7 +0,0 @@
1
- /**
2
- * Noticed sometimes Google Sheets can struggle with import XML resulting to N/A values.
3
- */
4
- declare const isCellNa: ({ input }: {
5
- input: any;
6
- }) => boolean;
7
- export default isCellNa;
@@ -1,12 +0,0 @@
1
- import { Config } from '../getConfig';
2
- declare type InitClient = {
3
- parameter: Config;
4
- projectId: string;
5
- };
6
- /**
7
- * Initialise the Google Sheets instance using the separate service method.
8
- * https://github.com/googleapis/google-api-nodejs-client
9
- * Library: @googleapis/sheets
10
- */
11
- declare const initClient: ({ parameter, projectId }: InitClient) => void;
12
- export default initClient;
@@ -1,12 +0,0 @@
1
- declare type WriteFile = {
2
- bucket: string;
3
- credentials: any;
4
- data: any;
5
- key: string;
6
- projectId: string;
7
- };
8
- /**
9
- * Write a file to Google Cloud Storage.
10
- */
11
- export declare const writeFile: ({ bucket, data, key, projectId }: WriteFile) => Promise<any>;
12
- export default writeFile;
@@ -1,7 +0,0 @@
1
- /**
2
- * Return the Google Ads Client with the specified customer set.
3
- */
4
- declare const getCustomer: ({ customerId }: {
5
- customerId: string;
6
- }) => Promise<any>;
7
- export default getCustomer;
@@ -1,16 +0,0 @@
1
- export declare type GoogleAdsParameter = {
2
- clientId: string;
3
- clientSecret: string;
4
- developerToken: string;
5
- mccAccountId: string;
6
- refreshToken: string;
7
- };
8
- declare type InitClient = {
9
- parameter: GoogleAdsParameter;
10
- };
11
- /**
12
- * Shorthand function to get the Google Ads Client.
13
- * Library: google-ads-api
14
- */
15
- declare const initClient: ({ parameter }: InitClient) => Promise<void>;
16
- export default initClient;
package/initClients.d.ts DELETED
@@ -1,40 +0,0 @@
1
- import { Config as AwsConfig } from './aws/getConfig';
2
- declare type InitClients = {
3
- athenaExpress?: {
4
- database: string;
5
- s3Bucket: string;
6
- s3Key: string;
7
- };
8
- awsConfig?: AwsConfig;
9
- awsGlue?: boolean;
10
- awsLambda?: boolean;
11
- awsS3?: boolean;
12
- awsSes?: boolean;
13
- awsSsm?: boolean;
14
- deepCrawl?: {
15
- parameterName: string;
16
- };
17
- eskimi?: boolean;
18
- googleAds?: {
19
- parameterName: string;
20
- };
21
- googleBigQuery?: {
22
- projectIds: string | string[];
23
- };
24
- googleConfig?: {
25
- parameterName: string;
26
- };
27
- googleSheets?: boolean;
28
- googleStorage?: {
29
- projectIds: string | string[];
30
- };
31
- prisma?: {
32
- debug?: boolean;
33
- };
34
- myTarget?: boolean;
35
- };
36
- /**
37
- * Function to simplify initialising the clients.
38
- */
39
- declare const initClients: ({ athenaExpress, awsConfig, awsGlue, awsS3, awsSes, awsSsm, deepCrawl, googleAds, googleConfig, googleBigQuery, googleSheets, googleStorage, prisma, }: InitClients) => Promise<void>;
40
- export default initClients;
package/json/isJson.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Is the provided input JSON?
3
- * https://stackoverflow.com/a/33369954
4
- */
5
- declare const isJson: ({ input }: {
6
- input: any;
7
- }) => boolean;
8
- export default isJson;
@@ -1,9 +0,0 @@
1
- declare type GetUrlStatus = {
2
- apiKey: string;
3
- urlId: string;
4
- };
5
- /**
6
- * Get the URL Status for a given URL ID from Little Warden.
7
- */
8
- declare const getUrlStatus: ({ apiKey, urlId }: GetUrlStatus) => Promise<any>;
9
- export default getUrlStatus;
@@ -1,7 +0,0 @@
1
- /**
2
- * Check if the field is All Good.
3
- */
4
- declare const isAllGood: ({ field }: {
5
- field: any;
6
- }) => boolean;
7
- export default isAllGood;
@@ -1,7 +0,0 @@
1
- /**
2
- * Check if the field is Danger.
3
- */
4
- declare const isDanger: ({ field }: {
5
- field: any;
6
- }) => boolean;
7
- export default isDanger;
@@ -1,7 +0,0 @@
1
- /**
2
- * Check if the field is Warning.
3
- */
4
- declare const isWarning: ({ field }: {
5
- field: any;
6
- }) => boolean;
7
- export default isWarning;
@@ -1,7 +0,0 @@
1
- declare const states: {
2
- ALL_GOOD: string;
3
- DANGER: string;
4
- WARNING: string;
5
- };
6
- export declare type State = typeof states.ALL_GOOD | typeof states.DANGER | typeof states.WARNING;
7
- export default states;
@@ -1,9 +0,0 @@
1
- declare type GetAccessToken = {
2
- force: boolean;
3
- parameterName: string;
4
- };
5
- /**
6
- * Retrieve the access token from SSM Parameter Store.
7
- */
8
- declare const getAccessToken: ({ force, parameterName }: GetAccessToken) => Promise<void>;
9
- export default getAccessToken;
@@ -1,8 +0,0 @@
1
- /**
2
- * Make the request to MyTarget API using the access token.
3
- */
4
- declare const request: ({ data, url }: {
5
- data: object;
6
- url: string;
7
- }) => Promise<any>;
8
- export default request;
@@ -1,4 +0,0 @@
1
- declare const isSessionReady: ({ session }: {
2
- session: any;
3
- }) => boolean;
4
- export default isSessionReady;
@@ -1,7 +0,0 @@
1
- declare const states: {
2
- AUTHENTICATED: string;
3
- PENDING: string;
4
- UNAUTHENTICATED: string;
5
- };
6
- export declare type State = typeof states.AUTHENTICATED | typeof states.PENDING | typeof states.UNAUTHENTICATED;
7
- export default states;
package/nextJs/getIp.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Get the user's remote IP Address
3
- */
4
- declare const getIp: ({ req }: {
5
- req: any;
6
- }) => string;
7
- export default getIp;
@@ -1,7 +0,0 @@
1
- /**
2
- * Get the user's User Agent
3
- */
4
- declare const getUserAgent: ({ req }: {
5
- req: any;
6
- }) => string;
7
- export default getUserAgent;
@@ -1,9 +0,0 @@
1
- /**
2
- * Shorthand function to divide number, but fallback if the divisor is 0.
3
- */
4
- declare const getDivide: ({ defaultValue, divisor, numerator }: {
5
- defaultValue?: number;
6
- divisor: any;
7
- numerator: any;
8
- }) => number;
9
- export default getDivide;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take an input and return a number.
3
- */
4
- declare const getNumber: ({ defaultValue, input }: {
5
- defaultValue?: number;
6
- input: any;
7
- }) => number;
8
- export default getNumber;
@@ -1,9 +0,0 @@
1
- /**
2
- * Get the percentage of two numbers.
3
- */
4
- declare const getPercent: ({ defaultValue, divisor, value }: {
5
- defaultValue?: number;
6
- divisor: any;
7
- value: any;
8
- }) => number;
9
- export default getPercent;
@@ -1,9 +0,0 @@
1
- /**
2
- * Formula to work out the percentage increase/decrease.
3
- */
4
- declare const getPercentageIncrease: ({ comparison, current, defaultValue }: {
5
- comparison: any;
6
- current: any;
7
- defaultValue: number;
8
- }) => number;
9
- export default getPercentageIncrease;
@@ -1,9 +0,0 @@
1
- declare type GetRounded = {
2
- decimalPlaces: number;
3
- input: any;
4
- };
5
- /**
6
- * Round a number using the Numbro library.
7
- */
8
- declare const getRounded: ({ decimalPlaces, input }: GetRounded) => number;
9
- export default getRounded;
@@ -1,4 +0,0 @@
1
- declare const initClient: ({ debug }?: {
2
- debug?: boolean;
3
- }) => void;
4
- export default initClient;
@@ -1,9 +0,0 @@
1
- declare type GetAccessToken = {
2
- force?: boolean;
3
- parameterName: string;
4
- };
5
- /**
6
- * Renew the access token as it expires every 3 hours.
7
- */
8
- declare const getAccessToken: ({ force, parameterName }: GetAccessToken) => Promise<void>;
9
- export default getAccessToken;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take two values, ensure they are numbers and return the sorting value.
3
- */
4
- declare const byNumberAscending: ({ valueA, valueB }: {
5
- valueA: any;
6
- valueB: any;
7
- }) => number;
8
- export default byNumberAscending;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take two values, ensure they are numbers and return the sorting value.
3
- */
4
- declare const byNumberDescending: ({ valueA, valueB }: {
5
- valueA: any;
6
- valueB: any;
7
- }) => number;
8
- export default byNumberDescending;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take two values, clean the strings and return the sorting value.
3
- */
4
- declare const byStringAscending: ({ valueA, valueB }: {
5
- valueA: any;
6
- valueB: any;
7
- }) => number;
8
- export default byStringAscending;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take two values, clean the strings and return the sorting value.
3
- */
4
- declare const byStringDescending: ({ valueA, valueB }: {
5
- valueA: any;
6
- valueB: any;
7
- }) => number;
8
- export default byStringDescending;
@@ -1,9 +0,0 @@
1
- /**
2
- * Convert a string into Capitalised Text.
3
- * https://stackoverflow.com/a/196991/2664955
4
- */
5
- declare const formatCapitalise: ({ input, split }?: {
6
- input: string;
7
- split: string;
8
- }) => string;
9
- export default formatCapitalise;
@@ -1,7 +0,0 @@
1
- /**
2
- * Take an input that may have a / before or after the input and return just the folder.
3
- */
4
- declare const getCleanFolder: ({ input }: {
5
- input: string;
6
- }) => string;
7
- export default getCleanFolder;
@@ -1,7 +0,0 @@
1
- /**
2
- * Convert into string.
3
- */
4
- declare const getString: ({ input }: {
5
- input: any;
6
- }) => string;
7
- export default getString;
@@ -1,8 +0,0 @@
1
- /**
2
- * Converts a stream into a string.
3
- * https://stackoverflow.com/a/49428486
4
- */
5
- declare const getStringFromStream: ({ stream }: {
6
- stream: any;
7
- }) => Promise<string>;
8
- export default getStringFromStream;
@@ -1,7 +0,0 @@
1
- /**
2
- * Return a string "With Proper Casing".
3
- */
4
- declare const toProperCase: ({ input }: {
5
- input: any;
6
- }) => string;
7
- export default toProperCase;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are all SWRs data ready.
3
- */
4
- declare const isAllData: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAllData;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are any of the SWRs marked as an error.
3
- */
4
- declare const isAnyError: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAnyError;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are any of SWRs loading
3
- */
4
- export declare const isAnyLoading: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAnyLoading;
package/swr/isData.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR has an error.
3
- */
4
- declare const isData: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isData;
package/swr/isError.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR has an error.
3
- */
4
- declare const isError: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isError;
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR is loading.
3
- */
4
- declare const isLoading: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isLoading;
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- declare const logTypes: {
2
- DOWN: number;
3
- UP: number;
4
- PAUSED: number;
5
- STARTED: number;
6
- };
7
- export default logTypes;
@@ -1,8 +0,0 @@
1
- declare const monitorStatuses: {
2
- PAUSED: number;
3
- NOT_CHECKED: number;
4
- UP: number;
5
- SEEMS_DOWN: number;
6
- DOWN: number;
7
- };
8
- export default monitorStatuses;
@@ -1,10 +0,0 @@
1
- declare const monitorSubTypes: {
2
- HTTP: number;
3
- HTTPS: number;
4
- FTP: number;
5
- SMTP: number;
6
- POP3: number;
7
- IMAP: number;
8
- CUSTOM_PORT: number;
9
- };
10
- export default monitorSubTypes;
@@ -1,8 +0,0 @@
1
- declare const monitorTypes: {
2
- HTTPS: number;
3
- KEYWORD: number;
4
- PING: number;
5
- PORT: number;
6
- HEARTBEAT: number;
7
- };
8
- export default monitorTypes;
@@ -1,5 +0,0 @@
1
- declare const requestStatuses: {
2
- ERROR: string;
3
- SUCCESS: string;
4
- };
5
- export default requestStatuses;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take an object and return the parameter for a given URL irrespective of path.
3
- */
4
- declare const buildParameters: ({ existing, updated }: {
5
- existing: object;
6
- updated: object;
7
- }) => string;
8
- export default buildParameters;
@@ -1,8 +0,0 @@
1
- /**
2
- * Create a new relative URL based on the current path.
3
- */
4
- declare const buildRelative: ({ router, updated }: {
5
- router: any;
6
- updated: object;
7
- }) => string;
8
- export default buildRelative;
package/url/buildUrl.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { Url } from './url';
2
- declare type BuildUrlType = {
3
- path: string;
4
- url: Url;
5
- };
6
- /**
7
- * Get the current base url.
8
- */
9
- declare const buildUrl: ({ path, url }: BuildUrlType) => string;
10
- export default buildUrl;
@@ -1,7 +0,0 @@
1
- /**
2
- * Does the URL begin with HTTP or HTTPS?
3
- */
4
- declare const isAbsolute: ({ input }: {
5
- input: string;
6
- }) => boolean;
7
- export default isAbsolute;
@@ -1,7 +0,0 @@
1
- /**
2
- * Does the URL begin with a slash.
3
- */
4
- declare const isRelative: ({ input }: {
5
- input: string;
6
- }) => boolean;
7
- export default isRelative;
package/url/url.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export declare type Url = {
2
- localhost: string;
3
- development: string;
4
- staging: string;
5
- production: string;
6
- };
@@ -1,10 +0,0 @@
1
- declare type DefaultTo = {
2
- defaultValue: any;
3
- instance: any;
4
- keys: any | any[];
5
- };
6
- /**
7
- * Function to default to a value, whilst filtering through an instance
8
- */
9
- declare const defaultTo: ({ defaultValue, instance, keys }: DefaultTo) => any;
10
- export default defaultTo;
@@ -1,9 +0,0 @@
1
- declare type IsUndefined = {
2
- instance: any;
3
- keys: any | any[];
4
- };
5
- /**
6
- * Check to see if a value is undefined.
7
- */
8
- declare const isUndefined: ({ instance, keys }: IsUndefined) => boolean;
9
- export default isUndefined;
package/util/sleep.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare const sleep: ({ seconds }: {
2
- seconds: number;
3
- }) => Promise<unknown>;
4
- export default sleep;
@@ -1,7 +0,0 @@
1
- declare const states: {
2
- ERROR: string;
3
- SUCCESS: string;
4
- PROGRESS: string;
5
- };
6
- export declare type State = typeof states.SUCCESS | typeof states.ERROR | typeof states.PROGRESS;
7
- export default states;
package/xml/getXml.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare const getXml: ({ url }: {
2
- url: any;
3
- }) => Promise<string>;
4
- export default getXml;