@8ms/helpers 2.3.5 → 2.3.6

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 (597) hide show
  1. package/.github/workflows/deploy_npmjs.yml +0 -3
  2. package/.yarn/install-state.gz +0 -0
  3. package/dist/_class/index.d.mts +2 -0
  4. package/dist/_class/index.mjs +62 -0
  5. package/dist/adverity/index.d.mts +2 -0
  6. package/dist/adverity/index.mjs +64 -0
  7. package/{adverity/server/getJobs.d.ts → dist/adverity/server/index.d.mts} +11 -8
  8. package/dist/adverity/server/index.mjs +25 -0
  9. package/dist/api/index.d.mts +2 -0
  10. package/dist/api/index.mjs +3 -0
  11. package/dist/api-DGKJDAfb.mjs +139 -0
  12. package/dist/array/index.d.mts +11 -0
  13. package/dist/array/index.mjs +14 -0
  14. package/dist/atInternet/index.d.mts +20 -0
  15. package/dist/atInternet/index.mjs +18 -0
  16. package/dist/aws/ec2/server/index.d.mts +18 -0
  17. package/dist/aws/ec2/server/index.mjs +48 -0
  18. package/dist/aws/ecs/server/index.d.mts +59 -0
  19. package/dist/aws/ecs/server/index.mjs +113 -0
  20. package/dist/aws/glue/server/index.d.mts +19 -0
  21. package/dist/aws/glue/server/index.mjs +36 -0
  22. package/dist/aws/lambda/server/index.d.mts +28 -0
  23. package/dist/aws/lambda/server/index.mjs +57 -0
  24. package/dist/aws/s3/server/index.d.mts +124 -0
  25. package/dist/aws/s3/server/index.mjs +361 -0
  26. package/dist/aws/server/index.d.mts +2 -0
  27. package/dist/aws/server/index.mjs +3 -0
  28. package/dist/aws/ses/server/index.d.mts +105 -0
  29. package/dist/aws/ses/server/index.mjs +269 -0
  30. package/dist/aws/sqs/server/index.d.mts +41 -0
  31. package/dist/aws/sqs/server/index.mjs +56 -0
  32. package/dist/aws/ssm/server/index.d.mts +18 -0
  33. package/dist/aws/ssm/server/index.mjs +47 -0
  34. package/dist/axios/index.d.mts +22 -0
  35. package/dist/axios/index.mjs +50 -0
  36. package/dist/boolean/index.d.mts +7 -0
  37. package/dist/boolean/index.mjs +15 -0
  38. package/dist/brightData/serpApi/server/index.d.mts +93 -0
  39. package/dist/brightData/serpApi/server/index.mjs +229 -0
  40. package/dist/brightData/server/index.d.mts +2 -0
  41. package/dist/brightData/server/index.mjs +18 -0
  42. package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
  43. package/dist/brightData/webScraperIde/server/index.mjs +50 -0
  44. package/dist/cache/server/index.d.mts +10 -0
  45. package/dist/cache/server/index.mjs +31 -0
  46. package/dist/chunk-CgI6uo-e.mjs +32 -0
  47. package/dist/crud/index.d.mts +10 -0
  48. package/dist/crud/index.mjs +10 -0
  49. package/dist/crypto/index.d.mts +28 -0
  50. package/dist/crypto/index.mjs +47 -0
  51. package/dist/date/index.d.mts +2 -0
  52. package/dist/date/index.mjs +471 -0
  53. package/dist/environment/index.d.mts +37 -0
  54. package/dist/environment/index.mjs +60 -0
  55. package/dist/eskimi/index.d.mts +52 -0
  56. package/dist/eskimi/index.mjs +90 -0
  57. package/dist/eskimi/server/index.d.mts +25 -0
  58. package/dist/eskimi/server/index.mjs +50 -0
  59. package/dist/file/index.d.mts +7 -0
  60. package/dist/file/index.mjs +20 -0
  61. package/dist/file/server/index.d.mts +8 -0
  62. package/dist/file/server/index.mjs +16 -0
  63. package/dist/from-9s4TjsYv.mjs +3878 -0
  64. package/dist/geo/index.d.mts +26 -0
  65. package/dist/geo/index.mjs +1591 -0
  66. package/dist/getDecimal-CafxtLhH.mjs +40 -0
  67. package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
  68. package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
  69. package/dist/googleAds/server/index.d.mts +27 -0
  70. package/dist/googleAds/server/index.mjs +48 -0
  71. package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
  72. package/dist/googleCloud/bigquery/server/index.mjs +127 -0
  73. package/dist/googleCloud/server/index.d.mts +2 -0
  74. package/dist/googleCloud/server/index.mjs +24 -0
  75. package/dist/googleCloud/sheets/server/index.d.mts +22 -0
  76. package/dist/googleCloud/sheets/server/index.mjs +31 -0
  77. package/dist/googleCloud/storage/server/index.d.mts +31 -0
  78. package/dist/googleCloud/storage/server/index.mjs +79 -0
  79. package/dist/googlePageSpeed/server/index.d.mts +34 -0
  80. package/dist/googlePageSpeed/server/index.mjs +53 -0
  81. package/dist/googleSearchIncidents/server/index.d.mts +73 -0
  82. package/dist/googleSearchIncidents/server/index.mjs +55 -0
  83. package/dist/greenDomain/server/index.d.mts +25 -0
  84. package/dist/greenDomain/server/index.mjs +31 -0
  85. package/dist/index-B20FTOvk.d.mts +67 -0
  86. package/dist/index-B4K9Z1U-.d.mts +17 -0
  87. package/dist/index-CFaAdPAh.d.mts +32 -0
  88. package/dist/index-CIG08fpw.d.mts +32 -0
  89. package/dist/index-CMfxuwL1.d.mts +246 -0
  90. package/dist/index-DEm1Wodf.d.mts +116 -0
  91. package/dist/index-sfVt7tI_.d.mts +18 -0
  92. package/dist/inngest/index.d.mts +10 -0
  93. package/dist/inngest/index.mjs +10 -0
  94. package/dist/json/index.d.mts +7 -0
  95. package/dist/json/index.mjs +27 -0
  96. package/dist/littleWarden/server/index.d.mts +56 -0
  97. package/dist/littleWarden/server/index.mjs +79 -0
  98. package/dist/lumar/api/server/index.d.mts +66 -0
  99. package/dist/lumar/api/server/index.mjs +111 -0
  100. package/dist/lumar/graphql/server/index.d.mts +308 -0
  101. package/dist/lumar/graphql/server/index.mjs +172 -0
  102. package/dist/multipart-parser-BC14QSvI.mjs +290 -0
  103. package/dist/myTarget/server/index.d.mts +9 -0
  104. package/dist/myTarget/server/index.mjs +16 -0
  105. package/dist/nextAuth/index.d.mts +12 -0
  106. package/dist/nextAuth/index.mjs +15 -0
  107. package/dist/nextJs/index.d.mts +19 -0
  108. package/dist/nextJs/index.mjs +12 -0
  109. package/dist/number/index.d.mts +54 -0
  110. package/dist/number/index.mjs +75 -0
  111. package/{object/replaceKeys.d.ts → dist/object/index.d.mts} +4 -1
  112. package/dist/object/index.mjs +22 -0
  113. package/dist/onePassword/server/index.d.mts +24 -0
  114. package/dist/onePassword/server/index.mjs +50 -0
  115. package/dist/openAi/server/index.d.mts +20 -0
  116. package/dist/openAi/server/index.mjs +46 -0
  117. package/dist/prisma/index.d.mts +7 -0
  118. package/dist/prisma/index.mjs +16 -0
  119. package/dist/prisma/server/index.d.mts +31 -0
  120. package/dist/prisma/server/index.mjs +72 -0
  121. package/dist/server-Bwy4JI8Z.mjs +33 -0
  122. package/dist/snapchat/server/index.d.mts +25 -0
  123. package/dist/snapchat/server/index.mjs +39 -0
  124. package/dist/sorting/index.d.mts +25 -0
  125. package/dist/sorting/index.mjs +50 -0
  126. package/dist/src-BeXFXTgz.mjs +1272 -0
  127. package/dist/stream/server/index.d.mts +15 -0
  128. package/dist/stream/server/index.mjs +48 -0
  129. package/dist/string/index.d.mts +107 -0
  130. package/dist/string/index.mjs +191 -0
  131. package/dist/swr/client/index.d.mts +46 -0
  132. package/dist/swr/client/index.mjs +40 -0
  133. package/dist/upTimeRobot/server/index.d.mts +72 -0
  134. package/dist/upTimeRobot/server/index.mjs +83 -0
  135. package/dist/url/index.d.mts +29 -0
  136. package/dist/url/index.mjs +52 -0
  137. package/dist/url/server/index.d.mts +9 -0
  138. package/dist/url/server/index.mjs +35 -0
  139. package/dist/util/index.d.mts +47 -0
  140. package/dist/util/index.mjs +99 -0
  141. package/dist/util/server/index.d.mts +27 -0
  142. package/dist/util/server/index.mjs +61 -0
  143. package/dist/webWorker/index.d.mts +11 -0
  144. package/dist/webWorker/index.mjs +11 -0
  145. package/dist/xml/server/index.d.mts +4 -0
  146. package/dist/xml/server/index.mjs +17 -0
  147. package/package.json +70 -1066
  148. package/tsdown.config.ts +10 -0
  149. package/.github/generate-exports.js +0 -111
  150. package/_class/BaseClass.d.ts +0 -18
  151. package/_class/BaseClass.js +0 -44
  152. package/_class/BaseNamespace.d.ts +0 -9
  153. package/_class/BaseNamespace.js +0 -24
  154. package/_class/index.d.ts +0 -2
  155. package/_class/index.js +0 -2
  156. package/adverity/adverity.d.ts +0 -112
  157. package/adverity/adverity.js +0 -58
  158. package/adverity/index.d.ts +0 -1
  159. package/adverity/index.js +0 -1
  160. package/adverity/server/getJobs.js +0 -26
  161. package/adverity/server/index.d.ts +0 -1
  162. package/adverity/server/index.js +0 -1
  163. package/api/ApiResponseClass.d.ts +0 -35
  164. package/api/ApiResponseClass.js +0 -93
  165. package/api/api.d.ts +0 -17
  166. package/api/api.js +0 -15
  167. package/api/functions.d.ts +0 -7
  168. package/api/functions.js +0 -19
  169. package/api/index.d.ts +0 -3
  170. package/api/index.js +0 -3
  171. package/array/array.d.ts +0 -8
  172. package/array/array.js +0 -9
  173. package/array/index.d.ts +0 -1
  174. package/array/index.js +0 -1
  175. package/atInternet/atInternet.d.ts +0 -16
  176. package/atInternet/atInternet.js +0 -15
  177. package/atInternet/index.d.ts +0 -1
  178. package/atInternet/index.js +0 -1
  179. package/aws/ec2/server/AwsEc2Namespace.d.ts +0 -10
  180. package/aws/ec2/server/AwsEc2Namespace.js +0 -37
  181. package/aws/ec2/server/awsEc2.d.ts +0 -3
  182. package/aws/ec2/server/awsEc2.js +0 -12
  183. package/aws/ec2/server/index.d.ts +0 -2
  184. package/aws/ec2/server/index.js +0 -2
  185. package/aws/ecs/server/AwsEcsNamespace.d.ts +0 -53
  186. package/aws/ecs/server/AwsEcsNamespace.js +0 -118
  187. package/aws/ecs/server/awsEcs.d.ts +0 -3
  188. package/aws/ecs/server/awsEcs.js +0 -12
  189. package/aws/ecs/server/index.d.ts +0 -2
  190. package/aws/ecs/server/index.js +0 -2
  191. package/aws/glue/server/AwsGlueNamespace.d.ts +0 -12
  192. package/aws/glue/server/AwsGlueNamespace.js +0 -29
  193. package/aws/glue/server/awsGlue.d.ts +0 -3
  194. package/aws/glue/server/awsGlue.js +0 -12
  195. package/aws/glue/server/index.d.ts +0 -2
  196. package/aws/glue/server/index.js +0 -2
  197. package/aws/lambda/server/AwsLambdaNamespace.d.ts +0 -21
  198. package/aws/lambda/server/AwsLambdaNamespace.js +0 -69
  199. package/aws/lambda/server/awsLambda.d.ts +0 -4
  200. package/aws/lambda/server/awsLambda.js +0 -16
  201. package/aws/lambda/server/index.d.ts +0 -2
  202. package/aws/lambda/server/index.js +0 -2
  203. package/aws/s3/server/AwsS3Namespace.d.ts +0 -65
  204. package/aws/s3/server/AwsS3Namespace.js +0 -364
  205. package/aws/s3/server/awsS3.d.ts +0 -13
  206. package/aws/s3/server/awsS3.js +0 -20
  207. package/aws/s3/server/index.d.ts +0 -3
  208. package/aws/s3/server/index.js +0 -3
  209. package/aws/s3/server/payload.d.ts +0 -42
  210. package/aws/s3/server/payload.js +0 -43
  211. package/aws/server/aws.d.ts +0 -9
  212. package/aws/server/aws.js +0 -29
  213. package/aws/server/index.d.ts +0 -2
  214. package/aws/server/index.js +0 -2
  215. package/aws/server/isResponse200.d.ts +0 -4
  216. package/aws/server/isResponse200.js +0 -12
  217. package/aws/ses/server/AwsSesNamespace.d.ts +0 -9
  218. package/aws/ses/server/AwsSesNamespace.js +0 -41
  219. package/aws/ses/server/SimpleEmail.d.ts +0 -81
  220. package/aws/ses/server/SimpleEmail.js +0 -296
  221. package/aws/ses/server/awsSes.d.ts +0 -4
  222. package/aws/ses/server/awsSes.js +0 -13
  223. package/aws/ses/server/index.d.ts +0 -3
  224. package/aws/ses/server/index.js +0 -3
  225. package/aws/sqs/server/AwsSqsNamespace.d.ts +0 -34
  226. package/aws/sqs/server/AwsSqsNamespace.js +0 -55
  227. package/aws/sqs/server/awsSqs.d.ts +0 -3
  228. package/aws/sqs/server/awsSqs.js +0 -12
  229. package/aws/sqs/server/index.d.ts +0 -2
  230. package/aws/sqs/server/index.js +0 -2
  231. package/aws/ssm/server/AwsSsmNamespace.d.ts +0 -11
  232. package/aws/ssm/server/AwsSsmNamespace.js +0 -52
  233. package/aws/ssm/server/awsSsm.d.ts +0 -3
  234. package/aws/ssm/server/awsSsm.js +0 -12
  235. package/aws/ssm/server/index.d.ts +0 -2
  236. package/aws/ssm/server/index.js +0 -2
  237. package/axios/deleteRequest.d.ts +0 -6
  238. package/axios/deleteRequest.js +0 -26
  239. package/axios/get.d.ts +0 -5
  240. package/axios/get.js +0 -24
  241. package/axios/index.d.ts +0 -3
  242. package/axios/index.js +0 -3
  243. package/axios/post.d.ts +0 -5
  244. package/axios/post.js +0 -25
  245. package/boolean/boolean.d.ts +0 -4
  246. package/boolean/boolean.js +0 -16
  247. package/boolean/index.d.ts +0 -1
  248. package/boolean/index.js +0 -1
  249. package/brightData/serpApi/server/brightDataSerpApi.d.ts +0 -10
  250. package/brightData/serpApi/server/brightDataSerpApi.js +0 -9
  251. package/brightData/serpApi/server/buildGoogleSerpUrl.d.ts +0 -32
  252. package/brightData/serpApi/server/buildGoogleSerpUrl.js +0 -112
  253. package/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts +0 -22
  254. package/brightData/serpApi/server/buildGoogleTrendsUrl.js +0 -57
  255. package/brightData/serpApi/server/getAsyncRequestId.d.ts +0 -8
  256. package/brightData/serpApi/server/getAsyncRequestId.js +0 -32
  257. package/brightData/serpApi/server/getAsyncResults.d.ts +0 -7
  258. package/brightData/serpApi/server/getAsyncResults.js +0 -31
  259. package/brightData/serpApi/server/getRealtime.d.ts +0 -5
  260. package/brightData/serpApi/server/getRealtime.js +0 -26
  261. package/brightData/serpApi/server/index.d.ts +0 -6
  262. package/brightData/serpApi/server/index.js +0 -6
  263. package/brightData/server/brightData.d.ts +0 -15
  264. package/brightData/server/brightData.js +0 -15
  265. package/brightData/server/index.d.ts +0 -1
  266. package/brightData/server/index.js +0 -1
  267. package/brightData/webScraperIde/server/getBatch.d.ts +0 -7
  268. package/brightData/webScraperIde/server/getBatch.js +0 -24
  269. package/brightData/webScraperIde/server/getRealtime.d.ts +0 -7
  270. package/brightData/webScraperIde/server/getRealtime.js +0 -45
  271. package/brightData/webScraperIde/server/index.d.ts +0 -2
  272. package/brightData/webScraperIde/server/index.js +0 -2
  273. package/cache/server/cache.d.ts +0 -7
  274. package/cache/server/cache.js +0 -43
  275. package/cache/server/index.d.ts +0 -1
  276. package/cache/server/index.js +0 -1
  277. package/cache/server/test/cache.test.d.ts +0 -1
  278. package/cache/server/test/cache.test.js +0 -8
  279. package/crud/crud.d.ts +0 -7
  280. package/crud/crud.js +0 -6
  281. package/crud/index.d.ts +0 -1
  282. package/crud/index.js +0 -1
  283. package/crypto/getDecrypt.d.ts +0 -5
  284. package/crypto/getDecrypt.js +0 -10
  285. package/crypto/getEncrypt.d.ts +0 -5
  286. package/crypto/getEncrypt.js +0 -10
  287. package/crypto/getRandom.d.ts +0 -4
  288. package/crypto/getRandom.js +0 -8
  289. package/crypto/getSha256.d.ts +0 -5
  290. package/crypto/getSha256.js +0 -11
  291. package/crypto/index.d.ts +0 -4
  292. package/crypto/index.js +0 -4
  293. package/date/calculation.d.ts +0 -102
  294. package/date/calculation.js +0 -272
  295. package/date/date.d.ts +0 -36
  296. package/date/date.js +0 -20
  297. package/date/financialYear.d.ts +0 -19
  298. package/date/financialYear.js +0 -78
  299. package/date/format.d.ts +0 -85
  300. package/date/format.js +0 -160
  301. package/date/index.d.ts +0 -4
  302. package/date/index.js +0 -4
  303. package/environment/environment.d.ts +0 -34
  304. package/environment/environment.js +0 -79
  305. package/environment/index.d.ts +0 -1
  306. package/environment/index.js +0 -1
  307. package/eskimi/eskimi.d.ts +0 -49
  308. package/eskimi/eskimi.js +0 -93
  309. package/eskimi/index.d.ts +0 -1
  310. package/eskimi/index.js +0 -1
  311. package/eskimi/server/getAgeGroup.d.ts +0 -4
  312. package/eskimi/server/getAgeGroup.js +0 -11
  313. package/eskimi/server/getData.d.ts +0 -4
  314. package/eskimi/server/getData.js +0 -13
  315. package/eskimi/server/getDevice.d.ts +0 -4
  316. package/eskimi/server/getDevice.js +0 -11
  317. package/eskimi/server/getGender.d.ts +0 -4
  318. package/eskimi/server/getGender.js +0 -11
  319. package/eskimi/server/index.d.ts +0 -4
  320. package/eskimi/server/index.js +0 -4
  321. package/file/getFileKey.d.ts +0 -4
  322. package/file/getFileKey.js +0 -23
  323. package/file/index.d.ts +0 -1
  324. package/file/index.js +0 -1
  325. package/file/server/createDirectory.d.ts +0 -5
  326. package/file/server/createDirectory.js +0 -13
  327. package/file/server/index.d.ts +0 -1
  328. package/file/server/index.js +0 -1
  329. package/geo/countries.d.ts +0 -12
  330. package/geo/countries.js +0 -219
  331. package/geo/index.d.ts +0 -2
  332. package/geo/index.js +0 -2
  333. package/geo/languages.d.ts +0 -9
  334. package/geo/languages.js +0 -55
  335. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +0 -41
  336. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +0 -55
  337. package/googleAds/keywordPlanner/server/index.d.ts +0 -1
  338. package/googleAds/keywordPlanner/server/index.js +0 -1
  339. package/googleAds/server/GoogleAdsNamespace.d.ts +0 -11
  340. package/googleAds/server/GoogleAdsNamespace.js +0 -30
  341. package/googleAds/server/googleAds.d.ts +0 -11
  342. package/googleAds/server/googleAds.js +0 -26
  343. package/googleAds/server/index.d.ts +0 -2
  344. package/googleAds/server/index.js +0 -2
  345. package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts +0 -50
  346. package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js +0 -115
  347. package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +0 -5
  348. package/googleCloud/bigquery/server/googleCloudBigquery.js +0 -41
  349. package/googleCloud/bigquery/server/index.d.ts +0 -3
  350. package/googleCloud/bigquery/server/index.js +0 -3
  351. package/googleCloud/bigquery/server/loadData.d.ts +0 -19
  352. package/googleCloud/bigquery/server/loadData.js +0 -14
  353. package/googleCloud/server/googleCloud.d.ts +0 -29
  354. package/googleCloud/server/googleCloud.js +0 -25
  355. package/googleCloud/server/index.d.ts +0 -1
  356. package/googleCloud/server/index.js +0 -1
  357. package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts +0 -18
  358. package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.js +0 -37
  359. package/googleCloud/sheets/server/getAssociatedData.d.ts +0 -10
  360. package/googleCloud/sheets/server/getAssociatedData.js +0 -39
  361. package/googleCloud/sheets/server/index.d.ts +0 -1
  362. package/googleCloud/sheets/server/index.js +0 -1
  363. package/googleCloud/storage/server/GoogleCloudStorageNamespace.d.ts +0 -22
  364. package/googleCloud/storage/server/GoogleCloudStorageNamespace.js +0 -66
  365. package/googleCloud/storage/server/googleCloudStorage.d.ts +0 -3
  366. package/googleCloud/storage/server/googleCloudStorage.js +0 -37
  367. package/googleCloud/storage/server/index.d.ts +0 -2
  368. package/googleCloud/storage/server/index.js +0 -2
  369. package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +0 -11
  370. package/googlePageSpeed/server/GooglePageSpeedNamespace.js +0 -27
  371. package/googlePageSpeed/server/googlePageSpeed.d.ts +0 -19
  372. package/googlePageSpeed/server/googlePageSpeed.js +0 -38
  373. package/googlePageSpeed/server/index.d.ts +0 -2
  374. package/googlePageSpeed/server/index.js +0 -2
  375. package/googleSearchIncidents/server/googleSearchIncidents.d.ts +0 -69
  376. package/googleSearchIncidents/server/googleSearchIncidents.js +0 -42
  377. package/googleSearchIncidents/server/index.d.ts +0 -1
  378. package/googleSearchIncidents/server/index.js +0 -1
  379. package/greenDomain/server/greenDomain.d.ts +0 -21
  380. package/greenDomain/server/greenDomain.js +0 -37
  381. package/greenDomain/server/index.d.ts +0 -1
  382. package/greenDomain/server/index.js +0 -1
  383. package/inngest/index.d.ts +0 -1
  384. package/inngest/index.js +0 -1
  385. package/inngest/inngest.d.ts +0 -7
  386. package/inngest/inngest.js +0 -6
  387. package/json/getJsonNewline.d.ts +0 -1
  388. package/json/getJsonNewline.js +0 -9
  389. package/json/index.d.ts +0 -2
  390. package/json/index.js +0 -2
  391. package/json/isJson.d.ts +0 -1
  392. package/json/isJson.js +0 -22
  393. package/littleWarden/server/LittleWardenNamespace.d.ts +0 -11
  394. package/littleWarden/server/LittleWardenNamespace.js +0 -30
  395. package/littleWarden/server/getUrlStatus.d.ts +0 -4
  396. package/littleWarden/server/getUrlStatus.js +0 -12
  397. package/littleWarden/server/index.d.ts +0 -2
  398. package/littleWarden/server/index.js +0 -2
  399. package/littleWarden/server/littleWarden.d.ts +0 -30
  400. package/littleWarden/server/littleWarden.js +0 -65
  401. package/lumar/api/server/buildRequest.d.ts +0 -13
  402. package/lumar/api/server/buildRequest.js +0 -76
  403. package/lumar/api/server/getData.d.ts +0 -1
  404. package/lumar/api/server/getData.js +0 -9
  405. package/lumar/api/server/index.d.ts +0 -4
  406. package/lumar/api/server/index.js +0 -4
  407. package/lumar/api/server/initClient.d.ts +0 -6
  408. package/lumar/api/server/initClient.js +0 -22
  409. package/lumar/api/server/lumarApi.d.ts +0 -36
  410. package/lumar/api/server/lumarApi.js +0 -24
  411. package/lumar/graphql/server/columns.d.ts +0 -29
  412. package/lumar/graphql/server/columns.js +0 -28
  413. package/lumar/graphql/server/getData.d.ts +0 -1
  414. package/lumar/graphql/server/getData.js +0 -15
  415. package/lumar/graphql/server/index.d.ts +0 -11
  416. package/lumar/graphql/server/index.js +0 -11
  417. package/lumar/graphql/server/initClient.d.ts +0 -5
  418. package/lumar/graphql/server/initClient.js +0 -21
  419. package/lumar/graphql/server/lumarGraphql.d.ts +0 -27
  420. package/lumar/graphql/server/lumarGraphql.js +0 -27
  421. package/lumar/graphql/server/queries/crawl.d.ts +0 -5
  422. package/lumar/graphql/server/queries/crawl.js +0 -1
  423. package/lumar/graphql/server/queries/getCrawls.d.ts +0 -18
  424. package/lumar/graphql/server/queries/getCrawls.js +0 -31
  425. package/lumar/graphql/server/queries/getReportDifferences.d.ts +0 -24
  426. package/lumar/graphql/server/queries/getReportDifferences.js +0 -35
  427. package/lumar/graphql/server/queries/getRows.d.ts +0 -38
  428. package/lumar/graphql/server/queries/getRows.js +0 -55
  429. package/lumar/graphql/server/queries/getTotals.d.ts +0 -25
  430. package/lumar/graphql/server/queries/getTotals.js +0 -38
  431. package/lumar/graphql/server/queries/row.d.ts +0 -157
  432. package/lumar/graphql/server/queries/row.js +0 -1
  433. package/lumar/graphql/server/reportTemplates.d.ts +0 -68
  434. package/lumar/graphql/server/reportTemplates.js +0 -67
  435. package/myTarget/server/index.d.ts +0 -1
  436. package/myTarget/server/index.js +0 -1
  437. package/myTarget/server/myTarget.d.ts +0 -5
  438. package/myTarget/server/myTarget.js +0 -13
  439. package/nextAuth/index.d.ts +0 -2
  440. package/nextAuth/index.js +0 -2
  441. package/nextAuth/isSessionReady.d.ts +0 -1
  442. package/nextAuth/isSessionReady.js +0 -3
  443. package/nextAuth/nextAuth.d.ts +0 -7
  444. package/nextAuth/nextAuth.js +0 -6
  445. package/nextJs/client/LazyLoad.d.ts +0 -8
  446. package/nextJs/client/LazyLoad.js +0 -7
  447. package/nextJs/client/index.d.ts +0 -1
  448. package/nextJs/client/index.js +0 -1
  449. package/nextJs/index.d.ts +0 -1
  450. package/nextJs/index.js +0 -1
  451. package/nextJs/nextJs.d.ts +0 -12
  452. package/nextJs/nextJs.js +0 -8
  453. package/number/format.d.ts +0 -12
  454. package/number/format.js +0 -16
  455. package/number/formatCurrency.d.ts +0 -5
  456. package/number/formatCurrency.js +0 -17
  457. package/number/getDecimal.d.ts +0 -4
  458. package/number/getDecimal.js +0 -8
  459. package/number/getNumber.d.ts +0 -4
  460. package/number/getNumber.js +0 -44
  461. package/number/getPercent.d.ts +0 -1
  462. package/number/getPercent.js +0 -11
  463. package/number/getPercentIncrease.d.ts +0 -4
  464. package/number/getPercentIncrease.js +0 -12
  465. package/number/getSafeDivide.d.ts +0 -11
  466. package/number/getSafeDivide.js +0 -16
  467. package/number/index.d.ts +0 -7
  468. package/number/index.js +0 -7
  469. package/object/index.d.ts +0 -1
  470. package/object/index.js +0 -1
  471. package/object/replaceKeys.js +0 -21
  472. package/onePassword/server/OnePasswordNamespace.d.ts +0 -12
  473. package/onePassword/server/OnePasswordNamespace.js +0 -39
  474. package/onePassword/server/index.d.ts +0 -2
  475. package/onePassword/server/index.js +0 -2
  476. package/onePassword/server/onePassword.d.ts +0 -8
  477. package/onePassword/server/onePassword.js +0 -21
  478. package/openAi/server/OpenAiNamespace.d.ts +0 -11
  479. package/openAi/server/OpenAiNamespace.js +0 -35
  480. package/openAi/server/index.d.ts +0 -2
  481. package/openAi/server/index.js +0 -2
  482. package/openAi/server/openAi.d.ts +0 -6
  483. package/openAi/server/openAi.js +0 -26
  484. package/prisma/getDecimal.d.ts +0 -4
  485. package/prisma/getDecimal.js +0 -16
  486. package/prisma/index.d.ts +0 -1
  487. package/prisma/index.js +0 -1
  488. package/prisma/server/PrismaNamespace.d.ts +0 -7
  489. package/prisma/server/PrismaNamespace.js +0 -62
  490. package/prisma/server/index.d.ts +0 -2
  491. package/prisma/server/index.js +0 -2
  492. package/prisma/server/prisma.d.ts +0 -20
  493. package/prisma/server/prisma.js +0 -26
  494. package/snapchat/server/SnapchatNamespace.d.ts +0 -15
  495. package/snapchat/server/SnapchatNamespace.js +0 -22
  496. package/snapchat/server/index.d.ts +0 -2
  497. package/snapchat/server/index.js +0 -2
  498. package/snapchat/server/snapchat.d.ts +0 -7
  499. package/snapchat/server/snapchat.js +0 -26
  500. package/sorting/byNumberAscending.d.ts +0 -4
  501. package/sorting/byNumberAscending.js +0 -15
  502. package/sorting/byNumberDescending.d.ts +0 -4
  503. package/sorting/byNumberDescending.js +0 -18
  504. package/sorting/byStringAscending.d.ts +0 -4
  505. package/sorting/byStringAscending.js +0 -12
  506. package/sorting/byStringDescending.d.ts +0 -4
  507. package/sorting/byStringDescending.js +0 -12
  508. package/sorting/index.d.ts +0 -1
  509. package/sorting/index.js +0 -1
  510. package/sorting/sorting.d.ts +0 -4
  511. package/sorting/sorting.js +0 -4
  512. package/stream/server/index.d.ts +0 -1
  513. package/stream/server/index.js +0 -1
  514. package/stream/server/sort.d.ts +0 -13
  515. package/stream/server/sort.js +0 -47
  516. package/string/getCapitalised.d.ts +0 -5
  517. package/string/getCapitalised.js +0 -21
  518. package/string/getClean.d.ts +0 -18
  519. package/string/getClean.js +0 -47
  520. package/string/getFolder.d.ts +0 -4
  521. package/string/getFolder.js +0 -8
  522. package/string/getProperCase.d.ts +0 -11
  523. package/string/getProperCase.js +0 -43
  524. package/string/getString.d.ts +0 -4
  525. package/string/getString.js +0 -27
  526. package/string/getStringFromStream.d.ts +0 -5
  527. package/string/getStringFromStream.js +0 -13
  528. package/string/getUnescaped.d.ts +0 -6
  529. package/string/getUnescaped.js +0 -19
  530. package/string/getWithoutAccents.d.ts +0 -5
  531. package/string/getWithoutAccents.js +0 -9
  532. package/string/getWithoutHtmlTags.d.ts +0 -5
  533. package/string/getWithoutHtmlTags.js +0 -8
  534. package/string/getWithoutPunctuation.d.ts +0 -5
  535. package/string/getWithoutPunctuation.js +0 -9
  536. package/string/getWithoutUnderscores.d.ts +0 -4
  537. package/string/getWithoutUnderscores.js +0 -7
  538. package/string/getWithoutWhitespaces.d.ts +0 -5
  539. package/string/getWithoutWhitespaces.js +0 -9
  540. package/string/index.d.ts +0 -13
  541. package/string/index.js +0 -13
  542. package/string/reservedWords.d.ts +0 -5
  543. package/string/reservedWords.js +0 -22
  544. package/swr/client/index.d.ts +0 -1
  545. package/swr/client/index.js +0 -1
  546. package/swr/client/swr.d.ts +0 -42
  547. package/swr/client/swr.js +0 -50
  548. package/upTimeRobot/server/UpTimeRobotNamespace.d.ts +0 -31
  549. package/upTimeRobot/server/UpTimeRobotNamespace.js +0 -40
  550. package/upTimeRobot/server/index.d.ts +0 -2
  551. package/upTimeRobot/server/index.js +0 -2
  552. package/upTimeRobot/server/upTimeRobot.d.ts +0 -38
  553. package/upTimeRobot/server/upTimeRobot.js +0 -59
  554. package/url/index.d.ts +0 -1
  555. package/url/index.js +0 -1
  556. package/url/server/index.d.ts +0 -1
  557. package/url/server/index.js +0 -1
  558. package/url/server/writeUrlContents.d.ts +0 -6
  559. package/url/server/writeUrlContents.js +0 -35
  560. package/url/url.d.ts +0 -26
  561. package/url/url.js +0 -59
  562. package/util/defaultTo.d.ts +0 -4
  563. package/util/defaultTo.js +0 -37
  564. package/util/getClean.d.ts +0 -11
  565. package/util/getClean.js +0 -19
  566. package/util/getError.d.ts +0 -1
  567. package/util/getError.js +0 -10
  568. package/util/getWithoutHash.d.ts +0 -4
  569. package/util/getWithoutHash.js +0 -14
  570. package/util/getWithoutParameter.d.ts +0 -4
  571. package/util/getWithoutParameter.js +0 -14
  572. package/util/index.d.ts +0 -7
  573. package/util/index.js +0 -7
  574. package/util/isUndefined.d.ts +0 -4
  575. package/util/isUndefined.js +0 -9
  576. package/util/promiseChunks.d.ts +0 -5
  577. package/util/promiseChunks.js +0 -21
  578. package/util/server/getBrotliCompressed.d.ts +0 -5
  579. package/util/server/getBrotliCompressed.js +0 -16
  580. package/util/server/getBrotliDecompressed.d.ts +0 -5
  581. package/util/server/getBrotliDecompressed.js +0 -17
  582. package/util/server/getGzipCompressed.d.ts +0 -5
  583. package/util/server/getGzipCompressed.js +0 -16
  584. package/util/server/getGzipDecompressed.d.ts +0 -5
  585. package/util/server/getGzipDecompressed.js +0 -17
  586. package/util/server/index.d.ts +0 -4
  587. package/util/server/index.js +0 -4
  588. package/util/sleep.d.ts +0 -1
  589. package/util/sleep.js +0 -3
  590. package/webWorker/index.d.ts +0 -1
  591. package/webWorker/index.js +0 -1
  592. package/webWorker/webWorker.d.ts +0 -8
  593. package/webWorker/webWorker.js +0 -7
  594. package/xml/server/getXml.d.ts +0 -1
  595. package/xml/server/getXml.js +0 -14
  596. package/xml/server/index.d.ts +0 -1
  597. package/xml/server/index.js +0 -1
@@ -0,0 +1,290 @@
1
+ import { r as File, t as FormData } from "./from-9s4TjsYv.mjs";
2
+
3
+ //#region node_modules/node-fetch/src/utils/multipart-parser.js
4
+ let s = 0;
5
+ const S = {
6
+ START_BOUNDARY: s++,
7
+ HEADER_FIELD_START: s++,
8
+ HEADER_FIELD: s++,
9
+ HEADER_VALUE_START: s++,
10
+ HEADER_VALUE: s++,
11
+ HEADER_VALUE_ALMOST_DONE: s++,
12
+ HEADERS_ALMOST_DONE: s++,
13
+ PART_DATA_START: s++,
14
+ PART_DATA: s++,
15
+ END: s++
16
+ };
17
+ let f = 1;
18
+ const F = {
19
+ PART_BOUNDARY: f,
20
+ LAST_BOUNDARY: f *= 2
21
+ };
22
+ const LF = 10;
23
+ const CR = 13;
24
+ const SPACE = 32;
25
+ const HYPHEN = 45;
26
+ const COLON = 58;
27
+ const A = 97;
28
+ const Z = 122;
29
+ const lower = (c) => c | 32;
30
+ const noop = () => {};
31
+ var MultipartParser = class {
32
+ /**
33
+ * @param {string} boundary
34
+ */
35
+ constructor(boundary) {
36
+ this.index = 0;
37
+ this.flags = 0;
38
+ this.onHeaderEnd = noop;
39
+ this.onHeaderField = noop;
40
+ this.onHeadersEnd = noop;
41
+ this.onHeaderValue = noop;
42
+ this.onPartBegin = noop;
43
+ this.onPartData = noop;
44
+ this.onPartEnd = noop;
45
+ this.boundaryChars = {};
46
+ boundary = "\r\n--" + boundary;
47
+ const ui8a = new Uint8Array(boundary.length);
48
+ for (let i = 0; i < boundary.length; i++) {
49
+ ui8a[i] = boundary.charCodeAt(i);
50
+ this.boundaryChars[ui8a[i]] = true;
51
+ }
52
+ this.boundary = ui8a;
53
+ this.lookbehind = new Uint8Array(this.boundary.length + 8);
54
+ this.state = S.START_BOUNDARY;
55
+ }
56
+ /**
57
+ * @param {Uint8Array} data
58
+ */
59
+ write(data) {
60
+ let i = 0;
61
+ const length_ = data.length;
62
+ let previousIndex = this.index;
63
+ let { lookbehind, boundary, boundaryChars, index, state, flags } = this;
64
+ const boundaryLength = this.boundary.length;
65
+ const boundaryEnd = boundaryLength - 1;
66
+ const bufferLength = data.length;
67
+ let c;
68
+ let cl;
69
+ const mark = (name) => {
70
+ this[name + "Mark"] = i;
71
+ };
72
+ const clear = (name) => {
73
+ delete this[name + "Mark"];
74
+ };
75
+ const callback = (callbackSymbol, start, end, ui8a) => {
76
+ if (start === void 0 || start !== end) this[callbackSymbol](ui8a && ui8a.subarray(start, end));
77
+ };
78
+ const dataCallback = (name, clear) => {
79
+ const markSymbol = name + "Mark";
80
+ if (!(markSymbol in this)) return;
81
+ if (clear) {
82
+ callback(name, this[markSymbol], i, data);
83
+ delete this[markSymbol];
84
+ } else {
85
+ callback(name, this[markSymbol], data.length, data);
86
+ this[markSymbol] = 0;
87
+ }
88
+ };
89
+ for (i = 0; i < length_; i++) {
90
+ c = data[i];
91
+ switch (state) {
92
+ case S.START_BOUNDARY:
93
+ if (index === boundary.length - 2) {
94
+ if (c === HYPHEN) flags |= F.LAST_BOUNDARY;
95
+ else if (c !== CR) return;
96
+ index++;
97
+ break;
98
+ } else if (index - 1 === boundary.length - 2) {
99
+ if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
100
+ state = S.END;
101
+ flags = 0;
102
+ } else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
103
+ index = 0;
104
+ callback("onPartBegin");
105
+ state = S.HEADER_FIELD_START;
106
+ } else return;
107
+ break;
108
+ }
109
+ if (c !== boundary[index + 2]) index = -2;
110
+ if (c === boundary[index + 2]) index++;
111
+ break;
112
+ case S.HEADER_FIELD_START:
113
+ state = S.HEADER_FIELD;
114
+ mark("onHeaderField");
115
+ index = 0;
116
+ case S.HEADER_FIELD:
117
+ if (c === CR) {
118
+ clear("onHeaderField");
119
+ state = S.HEADERS_ALMOST_DONE;
120
+ break;
121
+ }
122
+ index++;
123
+ if (c === HYPHEN) break;
124
+ if (c === COLON) {
125
+ if (index === 1) return;
126
+ dataCallback("onHeaderField", true);
127
+ state = S.HEADER_VALUE_START;
128
+ break;
129
+ }
130
+ cl = lower(c);
131
+ if (cl < A || cl > Z) return;
132
+ break;
133
+ case S.HEADER_VALUE_START:
134
+ if (c === SPACE) break;
135
+ mark("onHeaderValue");
136
+ state = S.HEADER_VALUE;
137
+ case S.HEADER_VALUE:
138
+ if (c === CR) {
139
+ dataCallback("onHeaderValue", true);
140
+ callback("onHeaderEnd");
141
+ state = S.HEADER_VALUE_ALMOST_DONE;
142
+ }
143
+ break;
144
+ case S.HEADER_VALUE_ALMOST_DONE:
145
+ if (c !== LF) return;
146
+ state = S.HEADER_FIELD_START;
147
+ break;
148
+ case S.HEADERS_ALMOST_DONE:
149
+ if (c !== LF) return;
150
+ callback("onHeadersEnd");
151
+ state = S.PART_DATA_START;
152
+ break;
153
+ case S.PART_DATA_START:
154
+ state = S.PART_DATA;
155
+ mark("onPartData");
156
+ case S.PART_DATA:
157
+ previousIndex = index;
158
+ if (index === 0) {
159
+ i += boundaryEnd;
160
+ while (i < bufferLength && !(data[i] in boundaryChars)) i += boundaryLength;
161
+ i -= boundaryEnd;
162
+ c = data[i];
163
+ }
164
+ if (index < boundary.length) if (boundary[index] === c) {
165
+ if (index === 0) dataCallback("onPartData", true);
166
+ index++;
167
+ } else index = 0;
168
+ else if (index === boundary.length) {
169
+ index++;
170
+ if (c === CR) flags |= F.PART_BOUNDARY;
171
+ else if (c === HYPHEN) flags |= F.LAST_BOUNDARY;
172
+ else index = 0;
173
+ } else if (index - 1 === boundary.length) if (flags & F.PART_BOUNDARY) {
174
+ index = 0;
175
+ if (c === LF) {
176
+ flags &= ~F.PART_BOUNDARY;
177
+ callback("onPartEnd");
178
+ callback("onPartBegin");
179
+ state = S.HEADER_FIELD_START;
180
+ break;
181
+ }
182
+ } else if (flags & F.LAST_BOUNDARY) if (c === HYPHEN) {
183
+ callback("onPartEnd");
184
+ state = S.END;
185
+ flags = 0;
186
+ } else index = 0;
187
+ else index = 0;
188
+ if (index > 0) lookbehind[index - 1] = c;
189
+ else if (previousIndex > 0) {
190
+ const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
191
+ callback("onPartData", 0, previousIndex, _lookbehind);
192
+ previousIndex = 0;
193
+ mark("onPartData");
194
+ i--;
195
+ }
196
+ break;
197
+ case S.END: break;
198
+ default: throw new Error(`Unexpected state entered: ${state}`);
199
+ }
200
+ }
201
+ dataCallback("onHeaderField");
202
+ dataCallback("onHeaderValue");
203
+ dataCallback("onPartData");
204
+ this.index = index;
205
+ this.state = state;
206
+ this.flags = flags;
207
+ }
208
+ end() {
209
+ if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) this.onPartEnd();
210
+ else if (this.state !== S.END) throw new Error("MultipartParser.end(): stream ended unexpectedly");
211
+ }
212
+ };
213
+ function _fileName(headerValue) {
214
+ const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
215
+ if (!m) return;
216
+ const match = m[2] || m[3] || "";
217
+ let filename = match.slice(match.lastIndexOf("\\") + 1);
218
+ filename = filename.replace(/%22/g, "\"");
219
+ filename = filename.replace(/&#(\d{4});/g, (m, code) => {
220
+ return String.fromCharCode(code);
221
+ });
222
+ return filename;
223
+ }
224
+ async function toFormData(Body, ct) {
225
+ if (!/multipart/i.test(ct)) throw new TypeError("Failed to fetch");
226
+ const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
227
+ if (!m) throw new TypeError("no or bad content-type header, no multipart boundary");
228
+ const parser = new MultipartParser(m[1] || m[2]);
229
+ let headerField;
230
+ let headerValue;
231
+ let entryValue;
232
+ let entryName;
233
+ let contentType;
234
+ let filename;
235
+ const entryChunks = [];
236
+ const formData = new FormData();
237
+ const onPartData = (ui8a) => {
238
+ entryValue += decoder.decode(ui8a, { stream: true });
239
+ };
240
+ const appendToFile = (ui8a) => {
241
+ entryChunks.push(ui8a);
242
+ };
243
+ const appendFileToFormData = () => {
244
+ const file = new File(entryChunks, filename, { type: contentType });
245
+ formData.append(entryName, file);
246
+ };
247
+ const appendEntryToFormData = () => {
248
+ formData.append(entryName, entryValue);
249
+ };
250
+ const decoder = new TextDecoder("utf-8");
251
+ decoder.decode();
252
+ parser.onPartBegin = function() {
253
+ parser.onPartData = onPartData;
254
+ parser.onPartEnd = appendEntryToFormData;
255
+ headerField = "";
256
+ headerValue = "";
257
+ entryValue = "";
258
+ entryName = "";
259
+ contentType = "";
260
+ filename = null;
261
+ entryChunks.length = 0;
262
+ };
263
+ parser.onHeaderField = function(ui8a) {
264
+ headerField += decoder.decode(ui8a, { stream: true });
265
+ };
266
+ parser.onHeaderValue = function(ui8a) {
267
+ headerValue += decoder.decode(ui8a, { stream: true });
268
+ };
269
+ parser.onHeaderEnd = function() {
270
+ headerValue += decoder.decode();
271
+ headerField = headerField.toLowerCase();
272
+ if (headerField === "content-disposition") {
273
+ const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
274
+ if (m) entryName = m[2] || m[3] || "";
275
+ filename = _fileName(headerValue);
276
+ if (filename) {
277
+ parser.onPartData = appendToFile;
278
+ parser.onPartEnd = appendFileToFormData;
279
+ }
280
+ } else if (headerField === "content-type") contentType = headerValue;
281
+ headerValue = "";
282
+ headerField = "";
283
+ };
284
+ for await (const chunk of Body) parser.write(chunk);
285
+ parser.end();
286
+ return formData;
287
+ }
288
+
289
+ //#endregion
290
+ export { toFormData };
@@ -0,0 +1,9 @@
1
+ import { s as ApiResponse } from "../../index-B20FTOvk.mjs";
2
+
3
+ //#region src/myTarget/server/myTarget.d.ts
4
+ /**
5
+ * Make the request to MyTarget API using the access token.
6
+ */
7
+ declare const request: (data: object, url: string, accessToken: string) => Promise<ApiResponse>;
8
+ //#endregion
9
+ export { request };
@@ -0,0 +1,16 @@
1
+ import "../../api-DGKJDAfb.mjs";
2
+ import { post } from "../../axios/index.mjs";
3
+
4
+ //#region src/myTarget/server/myTarget.ts
5
+ /**
6
+ * Make the request to MyTarget API using the access token.
7
+ */
8
+ const request = async (data, url, accessToken) => {
9
+ return await post(url, data, { headers: {
10
+ Authorization: `Bearer ${accessToken}`,
11
+ "Content-Type": "application/json"
12
+ } });
13
+ };
14
+
15
+ //#endregion
16
+ export { request };
@@ -0,0 +1,12 @@
1
+ //#region src/nextAuth/isSessionReady.d.ts
2
+ declare const isSessionReady: (session: any) => boolean;
3
+ //#endregion
4
+ //#region src/nextAuth/nextAuth.d.ts
5
+ declare const NextAuthState: {
6
+ readonly AUTHENTICATED: "authenticated";
7
+ readonly PENDING: "loading";
8
+ readonly UNAUTHENTICATED: "unauthenticated";
9
+ };
10
+ type NextAuthState = typeof NextAuthState[keyof typeof NextAuthState];
11
+ //#endregion
12
+ export { NextAuthState, isSessionReady };
@@ -0,0 +1,15 @@
1
+ //#region src/nextAuth/isSessionReady.ts
2
+ const isSessionReady = (session) => {
3
+ return null !== session?.user;
4
+ };
5
+
6
+ //#endregion
7
+ //#region src/nextAuth/nextAuth.ts
8
+ const NextAuthState = {
9
+ AUTHENTICATED: "authenticated",
10
+ PENDING: "loading",
11
+ UNAUTHENTICATED: "unauthenticated"
12
+ };
13
+
14
+ //#endregion
15
+ export { NextAuthState, isSessionReady };
@@ -0,0 +1,19 @@
1
+ //#region src/nextJs/nextJs.d.ts
2
+ /**
3
+ * Get the user's remote IP Address
4
+ */
5
+ declare const getIp: ({
6
+ req
7
+ }: {
8
+ req: any;
9
+ }) => string;
10
+ /**
11
+ * Get the user's User Agent
12
+ */
13
+ declare const getUserAgent: ({
14
+ req
15
+ }: {
16
+ req: any;
17
+ }) => string;
18
+ //#endregion
19
+ export { getIp, getUserAgent };
@@ -0,0 +1,12 @@
1
+ //#region src/nextJs/nextJs.ts
2
+ /**
3
+ * Get the user's remote IP Address
4
+ */
5
+ const getIp = ({ req }) => String(req.headers?.["x-real-ip"] || "unset");
6
+ /**
7
+ * Get the user's User Agent
8
+ */
9
+ const getUserAgent = ({ req }) => String(req.headers["user-agent"] || "unset");
10
+
11
+ //#endregion
12
+ export { getIp, getUserAgent };
@@ -0,0 +1,54 @@
1
+ //#region src/number/format.d.ts
2
+ type FormatProps = {
3
+ compact?: boolean;
4
+ input: any;
5
+ locale?: string;
6
+ minDp?: number;
7
+ maxDp?: number;
8
+ };
9
+ /**
10
+ * Take a given number and format it.
11
+ */
12
+ declare const format: (props: FormatProps) => string;
13
+ //#endregion
14
+ //#region src/number/formatCurrency.d.ts
15
+ /**
16
+ * Use the International number formatting to return the currency value.
17
+ * https://www.freecodecamp.org/news/how-to-format-number-as-currency-in-javascript-one-line-of-code/
18
+ */
19
+ declare const formatCurrency: (input: any, locale?: string, currency?: string) => string;
20
+ //#endregion
21
+ //#region src/number/getDecimal.d.ts
22
+ /**
23
+ * Return a decimal number after rounding.
24
+ */
25
+ declare const getDecimal: (input: any, dp?: number) => number;
26
+ //#endregion
27
+ //#region src/number/getSafeDivide.d.ts
28
+ type GetSafeDivideProps = {
29
+ defaultValue?: number;
30
+ dp?: number;
31
+ divisor: any;
32
+ numerator: any;
33
+ };
34
+ /**
35
+ * Shorthand function to divide number, but fallback if the divisor is 0.
36
+ */
37
+ declare const getSafeDivide: (props: GetSafeDivideProps) => number;
38
+ //#endregion
39
+ //#region src/number/getPercent.d.ts
40
+ declare const getPercent: (numerator: any, divisor: any, dp?: number) => number;
41
+ //#endregion
42
+ //#region src/number/getNumber.d.ts
43
+ /**
44
+ * Take an input and return a number.
45
+ */
46
+ declare const getNumber: (input: any, defaultValue?: number) => number;
47
+ //#endregion
48
+ //#region src/number/getPercentIncrease.d.ts
49
+ /**
50
+ * Formula to work out the percentage increase/decrease.
51
+ */
52
+ declare const getPercentIncrease: (current: any, comparison: any, defaultValue: number) => number;
53
+ //#endregion
54
+ export { format, formatCurrency, getDecimal, getNumber, getPercent, getPercentIncrease, getSafeDivide };
@@ -0,0 +1,75 @@
1
+ import { n as getNumber, t as getDecimal } from "../getDecimal-CafxtLhH.mjs";
2
+
3
+ //#region src/number/format.ts
4
+ /**
5
+ * Take a given number and format it.
6
+ */
7
+ const format = (props) => {
8
+ const minDp = props?.minDp ?? 0;
9
+ const maxDp = props?.maxDp ?? 2;
10
+ const compact = props?.compact || false;
11
+ const inputValue = getNumber(props.input);
12
+ return Intl.NumberFormat(props?.locale || "en-GB", {
13
+ minimumFractionDigits: minDp,
14
+ maximumFractionDigits: maxDp,
15
+ notation: compact ? "compact" : "standard"
16
+ }).format(inputValue);
17
+ };
18
+
19
+ //#endregion
20
+ //#region src/number/formatCurrency.ts
21
+ /**
22
+ * Use the International number formatting to return the currency value.
23
+ * https://www.freecodecamp.org/news/how-to-format-number-as-currency-in-javascript-one-line-of-code/
24
+ */
25
+ const formatCurrency = (input, locale = "en-GB", currency = "GBP") => {
26
+ const value = Number(input);
27
+ const currencyClean = currency.toUpperCase().trim();
28
+ let formatted = new Intl.NumberFormat(locale, {
29
+ style: "currency",
30
+ currency: currencyClean
31
+ }).format(value);
32
+ if ("USD" === currencyClean) formatted = formatted.replace("US$", "$");
33
+ return formatted;
34
+ };
35
+
36
+ //#endregion
37
+ //#region src/number/getSafeDivide.ts
38
+ /**
39
+ * Shorthand function to divide number, but fallback if the divisor is 0.
40
+ */
41
+ const getSafeDivide = (props) => {
42
+ const numeratorInt = getNumber(props.numerator);
43
+ if (numeratorInt === 0) return 0;
44
+ const divisorInt = getNumber(props.divisor);
45
+ if (divisorInt === 0 || !Number.isFinite(divisorInt)) return props?.defaultValue ?? 0;
46
+ return getDecimal(numeratorInt / divisorInt, props?.dp);
47
+ };
48
+
49
+ //#endregion
50
+ //#region src/number/getPercent.ts
51
+ const getPercent = (numerator, divisor, dp) => {
52
+ const finalNumerator = Number(numerator);
53
+ const finalDivisor = Number(divisor);
54
+ const finalDp = Number(dp || 1);
55
+ return Number((getSafeDivide({
56
+ defaultValue: 0,
57
+ numerator: finalNumerator,
58
+ divisor: finalDivisor
59
+ }) * 100).toFixed(finalDp));
60
+ };
61
+
62
+ //#endregion
63
+ //#region src/number/getPercentIncrease.ts
64
+ /**
65
+ * Formula to work out the percentage increase/decrease.
66
+ */
67
+ const getPercentIncrease = (current, comparison, defaultValue) => {
68
+ const currentValue = getNumber(current);
69
+ const comparisonValue = getNumber(comparison);
70
+ if (0 === comparisonValue) return defaultValue;
71
+ return (currentValue - comparisonValue) / comparisonValue * 100;
72
+ };
73
+
74
+ //#endregion
75
+ export { format, formatCurrency, getDecimal, getNumber, getPercent, getPercentIncrease, getSafeDivide };
@@ -1,5 +1,8 @@
1
+ //#region src/object/replaceKeys.d.ts
1
2
  /**
2
3
  * Iteratively replace all the keys in an object.
3
4
  * https://www.techighness.com/post/replace-all-keys-of-deeply-nested-objects-or-array-of-objects/
4
5
  */
5
- export declare const replaceKeys: (instance: any, getNewKey: Function) => object;
6
+ declare const replaceKeys: (instance: any, getNewKey: Function) => object;
7
+ //#endregion
8
+ export { replaceKeys };
@@ -0,0 +1,22 @@
1
+ //#region src/object/replaceKeys.ts
2
+ /**
3
+ * Iteratively replace all the keys in an object.
4
+ * https://www.techighness.com/post/replace-all-keys-of-deeply-nested-objects-or-array-of-objects/
5
+ */
6
+ const replaceKeys = (instance, getNewKey) => {
7
+ let response = instance;
8
+ if (Array.isArray(instance)) {
9
+ response = [];
10
+ for (let i = 0; i < instance.length; i++) response[i] = replaceKeys(instance[i], getNewKey);
11
+ } else if ("object" === typeof instance) {
12
+ response = {};
13
+ for (const key in instance) {
14
+ const newKey = getNewKey(key);
15
+ response[newKey] = replaceKeys(instance[key], getNewKey);
16
+ }
17
+ }
18
+ return response;
19
+ };
20
+
21
+ //#endregion
22
+ export { replaceKeys };
@@ -0,0 +1,24 @@
1
+ import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
2
+ import * as _1password_sdk0 from "@1password/sdk";
3
+ import { Client } from "@1password/sdk";
4
+
5
+ //#region src/onePassword/server/OnePasswordNamespace.d.ts
6
+ declare class OnePasswordNamespace extends BaseNamespace {
7
+ client: Client;
8
+ config: OnePasswordConfig;
9
+ ensureInit: () => Promise<void>;
10
+ listVaults: () => Promise<_1password_sdk0.VaultOverview[]>;
11
+ getItem: (vaultId: string, itemId: string) => Promise<_1password_sdk0.Item>;
12
+ getJsonNote: (vaultId: string, itemId: string) => Promise<any>;
13
+ listItems: (vaultId: string) => Promise<_1password_sdk0.ItemOverview[]>;
14
+ }
15
+ //#endregion
16
+ //#region src/onePassword/server/onePassword.d.ts
17
+ type OnePasswordConfig = {
18
+ serviceAccountToken: string;
19
+ integrationName?: string;
20
+ integrationVersion?: string;
21
+ };
22
+ declare const onePasswordClient: (key?: string, config?: OnePasswordConfig) => Promise<OnePasswordNamespace>;
23
+ //#endregion
24
+ export { OnePasswordConfig, type OnePasswordNamespace, onePasswordClient };
@@ -0,0 +1,50 @@
1
+ import { BaseNamespace } from "../../_class/index.mjs";
2
+
3
+ //#region src/onePassword/server/OnePasswordNamespace.ts
4
+ var OnePasswordNamespace = class extends BaseNamespace {
5
+ ensureInit = async () => {
6
+ if (!this.client) try {
7
+ const { createClient } = await import("@1password/sdk");
8
+ this.client = await createClient({
9
+ auth: this.config.serviceAccountToken,
10
+ integrationName: this.config.integrationName || "8MS Helper TS",
11
+ integrationVersion: this.config.integrationVersion || "v1.0.0"
12
+ });
13
+ } catch (e) {
14
+ throw new Error("1Password SDK not installed");
15
+ }
16
+ };
17
+ listVaults = async () => {
18
+ await this.ensureInit();
19
+ return this.client.vaults.list();
20
+ };
21
+ getItem = async (vaultId, itemId) => {
22
+ await this.ensureInit();
23
+ return this.client.items.get(vaultId, itemId);
24
+ };
25
+ getJsonNote = async (vaultId, itemId) => {
26
+ let response = null;
27
+ const item = await this.getItem(vaultId, itemId);
28
+ if (item && "undefined" !== typeof item.notes) response = JSON.parse(item.notes);
29
+ return response;
30
+ };
31
+ listItems = async (vaultId) => {
32
+ await this.ensureInit();
33
+ return this.client.items.list(vaultId);
34
+ };
35
+ };
36
+
37
+ //#endregion
38
+ //#region src/onePassword/server/onePassword.ts
39
+ const onePasswordNamespaces = /* @__PURE__ */ new Map();
40
+ const onePasswordClient = async (key = "default", config) => {
41
+ if (onePasswordNamespaces.has(key)) return onePasswordNamespaces.get(key);
42
+ if (!config) if (key === "default") config = { serviceAccountToken: process.env.ONEPASSWORD_SERVICE_TOKEN };
43
+ else throw new Error(`Config required for namespace '${key}'`);
44
+ const namespace = new OnePasswordNamespace(key, config);
45
+ onePasswordNamespaces.set(key, namespace);
46
+ return namespace;
47
+ };
48
+
49
+ //#endregion
50
+ export { OnePasswordNamespace, onePasswordClient };
@@ -0,0 +1,20 @@
1
+ import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
2
+
3
+ //#region src/openAi/server/OpenAiNamespace.d.ts
4
+ declare class OpenAiNamespace extends BaseNamespace {
5
+ client: boolean;
6
+ config: OpenAiConfig;
7
+ /**
8
+ * Renew the access token as it expires every 3 hours.
9
+ */
10
+ ensureInit: () => Promise<void>;
11
+ completion: (prompt: string, temperature?: number, maxTokens?: number, model?: string) => Promise<any>;
12
+ }
13
+ //#endregion
14
+ //#region src/openAi/server/openAi.d.ts
15
+ type OpenAiConfig = {
16
+ apiKey: string;
17
+ };
18
+ declare const openAiClient: (key?: string, config?: OpenAiConfig, vaultId?: string, itemId?: string) => Promise<OpenAiNamespace>;
19
+ //#endregion
20
+ export { OpenAiConfig, type OpenAiNamespace, openAiClient };
@@ -0,0 +1,46 @@
1
+ import { BaseNamespace } from "../../_class/index.mjs";
2
+ import "../../api-DGKJDAfb.mjs";
3
+ import { post } from "../../axios/index.mjs";
4
+ import { onePasswordClient } from "../../onePassword/server/index.mjs";
5
+
6
+ //#region src/openAi/server/OpenAiNamespace.ts
7
+ var OpenAiNamespace = class extends BaseNamespace {
8
+ /**
9
+ * Renew the access token as it expires every 3 hours.
10
+ */
11
+ ensureInit = async () => {
12
+ if (!this.client) this.client = true;
13
+ };
14
+ completion = async (prompt, temperature = 1, maxTokens = null, model = "gpt-3.5-turbo") => {
15
+ let response = null;
16
+ const apiResponse = await post(`https://api.openai.com/v1/chat/completions`, {
17
+ max_tokens: maxTokens,
18
+ model,
19
+ messages: [{
20
+ role: "user",
21
+ content: prompt
22
+ }],
23
+ temperature: 1
24
+ }, { headers: { Authorization: `Bearer ${this.config.apiKey}` } });
25
+ if (apiResponse.isSuccess()) response = apiResponse.getBody();
26
+ return response;
27
+ };
28
+ };
29
+
30
+ //#endregion
31
+ //#region src/openAi/server/openAi.ts
32
+ const openAiNamespaces = /* @__PURE__ */ new Map();
33
+ const openAiClient = async (key = "default", config, vaultId, itemId) => {
34
+ if (openAiNamespaces.has(key)) return openAiNamespaces.get(key);
35
+ let instanceConfig;
36
+ if (config) instanceConfig = config;
37
+ else if (vaultId && itemId) instanceConfig = await (await onePasswordClient()).getJsonNote(vaultId, itemId);
38
+ else if (process.env.OPEN_AI_VAULT_ID && process.env.OPEN_AI_ITEM_ID) instanceConfig = await (await onePasswordClient()).getJsonNote(process.env.OPEN_AI_VAULT_ID, process.env.OPEN_AI_ITEM_ID);
39
+ else throw new Error(`Config required for namespace '${key}'`);
40
+ const namespace = new OpenAiNamespace(key, instanceConfig);
41
+ openAiNamespaces.set(key, namespace);
42
+ return namespace;
43
+ };
44
+
45
+ //#endregion
46
+ export { OpenAiNamespace, openAiClient };