@8ms/helpers 2.0.0 → 2.0.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 (345) hide show
  1. package/.github/workflows/deploy_npmjs.yml +7 -0
  2. package/.yarn/install-state.gz +0 -0
  3. package/_class/BaseClass.d.ts +18 -0
  4. package/_class/BaseClass.js +53 -0
  5. package/_class/BaseNamespace.d.ts +9 -0
  6. package/_class/BaseNamespace.js +27 -0
  7. package/_class/index.d.ts +2 -0
  8. package/_class/index.js +7 -0
  9. package/adverity/getJobs.d.ts +15 -0
  10. package/adverity/getJobs.js +30 -0
  11. package/adverity/index.d.ts +112 -0
  12. package/adverity/index.js +61 -0
  13. package/api/ApiResponseClass.d.ts +35 -0
  14. package/api/ApiResponseClass.js +97 -0
  15. package/api/index.d.ts +22 -0
  16. package/api/index.js +44 -0
  17. package/array/index.d.ts +8 -0
  18. package/array/index.js +17 -0
  19. package/atInternet/index.d.ts +16 -0
  20. package/atInternet/index.js +18 -0
  21. package/aws/athenaExpress/AwsAthenaNamespace.d.ts +8 -0
  22. package/aws/athenaExpress/AwsAthenaNamespace.js +82 -0
  23. package/aws/athenaExpress/index.d.ts +10 -0
  24. package/aws/athenaExpress/index.js +40 -0
  25. package/aws/ec2/AwsEc2Namespace.d.ts +10 -0
  26. package/aws/ec2/AwsEc2Namespace.js +78 -0
  27. package/aws/ec2/index.d.ts +3 -0
  28. package/aws/ec2/index.js +16 -0
  29. package/aws/ecs/AwsEcsNamespace.d.ts +53 -0
  30. package/aws/ecs/AwsEcsNamespace.js +159 -0
  31. package/aws/ecs/index.d.ts +3 -0
  32. package/aws/ecs/index.js +16 -0
  33. package/aws/glue/AwsGlueNamespace.d.ts +12 -0
  34. package/aws/glue/AwsGlueNamespace.js +70 -0
  35. package/aws/glue/index.d.ts +3 -0
  36. package/aws/glue/index.js +16 -0
  37. package/aws/index.d.ts +9 -0
  38. package/aws/index.js +34 -0
  39. package/aws/isResponse200.d.ts +4 -0
  40. package/aws/isResponse200.js +16 -0
  41. package/aws/lambda/AwsLambdaNamespace.d.ts +21 -0
  42. package/aws/lambda/AwsLambdaNamespace.js +110 -0
  43. package/aws/lambda/index.d.ts +4 -0
  44. package/aws/lambda/index.js +21 -0
  45. package/aws/s3/AwsS3Namespace.d.ts +60 -0
  46. package/aws/s3/AwsS3Namespace.js +401 -0
  47. package/aws/s3/index.d.ts +25 -0
  48. package/aws/s3/index.js +36 -0
  49. package/aws/s3/payload.d.ts +42 -0
  50. package/aws/s3/payload.js +46 -0
  51. package/aws/ses/AwsSesNamespace.d.ts +18 -0
  52. package/aws/ses/AwsSesNamespace.js +69 -0
  53. package/aws/ses/SimpleEmail.d.ts +56 -0
  54. package/aws/ses/SimpleEmail.js +106 -0
  55. package/aws/ses/index.d.ts +4 -0
  56. package/aws/ses/index.js +18 -0
  57. package/aws/sqs/AwsSqsNamespace.d.ts +34 -0
  58. package/aws/sqs/AwsSqsNamespace.js +96 -0
  59. package/aws/sqs/index.d.ts +3 -0
  60. package/aws/sqs/index.js +16 -0
  61. package/aws/ssm/AwsSsmNamespace.d.ts +11 -0
  62. package/aws/ssm/AwsSsmNamespace.js +89 -0
  63. package/aws/ssm/index.d.ts +3 -0
  64. package/aws/ssm/index.js +16 -0
  65. package/axios/deleteRequest.d.ts +6 -0
  66. package/axios/deleteRequest.js +33 -0
  67. package/axios/get.d.ts +5 -0
  68. package/axios/get.js +31 -0
  69. package/axios/index.d.ts +3 -0
  70. package/axios/index.js +9 -0
  71. package/axios/post.d.ts +5 -0
  72. package/axios/post.js +32 -0
  73. package/boolean/getBoolean.d.ts +4 -0
  74. package/boolean/getBoolean.js +23 -0
  75. package/boolean/index.d.ts +1 -0
  76. package/boolean/index.js +5 -0
  77. package/brightData/index.d.ts +15 -0
  78. package/brightData/index.js +20 -0
  79. package/brightData/serpApi/buildGoogleSerpUrl.d.ts +32 -0
  80. package/brightData/serpApi/buildGoogleSerpUrl.js +116 -0
  81. package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +22 -0
  82. package/brightData/serpApi/buildGoogleTrendsUrl.js +61 -0
  83. package/brightData/serpApi/getAsyncRequestId.d.ts +8 -0
  84. package/brightData/serpApi/getAsyncRequestId.js +36 -0
  85. package/brightData/serpApi/getAsyncResults.d.ts +7 -0
  86. package/brightData/serpApi/getAsyncResults.js +35 -0
  87. package/brightData/serpApi/getRealtime.d.ts +5 -0
  88. package/brightData/serpApi/getRealtime.js +30 -0
  89. package/brightData/serpApi/index.d.ts +14 -0
  90. package/brightData/serpApi/index.js +23 -0
  91. package/brightData/webScraperIde/getBatch.d.ts +7 -0
  92. package/brightData/webScraperIde/getBatch.js +28 -0
  93. package/brightData/webScraperIde/getRealtime.d.ts +7 -0
  94. package/brightData/webScraperIde/getRealtime.js +49 -0
  95. package/brightData/webScraperIde/index.d.ts +2 -0
  96. package/brightData/webScraperIde/index.js +7 -0
  97. package/cache/index.d.ts +2 -0
  98. package/cache/index.js +48 -0
  99. package/cache/test/cache.test.d.ts +1 -0
  100. package/cache/test/cache.test.js +10 -0
  101. package/crud/index.d.ts +6 -0
  102. package/crud/index.js +10 -0
  103. package/crypto/getDecrypt.d.ts +5 -0
  104. package/crypto/getDecrypt.js +47 -0
  105. package/crypto/getEncrypt.d.ts +5 -0
  106. package/crypto/getEncrypt.js +47 -0
  107. package/crypto/getRandom.d.ts +4 -0
  108. package/crypto/getRandom.js +12 -0
  109. package/crypto/getSha256.d.ts +5 -0
  110. package/crypto/getSha256.js +48 -0
  111. package/crypto/index.d.ts +4 -0
  112. package/crypto/index.js +11 -0
  113. package/date/calculation.d.ts +75 -0
  114. package/date/calculation.js +207 -0
  115. package/date/financialYear.d.ts +19 -0
  116. package/date/financialYear.js +85 -0
  117. package/date/format.d.ts +68 -0
  118. package/date/format.js +150 -0
  119. package/date/index.d.ts +35 -0
  120. package/date/index.js +57 -0
  121. package/environment/index.d.ts +32 -0
  122. package/environment/index.js +92 -0
  123. package/eskimi/getAgeGroup.d.ts +4 -0
  124. package/eskimi/getAgeGroup.js +15 -0
  125. package/eskimi/getData.d.ts +4 -0
  126. package/eskimi/getData.js +17 -0
  127. package/eskimi/getDevice.d.ts +4 -0
  128. package/eskimi/getDevice.js +15 -0
  129. package/eskimi/getGender.d.ts +4 -0
  130. package/eskimi/getGender.js +15 -0
  131. package/eskimi/index.d.ts +49 -0
  132. package/eskimi/index.js +96 -0
  133. package/file/createDirectory.d.ts +5 -0
  134. package/file/createDirectory.js +50 -0
  135. package/file/index.d.ts +1 -0
  136. package/file/index.js +5 -0
  137. package/geo/countries.d.ts +12 -0
  138. package/geo/countries.js +222 -0
  139. package/geo/index.d.ts +2 -0
  140. package/geo/index.js +7 -0
  141. package/geo/languages.d.ts +9 -0
  142. package/geo/languages.js +58 -0
  143. package/google/bigQuery/GoogleBigQueryNamespace.d.ts +51 -0
  144. package/google/bigQuery/GoogleBigQueryNamespace.js +165 -0
  145. package/google/bigQuery/index.d.ts +5 -0
  146. package/google/bigQuery/index.js +37 -0
  147. package/google/bigQuery/loadData.d.ts +19 -0
  148. package/google/bigQuery/loadData.js +18 -0
  149. package/google/index.d.ts +27 -0
  150. package/google/index.js +24 -0
  151. package/google/sheets/GoogleSheetsNamespace.d.ts +16 -0
  152. package/google/sheets/GoogleSheetsNamespace.js +81 -0
  153. package/google/sheets/getAssociatedData.d.ts +10 -0
  154. package/google/sheets/getAssociatedData.js +43 -0
  155. package/google/sheets/index.d.ts +8 -0
  156. package/google/sheets/index.js +37 -0
  157. package/google/storage/GoogleCloudStorageNamespace.d.ts +20 -0
  158. package/google/storage/GoogleCloudStorageNamespace.js +108 -0
  159. package/google/storage/index.d.ts +3 -0
  160. package/google/storage/index.js +30 -0
  161. package/googleAds/GoogleAdsNamespace.d.ts +11 -0
  162. package/googleAds/GoogleAdsNamespace.js +73 -0
  163. package/googleAds/index.d.ts +11 -0
  164. package/googleAds/index.js +30 -0
  165. package/googleAds/keywordPlanner/index.d.ts +40 -0
  166. package/googleAds/keywordPlanner/index.js +59 -0
  167. package/googlePageSpeed/GooglePageSpeedNamespace.d.ts +11 -0
  168. package/googlePageSpeed/GooglePageSpeedNamespace.js +35 -0
  169. package/googlePageSpeed/index.d.ts +17 -0
  170. package/googlePageSpeed/index.js +44 -0
  171. package/googleSearchIncidents/index.d.ts +69 -0
  172. package/googleSearchIncidents/index.js +46 -0
  173. package/greenDomain/index.d.ts +21 -0
  174. package/greenDomain/index.js +41 -0
  175. package/inngest/index.d.ts +6 -0
  176. package/inngest/index.js +10 -0
  177. package/json/getJsonNewline.d.ts +1 -0
  178. package/json/getJsonNewline.js +13 -0
  179. package/json/index.d.ts +2 -0
  180. package/json/index.js +7 -0
  181. package/json/isJson.d.ts +1 -0
  182. package/json/isJson.js +26 -0
  183. package/littleWarden/LittleWardenNamespace.d.ts +11 -0
  184. package/littleWarden/LittleWardenNamespace.js +38 -0
  185. package/littleWarden/getUrlStatus.d.ts +4 -0
  186. package/littleWarden/getUrlStatus.js +16 -0
  187. package/littleWarden/index.d.ts +29 -0
  188. package/littleWarden/index.js +74 -0
  189. package/lumar/api/buildRequest.d.ts +13 -0
  190. package/lumar/api/buildRequest.js +80 -0
  191. package/lumar/api/getData.d.ts +5 -0
  192. package/lumar/api/getData.js +13 -0
  193. package/lumar/api/index.d.ts +36 -0
  194. package/lumar/api/index.js +33 -0
  195. package/lumar/api/initClient.d.ts +6 -0
  196. package/lumar/api/initClient.js +26 -0
  197. package/lumar/graphql/columns.d.ts +28 -0
  198. package/lumar/graphql/columns.js +31 -0
  199. package/lumar/graphql/getData.d.ts +1 -0
  200. package/lumar/graphql/getData.js +20 -0
  201. package/lumar/graphql/index.d.ts +29 -0
  202. package/lumar/graphql/index.js +39 -0
  203. package/lumar/graphql/initClient.d.ts +5 -0
  204. package/lumar/graphql/initClient.js +25 -0
  205. package/lumar/graphql/queries/crawl.d.ts +5 -0
  206. package/lumar/graphql/queries/crawl.js +2 -0
  207. package/lumar/graphql/queries/getCrawls.d.ts +18 -0
  208. package/lumar/graphql/queries/getCrawls.js +33 -0
  209. package/lumar/graphql/queries/getReportDifferences.d.ts +24 -0
  210. package/lumar/graphql/queries/getReportDifferences.js +37 -0
  211. package/lumar/graphql/queries/getRows.d.ts +38 -0
  212. package/lumar/graphql/queries/getRows.js +57 -0
  213. package/lumar/graphql/queries/getTotals.d.ts +25 -0
  214. package/lumar/graphql/queries/getTotals.js +40 -0
  215. package/lumar/graphql/queries/row.d.ts +157 -0
  216. package/lumar/graphql/queries/row.js +2 -0
  217. package/lumar/graphql/reportTemplates.d.ts +67 -0
  218. package/lumar/graphql/reportTemplates.js +70 -0
  219. package/myTarget/request.d.ts +5 -0
  220. package/myTarget/request.js +17 -0
  221. package/nextAuth/index.d.ts +6 -0
  222. package/nextAuth/index.js +11 -0
  223. package/nextAuth/isSessionReady.d.ts +1 -0
  224. package/nextAuth/isSessionReady.js +13 -0
  225. package/nextJs/getIp.d.ts +6 -0
  226. package/nextJs/getIp.js +14 -0
  227. package/nextJs/getUserAgent.d.ts +6 -0
  228. package/nextJs/getUserAgent.js +8 -0
  229. package/nextJs/index.d.ts +2 -0
  230. package/nextJs/index.js +7 -0
  231. package/number/format.d.ts +12 -0
  232. package/number/format.js +20 -0
  233. package/number/formatCurrency.d.ts +5 -0
  234. package/number/formatCurrency.js +21 -0
  235. package/number/getDecimal.d.ts +4 -0
  236. package/number/getDecimal.js +12 -0
  237. package/number/getNumber.d.ts +4 -0
  238. package/number/getNumber.js +48 -0
  239. package/number/getPercentIncrease.d.ts +4 -0
  240. package/number/getPercentIncrease.js +16 -0
  241. package/number/getSafeDivide.d.ts +11 -0
  242. package/number/getSafeDivide.js +20 -0
  243. package/number/index.d.ts +6 -0
  244. package/number/index.js +15 -0
  245. package/object/index.d.ts +1 -0
  246. package/object/index.js +5 -0
  247. package/object/replaceKeys.d.ts +5 -0
  248. package/object/replaceKeys.js +25 -0
  249. package/onePassword/OnePasswordNamespace.d.ts +13 -0
  250. package/onePassword/OnePasswordNamespace.js +81 -0
  251. package/onePassword/index.d.ts +7 -0
  252. package/onePassword/index.js +25 -0
  253. package/openAi/OpenAiNamespace.d.ts +11 -0
  254. package/openAi/OpenAiNamespace.js +44 -0
  255. package/openAi/index.d.ts +5 -0
  256. package/openAi/index.js +30 -0
  257. package/package.json +2 -2
  258. package/prisma/PrismaNamespace.d.ts +8 -0
  259. package/prisma/PrismaNamespace.js +79 -0
  260. package/prisma/getDecimal.d.ts +4 -0
  261. package/prisma/getDecimal.js +23 -0
  262. package/prisma/index.d.ts +8 -0
  263. package/prisma/index.js +29 -0
  264. package/snapchat/SnapchatNamespace.d.ts +15 -0
  265. package/snapchat/SnapchatNamespace.js +30 -0
  266. package/snapchat/index.d.ts +7 -0
  267. package/snapchat/index.js +30 -0
  268. package/sorting/byNumberAscending.d.ts +4 -0
  269. package/sorting/byNumberAscending.js +19 -0
  270. package/sorting/byNumberDescending.d.ts +4 -0
  271. package/sorting/byNumberDescending.js +22 -0
  272. package/sorting/byStringAscending.d.ts +4 -0
  273. package/sorting/byStringAscending.js +16 -0
  274. package/sorting/byStringDescending.d.ts +4 -0
  275. package/sorting/byStringDescending.js +16 -0
  276. package/sorting/index.d.ts +4 -0
  277. package/sorting/index.js +11 -0
  278. package/stream/index.d.ts +1 -0
  279. package/stream/index.js +5 -0
  280. package/stream/sort.d.ts +13 -0
  281. package/stream/sort.js +51 -0
  282. package/string/getCapitalised.d.ts +5 -0
  283. package/string/getCapitalised.js +18 -0
  284. package/string/getClean.d.ts +18 -0
  285. package/string/getClean.js +51 -0
  286. package/string/getFolder.d.ts +4 -0
  287. package/string/getFolder.js +15 -0
  288. package/string/getProperCase.d.ts +11 -0
  289. package/string/getProperCase.js +25 -0
  290. package/string/getString.d.ts +4 -0
  291. package/string/getString.js +34 -0
  292. package/string/getStringFromStream.d.ts +5 -0
  293. package/string/getStringFromStream.js +17 -0
  294. package/string/getUnescaped.d.ts +6 -0
  295. package/string/getUnescaped.js +26 -0
  296. package/string/getWithoutAccents.d.ts +5 -0
  297. package/string/getWithoutAccents.js +13 -0
  298. package/string/getWithoutHtmlTags.d.ts +5 -0
  299. package/string/getWithoutHtmlTags.js +12 -0
  300. package/string/getWithoutPunctuation.d.ts +5 -0
  301. package/string/getWithoutPunctuation.js +13 -0
  302. package/string/getWithoutUnderscores.d.ts +4 -0
  303. package/string/getWithoutUnderscores.js +11 -0
  304. package/string/getWithoutWhitespaces.d.ts +5 -0
  305. package/string/getWithoutWhitespaces.js +13 -0
  306. package/string/index.d.ts +12 -0
  307. package/string/index.js +27 -0
  308. package/swr/index.d.ts +42 -0
  309. package/swr/index.js +59 -0
  310. package/upTimeRobot/UpTimeRobotNamespace.d.ts +31 -0
  311. package/upTimeRobot/UpTimeRobotNamespace.js +52 -0
  312. package/upTimeRobot/index.d.ts +38 -0
  313. package/upTimeRobot/index.js +63 -0
  314. package/url/index.d.ts +30 -0
  315. package/url/index.js +72 -0
  316. package/url/writeUrlContents.d.ts +6 -0
  317. package/url/writeUrlContents.js +75 -0
  318. package/util/defaultTo.d.ts +4 -0
  319. package/util/defaultTo.js +44 -0
  320. package/util/getBrotliCompressed.d.ts +5 -0
  321. package/util/getBrotliCompressed.js +23 -0
  322. package/util/getBrotliDecompressed.d.ts +5 -0
  323. package/util/getBrotliDecompressed.js +24 -0
  324. package/util/getClean.d.ts +11 -0
  325. package/util/getClean.js +23 -0
  326. package/util/getGzipCompressed.d.ts +5 -0
  327. package/util/getGzipCompressed.js +23 -0
  328. package/util/getGzipDecompressed.d.ts +5 -0
  329. package/util/getGzipDecompressed.js +24 -0
  330. package/util/getWithoutHash.d.ts +4 -0
  331. package/util/getWithoutHash.js +18 -0
  332. package/util/getWithoutParameter.d.ts +4 -0
  333. package/util/getWithoutParameter.js +18 -0
  334. package/util/index.d.ts +11 -0
  335. package/util/index.js +25 -0
  336. package/util/isUndefined.d.ts +4 -0
  337. package/util/isUndefined.js +13 -0
  338. package/util/promiseChunks.d.ts +5 -0
  339. package/util/promiseChunks.js +19 -0
  340. package/util/sleep.d.ts +1 -0
  341. package/util/sleep.js +7 -0
  342. package/webWorker/index.d.ts +5 -0
  343. package/webWorker/index.js +9 -0
  344. package/xml/getXml.d.ts +1 -0
  345. package/xml/getXml.js +18 -0
@@ -0,0 +1,11 @@
1
+ import { BaseNamespace } from "../_class";
2
+ import type { GoogleAdsApi } from "google-ads-api";
3
+ import { Config } from "./index";
4
+ export declare class GoogleAdsNamespace extends BaseNamespace {
5
+ client: GoogleAdsApi | null;
6
+ config: Config | null;
7
+ mccAccountId: string;
8
+ refreshToken: string;
9
+ ensureInit: () => Promise<void>;
10
+ getCustomer: (customerId: string) => Promise<import("google-ads-api").Customer>;
11
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.GoogleAdsNamespace = void 0;
37
+ const _class_1 = require("../_class");
38
+ class GoogleAdsNamespace extends _class_1.BaseNamespace {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.client = null;
42
+ this.config = null;
43
+ this.mccAccountId = "";
44
+ this.refreshToken = "";
45
+ this.ensureInit = async () => {
46
+ if (!this.client) {
47
+ try {
48
+ const { GoogleAdsApi } = await Promise.resolve().then(() => __importStar(require("google-ads-api")));
49
+ this.client = new GoogleAdsApi({
50
+ client_id: this.config.client.clientId,
51
+ client_secret: this.config.client.clientSecret,
52
+ developer_token: this.config.client.developerToken,
53
+ });
54
+ this.mccAccountId = this.config.mccAccountId;
55
+ this.refreshToken = this.config.refreshToken;
56
+ }
57
+ catch (e) {
58
+ throw new Error("Google Sheets Client not installed");
59
+ }
60
+ }
61
+ };
62
+ this.getCustomer = async (customerId) => {
63
+ await this.ensureInit();
64
+ const customer = this.client.Customer({
65
+ customer_id: customerId,
66
+ login_customer_id: global.googleAdsClient.mccAccountId,
67
+ refresh_token: global.googleAdsClient.refreshToken,
68
+ });
69
+ return customer;
70
+ };
71
+ }
72
+ }
73
+ exports.GoogleAdsNamespace = GoogleAdsNamespace;
@@ -0,0 +1,11 @@
1
+ import { GoogleAdsNamespace } from "./GoogleAdsNamespace";
2
+ export type Config = {
3
+ client: {
4
+ clientId: string;
5
+ clientSecret: string;
6
+ developerToken: string;
7
+ };
8
+ mccAccountId: string;
9
+ refreshToken: string;
10
+ };
11
+ export declare const googleAdsClient: (key?: string, config?: Config, vaultId?: string, itemId?: string) => Promise<GoogleAdsNamespace>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.googleAdsClient = void 0;
4
+ const GoogleAdsNamespace_1 = require("./GoogleAdsNamespace");
5
+ const onePassword_1 = require("../onePassword");
6
+ const googleAdsNamespaces = new Map();
7
+ const googleAdsClient = async (key = "default", config, vaultId, itemId) => {
8
+ if (googleAdsNamespaces.has(key)) {
9
+ return googleAdsNamespaces.get(key);
10
+ }
11
+ let instanceConfig;
12
+ if (config) {
13
+ instanceConfig = config;
14
+ }
15
+ else if (vaultId && itemId) {
16
+ instanceConfig = await (await (0, onePassword_1.onePasswordClient)())
17
+ .getJsonNote(vaultId, itemId);
18
+ }
19
+ else if ("default" === key && process.env.GOOGLE_ADS_VAULT_ID && process.env.GOOGLE_ADS_ITEM_ID) {
20
+ instanceConfig = await (await (0, onePassword_1.onePasswordClient)())
21
+ .getJsonNote(process.env.GOOGLE_ADS_VAULT_ID, process.env.GOOGLE_ADS_ITEM_ID);
22
+ }
23
+ else {
24
+ throw new Error(`Config required for namespace '${key}'`);
25
+ }
26
+ const namespace = new GoogleAdsNamespace_1.GoogleAdsNamespace(key, instanceConfig);
27
+ googleAdsNamespaces.set(key, namespace);
28
+ return namespace;
29
+ };
30
+ exports.googleAdsClient = googleAdsClient;
@@ -0,0 +1,40 @@
1
+ import { z } from "zod/v4";
2
+ export declare enum Network {
3
+ GOOGLE_SEARCH_ONLY = 2,
4
+ GOOGLE_SEARCH_AND_PARTNERS = 3
5
+ }
6
+ export declare const requestSchema: z.ZodObject<{
7
+ countries: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
8
+ customerId: z.ZodOptional<z.ZodString>;
9
+ historicalMetricsOptions: z.ZodOptional<z.ZodObject<{
10
+ startMonth: z.ZodString;
11
+ startYear: z.ZodNumber;
12
+ endMonth: z.ZodString;
13
+ endYear: z.ZodNumber;
14
+ }, z.core.$strip>>;
15
+ includeAdultKeywords: z.ZodOptional<z.ZodBoolean>;
16
+ keywordPlanNetwork: z.ZodOptional<z.ZodNumber>;
17
+ queries: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ language: z.ZodOptional<z.ZodNumber>;
19
+ url: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ export type RequestSchemaType = z.infer<typeof requestSchema>;
22
+ export declare const defaultRequest: RequestSchemaType;
23
+ export declare const responseSchema: z.ZodObject<{
24
+ payload: z.ZodObject<{}, z.core.$strip>;
25
+ keyword: z.ZodString;
26
+ avgCpc: z.ZodNumber;
27
+ avgSearchVolume: z.ZodNumber;
28
+ competition: z.ZodNumber;
29
+ competitionIndex: z.ZodNumber;
30
+ months: z.ZodArray<z.ZodObject<{
31
+ date: z.ZodString;
32
+ month: z.ZodNumber;
33
+ searchVolume: z.ZodNumber;
34
+ year: z.ZodNumber;
35
+ }, z.core.$strip>>;
36
+ topOfPageBidHigh: z.ZodNumber;
37
+ topOfPageBidLow: z.ZodNumber;
38
+ totalSearchVolume: z.ZodNumber;
39
+ }, z.core.$strip>;
40
+ export type ResponseSchemaType = z.infer<typeof responseSchema>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.responseSchema = exports.defaultRequest = exports.requestSchema = exports.Network = void 0;
4
+ const v4_1 = require("zod/v4");
5
+ var Network;
6
+ (function (Network) {
7
+ Network[Network["GOOGLE_SEARCH_ONLY"] = 2] = "GOOGLE_SEARCH_ONLY";
8
+ Network[Network["GOOGLE_SEARCH_AND_PARTNERS"] = 3] = "GOOGLE_SEARCH_AND_PARTNERS";
9
+ })(Network || (exports.Network = Network = {}));
10
+ exports.requestSchema = v4_1.z.object({
11
+ countries: v4_1.z.array(v4_1.z.number())
12
+ .optional(),
13
+ customerId: v4_1.z.string()
14
+ .optional(),
15
+ historicalMetricsOptions: v4_1.z.object({
16
+ startMonth: v4_1.z.string(),
17
+ startYear: v4_1.z.number(),
18
+ endMonth: v4_1.z.string(),
19
+ endYear: v4_1.z.number(),
20
+ })
21
+ .optional(),
22
+ includeAdultKeywords: v4_1.z.boolean()
23
+ .optional(),
24
+ keywordPlanNetwork: v4_1.z.number()
25
+ .optional(),
26
+ queries: v4_1.z.array(v4_1.z.string())
27
+ .optional(),
28
+ language: v4_1.z.number()
29
+ .optional(),
30
+ url: v4_1.z.string()
31
+ .optional(),
32
+ });
33
+ exports.defaultRequest = {
34
+ countries: [],
35
+ customerId: "",
36
+ historicalMetricsOptions: null,
37
+ includeAdultKeywords: false,
38
+ keywordPlanNetwork: Network.GOOGLE_SEARCH_ONLY,
39
+ queries: [],
40
+ language: null,
41
+ };
42
+ exports.responseSchema = v4_1.z.object({
43
+ payload: v4_1.z.object(),
44
+ keyword: v4_1.z.string(),
45
+ avgCpc: v4_1.z.number(),
46
+ avgSearchVolume: v4_1.z.number(),
47
+ competition: v4_1.z.number(),
48
+ competitionIndex: v4_1.z.number(),
49
+ months: v4_1.z.object({
50
+ date: v4_1.z.string(),
51
+ month: v4_1.z.number(),
52
+ searchVolume: v4_1.z.number(),
53
+ year: v4_1.z.number(),
54
+ })
55
+ .array(),
56
+ topOfPageBidHigh: v4_1.z.number(),
57
+ topOfPageBidLow: v4_1.z.number(),
58
+ totalSearchVolume: v4_1.z.number(),
59
+ });
@@ -0,0 +1,11 @@
1
+ import { BaseNamespace } from "../_class";
2
+ import { Category, GooglePageSpeedConfig, Strategy } from "./index";
3
+ /**
4
+ * Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
5
+ */
6
+ export declare class GooglePageSpeedNamespace extends BaseNamespace {
7
+ client: boolean | null;
8
+ config: GooglePageSpeedConfig;
9
+ ensureInit: () => Promise<void>;
10
+ getReport: (url: string, category?: Category, strategy?: Strategy) => Promise<any>;
11
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GooglePageSpeedNamespace = void 0;
4
+ const _class_1 = require("../_class");
5
+ const index_1 = require("./index");
6
+ const axios_1 = require("../axios");
7
+ /**
8
+ * Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
9
+ */
10
+ class GooglePageSpeedNamespace extends _class_1.BaseNamespace {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.client = null;
14
+ this.ensureInit = async () => {
15
+ if (!this.client) {
16
+ try {
17
+ // There is not API client but potentially multiple keys to manage instances
18
+ this.client = true;
19
+ }
20
+ catch (e) {
21
+ throw new Error("Google PageSpeed Client not installed");
22
+ }
23
+ }
24
+ };
25
+ this.getReport = async (url, category = index_1.Category.PERFORMANCE, strategy = index_1.Strategy.MOBILE) => {
26
+ const requestUrl = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${url}&strategy=${strategy}&category=${category}&key=${this.config.apiKey}`;
27
+ const apiResponse = await (0, axios_1.get)(requestUrl);
28
+ if (apiResponse.isSuccess()) {
29
+ return apiResponse.getBody();
30
+ }
31
+ return null;
32
+ };
33
+ }
34
+ }
35
+ exports.GooglePageSpeedNamespace = GooglePageSpeedNamespace;
@@ -0,0 +1,17 @@
1
+ import { GooglePageSpeedNamespace } from "./GooglePageSpeedNamespace";
2
+ export type GooglePageSpeedConfig = {
3
+ apiKey: string;
4
+ };
5
+ export declare const googlePageSpeedClient: (key?: string, config?: GooglePageSpeedConfig, vaultId?: string, itemId?: string) => Promise<GooglePageSpeedNamespace>;
6
+ export declare enum Category {
7
+ CATEGORY_UNSPECIFIED = "CATEGORY_UNSPECIFIED",
8
+ ACCESSIBILITY = "ACCESSIBILITY",
9
+ BEST_PRACTICES = "BEST_PRACTICES",
10
+ PERFORMANCE = "PERFORMANCE",
11
+ SEO = "SEO"
12
+ }
13
+ export declare enum Strategy {
14
+ STRATEGY_UNSPECIFIED = "STRATEGY_UNSPECIFIED",
15
+ DESKTOP = "DESKTOP",
16
+ MOBILE = "MOBILE"
17
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Strategy = exports.Category = exports.googlePageSpeedClient = void 0;
4
+ const GooglePageSpeedNamespace_1 = require("./GooglePageSpeedNamespace");
5
+ const onePassword_1 = require("../onePassword");
6
+ const googlePageSpeedNamespaces = new Map();
7
+ const googlePageSpeedClient = async (key = "default", config, vaultId, itemId) => {
8
+ if (googlePageSpeedNamespaces.has(key)) {
9
+ return googlePageSpeedNamespaces.get(key);
10
+ }
11
+ let instanceConfig;
12
+ if (config) {
13
+ instanceConfig = config;
14
+ }
15
+ else if (vaultId && itemId) {
16
+ instanceConfig = await (await (0, onePassword_1.onePasswordClient)())
17
+ .getJsonNote(vaultId, itemId);
18
+ }
19
+ else if ("default" === key && process.env.GOOGLE_PAGE_SPEED_VAULT_ID && process.env.GOOGLE_PAGE_SPEED_ITEM_ID) {
20
+ instanceConfig = await (await (0, onePassword_1.onePasswordClient)())
21
+ .getJsonNote(process.env.GOOGLE_PAGE_SPEED_VAULT_ID, process.env.GOOGLE_PAGE_SPEED_ITEM_ID);
22
+ }
23
+ else {
24
+ throw new Error(`Config required for namespace '${key}'`);
25
+ }
26
+ const namespace = new GooglePageSpeedNamespace_1.GooglePageSpeedNamespace(key, instanceConfig);
27
+ googlePageSpeedNamespaces.set(key, namespace);
28
+ return namespace;
29
+ };
30
+ exports.googlePageSpeedClient = googlePageSpeedClient;
31
+ var Category;
32
+ (function (Category) {
33
+ Category["CATEGORY_UNSPECIFIED"] = "CATEGORY_UNSPECIFIED";
34
+ Category["ACCESSIBILITY"] = "ACCESSIBILITY";
35
+ Category["BEST_PRACTICES"] = "BEST_PRACTICES";
36
+ Category["PERFORMANCE"] = "PERFORMANCE";
37
+ Category["SEO"] = "SEO";
38
+ })(Category || (exports.Category = Category = {}));
39
+ var Strategy;
40
+ (function (Strategy) {
41
+ Strategy["STRATEGY_UNSPECIFIED"] = "STRATEGY_UNSPECIFIED";
42
+ Strategy["DESKTOP"] = "DESKTOP";
43
+ Strategy["MOBILE"] = "MOBILE";
44
+ })(Strategy || (exports.Strategy = Strategy = {}));
@@ -0,0 +1,69 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * https://status.search.google.com/summary
4
+ */
5
+ export declare const getReport: () => Promise<any>;
6
+ export declare const updateSchema: z.ZodObject<{
7
+ created: z.ZodString;
8
+ modified: z.ZodString;
9
+ when: z.ZodString;
10
+ text: z.ZodString;
11
+ status: z.ZodEnum<{
12
+ AVAILABLE: "AVAILABLE";
13
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
14
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
15
+ }>;
16
+ }, z.core.$strip>;
17
+ export type UpdateSchemaType = z.infer<typeof updateSchema>;
18
+ export declare const incidentSchema: z.ZodArray<z.ZodObject<{
19
+ id: z.ZodString;
20
+ number: z.ZodString;
21
+ begin: z.ZodString;
22
+ created: z.ZodString;
23
+ end: z.ZodOptional<z.ZodString>;
24
+ modified: z.ZodString;
25
+ external_desc: z.ZodString;
26
+ updates: z.ZodArray<z.ZodObject<{
27
+ created: z.ZodString;
28
+ modified: z.ZodString;
29
+ when: z.ZodString;
30
+ text: z.ZodString;
31
+ status: z.ZodEnum<{
32
+ AVAILABLE: "AVAILABLE";
33
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
34
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
35
+ }>;
36
+ }, z.core.$strip>>;
37
+ most_recent_update: z.ZodObject<{
38
+ created: z.ZodString;
39
+ modified: z.ZodString;
40
+ when: z.ZodString;
41
+ text: z.ZodString;
42
+ status: z.ZodEnum<{
43
+ AVAILABLE: "AVAILABLE";
44
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
45
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
46
+ }>;
47
+ }, z.core.$strip>;
48
+ status_impact: z.ZodEnum<{
49
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
50
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
51
+ }>;
52
+ severity: z.ZodEnum<{
53
+ high: "high";
54
+ low: "low";
55
+ medium: "medium";
56
+ }>;
57
+ service_key: z.ZodString;
58
+ service_name: z.ZodEnum<{
59
+ Indexing: "Indexing";
60
+ Ranking: "Ranking";
61
+ Serving: "Serving";
62
+ }>;
63
+ affected_products: z.ZodArray<z.ZodObject<{
64
+ title: z.ZodString;
65
+ id: z.ZodString;
66
+ }, z.core.$strip>>;
67
+ uri: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ export type IncidentSchemaType = z.infer<typeof incidentSchema>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.incidentSchema = exports.updateSchema = exports.getReport = void 0;
4
+ const axios_1 = require("../axios");
5
+ const v4_1 = require("zod/v4");
6
+ /**
7
+ * https://status.search.google.com/summary
8
+ */
9
+ const getReport = async () => {
10
+ const url = "https://status.search.google.com/incidents.json";
11
+ const apiResponse = await (0, axios_1.get)(url);
12
+ if (apiResponse.isSuccess()) {
13
+ return apiResponse.getBody();
14
+ }
15
+ return null;
16
+ };
17
+ exports.getReport = getReport;
18
+ exports.updateSchema = v4_1.z.object({
19
+ created: v4_1.z.string(),
20
+ modified: v4_1.z.string(),
21
+ when: v4_1.z.string(),
22
+ text: v4_1.z.string(),
23
+ status: v4_1.z.enum(["AVAILABLE", "SERVICE_DISRUPTION", "SERVICE_INFORMATION"]),
24
+ });
25
+ exports.incidentSchema = v4_1.z.object({
26
+ id: v4_1.z.string(),
27
+ number: v4_1.z.string(),
28
+ begin: v4_1.z.string(),
29
+ created: v4_1.z.string(),
30
+ end: v4_1.z.string().optional(),
31
+ modified: v4_1.z.string(),
32
+ external_desc: v4_1.z.string(),
33
+ updates: exports.updateSchema.array(),
34
+ most_recent_update: exports.updateSchema,
35
+ status_impact: v4_1.z.enum(["SERVICE_DISRUPTION", "SERVICE_INFORMATION"]),
36
+ severity: v4_1.z.enum(["low", "medium", "high"]),
37
+ service_key: v4_1.z.string(),
38
+ service_name: v4_1.z.enum(["Indexing", "Ranking", "Serving"]),
39
+ affected_products: v4_1.z.object({
40
+ title: v4_1.z.string(),
41
+ id: v4_1.z.string(),
42
+ })
43
+ .array(),
44
+ uri: v4_1.z.string(),
45
+ })
46
+ .array();
@@ -0,0 +1,21 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * https://developers.thegreenwebfoundation.org/api/greencheck/v3/check-single-domain/
4
+ */
5
+ export declare const getSingleReport: (domain: string) => Promise<any>;
6
+ export declare const greenDomainSchema: z.ZodObject<{
7
+ green: z.ZodBoolean;
8
+ url: z.ZodString;
9
+ data: z.ZodOptional<z.ZodBoolean>;
10
+ hosted_by: z.ZodOptional<z.ZodString>;
11
+ hosted_by_website: z.ZodOptional<z.ZodString>;
12
+ partner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ hosted_by_id: z.ZodOptional<z.ZodNumber>;
14
+ modified: z.ZodOptional<z.ZodString>;
15
+ supporting_documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
+ id: z.ZodNumber;
17
+ title: z.ZodString;
18
+ link: z.ZodString;
19
+ }, z.core.$strip>>>;
20
+ }, z.core.$strip>;
21
+ export type GreenDomainSchemaType = z.infer<typeof greenDomainSchema>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.greenDomainSchema = exports.getSingleReport = void 0;
4
+ const axios_1 = require("../axios");
5
+ const v4_1 = require("zod/v4");
6
+ /**
7
+ * https://developers.thegreenwebfoundation.org/api/greencheck/v3/check-single-domain/
8
+ */
9
+ const getSingleReport = async (domain) => {
10
+ const url = `https://api.thegreenwebfoundation.org/greencheck/${domain}`;
11
+ const apiResponse = await (0, axios_1.get)(url);
12
+ if (apiResponse.isSuccess()) {
13
+ return apiResponse.getBody();
14
+ }
15
+ return null;
16
+ };
17
+ exports.getSingleReport = getSingleReport;
18
+ exports.greenDomainSchema = v4_1.z.object({
19
+ green: v4_1.z.boolean(),
20
+ url: v4_1.z.string(),
21
+ data: v4_1.z.boolean()
22
+ .optional(),
23
+ hosted_by: v4_1.z.string()
24
+ .optional(),
25
+ hosted_by_website: v4_1.z.string()
26
+ .optional(),
27
+ partner: v4_1.z.string()
28
+ .nullable()
29
+ .optional(),
30
+ hosted_by_id: v4_1.z.number()
31
+ .optional(),
32
+ modified: v4_1.z.string()
33
+ .optional(),
34
+ supporting_documents: v4_1.z.object({
35
+ id: v4_1.z.number(),
36
+ title: v4_1.z.string(),
37
+ link: v4_1.z.string(),
38
+ })
39
+ .array()
40
+ .optional(),
41
+ });
@@ -0,0 +1,6 @@
1
+ export declare enum InngestState {
2
+ RUNNING = "Running",
3
+ COMPLETED = "Completed",
4
+ FAILED = "Failed",
5
+ CANCELLED = "Cancelled"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InngestState = void 0;
4
+ var InngestState;
5
+ (function (InngestState) {
6
+ InngestState["RUNNING"] = "Running";
7
+ InngestState["COMPLETED"] = "Completed";
8
+ InngestState["FAILED"] = "Failed";
9
+ InngestState["CANCELLED"] = "Cancelled";
10
+ })(InngestState || (exports.InngestState = InngestState = {}));
@@ -0,0 +1 @@
1
+ export declare const getJsonNewline: (data: any) => string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getJsonNewline = void 0;
4
+ const array_1 = require("../array");
5
+ const getJsonNewline = (data) => {
6
+ // Must be an array
7
+ const inputArray = (0, array_1.getArray)(data);
8
+ // For each array row convert the row
9
+ const stringRows = inputArray.map(row => JSON.stringify(row));
10
+ // Combine each row with a line separator
11
+ return stringRows.join("\n");
12
+ };
13
+ exports.getJsonNewline = getJsonNewline;
@@ -0,0 +1,2 @@
1
+ export { getJsonNewline } from "./getJsonNewline";
2
+ export { isJson } from "./isJson";
package/json/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isJson = exports.getJsonNewline = void 0;
4
+ var getJsonNewline_1 = require("./getJsonNewline");
5
+ Object.defineProperty(exports, "getJsonNewline", { enumerable: true, get: function () { return getJsonNewline_1.getJsonNewline; } });
6
+ var isJson_1 = require("./isJson");
7
+ Object.defineProperty(exports, "isJson", { enumerable: true, get: function () { return isJson_1.isJson; } });
@@ -0,0 +1 @@
1
+ export declare const isJson: (input: any) => boolean;
package/json/isJson.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isJson = void 0;
4
+ const isJson = (input) => {
5
+ // If input is already an object/array/primitive that's not a string,
6
+ // it's considered valid JSON if it can be stringified and re-parsed
7
+ if (typeof input !== "string") {
8
+ try {
9
+ const stringified = JSON.stringify(input);
10
+ JSON.parse(stringified);
11
+ return true;
12
+ }
13
+ catch (e) {
14
+ return false;
15
+ }
16
+ }
17
+ // For string inputs, try to parse them as JSON
18
+ try {
19
+ const parsed = JSON.parse(input);
20
+ return true;
21
+ }
22
+ catch (e) {
23
+ return false;
24
+ }
25
+ };
26
+ exports.isJson = isJson;
@@ -0,0 +1,11 @@
1
+ import { BaseNamespace } from "../_class";
2
+ import { LittleWardenConfig } from "./index";
3
+ /**
4
+ * Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
5
+ */
6
+ export declare class LittleWardenNamespace extends BaseNamespace {
7
+ client: boolean | null;
8
+ config: LittleWardenConfig;
9
+ ensureInit: () => Promise<void>;
10
+ getReport: (urlId: string) => Promise<any>;
11
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LittleWardenNamespace = void 0;
4
+ const _class_1 = require("../_class");
5
+ const axios_1 = require("../axios");
6
+ /**
7
+ * Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
8
+ */
9
+ class LittleWardenNamespace extends _class_1.BaseNamespace {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.client = null;
13
+ this.ensureInit = async () => {
14
+ if (!this.client) {
15
+ try {
16
+ // There is not API client but potentially multiple keys to manage instances
17
+ this.client = true;
18
+ }
19
+ catch (e) {
20
+ throw new Error("Google PageSpeed Client not installed");
21
+ }
22
+ }
23
+ };
24
+ this.getReport = async (urlId) => {
25
+ const url = `https://littlewarden.com/api/sites/${urlId}`;
26
+ const apiResponse = await (0, axios_1.get)(url, {
27
+ headers: {
28
+ "Authorization": `Token token="${this.config.apiKey}"`,
29
+ },
30
+ });
31
+ if (apiResponse.isSuccess()) {
32
+ return apiResponse.getBody();
33
+ }
34
+ return null;
35
+ };
36
+ }
37
+ }
38
+ exports.LittleWardenNamespace = LittleWardenNamespace;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Get the URL Status for a given URL ID from Little Warden.
3
+ */
4
+ export declare const getUrlStatus: (apiKey: string, urlId: string) => Promise<any>;