@8ms/helpers 2.2.26 → 2.3.3

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 (242) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/_class/index.d.ts +2 -2
  3. package/_class/index.js +2 -2
  4. package/adverity/adverity.d.ts +112 -0
  5. package/adverity/adverity.js +58 -0
  6. package/adverity/index.d.ts +1 -112
  7. package/adverity/index.js +1 -58
  8. package/adverity/server/index.d.ts +1 -1
  9. package/adverity/server/index.js +1 -1
  10. package/api/ApiResponseClass.d.ts +1 -1
  11. package/api/ApiResponseClass.js +12 -12
  12. package/api/{types.d.ts → api.d.ts} +2 -2
  13. package/api/{types.js → api.js} +2 -2
  14. package/api/functions.d.ts +1 -1
  15. package/api/functions.js +7 -7
  16. package/api/index.d.ts +1 -1
  17. package/api/index.js +1 -1
  18. package/array/array.d.ts +8 -0
  19. package/array/array.js +9 -0
  20. package/array/index.d.ts +1 -8
  21. package/array/index.js +1 -9
  22. package/atInternet/atInternet.d.ts +16 -0
  23. package/atInternet/atInternet.js +15 -0
  24. package/atInternet/index.d.ts +1 -16
  25. package/atInternet/index.js +1 -15
  26. package/aws/ec2/server/awsEc2.d.ts +3 -0
  27. package/aws/ec2/server/awsEc2.js +12 -0
  28. package/aws/ec2/server/index.d.ts +2 -3
  29. package/aws/ec2/server/index.js +2 -12
  30. package/aws/ecs/server/awsEcs.d.ts +3 -0
  31. package/aws/ecs/server/awsEcs.js +12 -0
  32. package/aws/ecs/server/index.d.ts +2 -3
  33. package/aws/ecs/server/index.js +2 -12
  34. package/aws/glue/server/awsGlue.d.ts +3 -0
  35. package/aws/glue/server/awsGlue.js +12 -0
  36. package/aws/glue/server/index.d.ts +2 -3
  37. package/aws/glue/server/index.js +2 -12
  38. package/aws/lambda/server/awsLambda.d.ts +4 -0
  39. package/aws/lambda/server/awsLambda.js +16 -0
  40. package/aws/lambda/server/index.d.ts +2 -4
  41. package/aws/lambda/server/index.js +2 -16
  42. package/aws/s3/server/awsS3.d.ts +13 -0
  43. package/aws/s3/server/awsS3.js +20 -0
  44. package/aws/s3/server/index.d.ts +3 -13
  45. package/aws/s3/server/index.js +3 -20
  46. package/aws/server/aws.d.ts +9 -0
  47. package/aws/server/aws.js +29 -0
  48. package/aws/server/index.d.ts +2 -9
  49. package/aws/server/index.js +2 -29
  50. package/aws/ses/server/awsSes.d.ts +4 -0
  51. package/aws/ses/server/awsSes.js +13 -0
  52. package/aws/ses/server/index.d.ts +3 -4
  53. package/aws/ses/server/index.js +3 -13
  54. package/aws/sqs/server/awsSqs.d.ts +3 -0
  55. package/aws/sqs/server/awsSqs.js +12 -0
  56. package/aws/sqs/server/index.d.ts +2 -3
  57. package/aws/sqs/server/index.js +2 -12
  58. package/aws/ssm/server/awsSsm.d.ts +3 -0
  59. package/aws/ssm/server/awsSsm.js +12 -0
  60. package/aws/ssm/server/index.d.ts +2 -3
  61. package/aws/ssm/server/index.js +2 -12
  62. package/axios/index.d.ts +3 -3
  63. package/axios/index.js +3 -3
  64. package/boolean/boolean.d.ts +4 -0
  65. package/boolean/boolean.js +16 -0
  66. package/boolean/index.d.ts +1 -4
  67. package/boolean/index.js +1 -16
  68. package/brightData/serpApi/server/brightDataSerpApi.d.ts +10 -0
  69. package/brightData/serpApi/server/brightDataSerpApi.js +9 -0
  70. package/brightData/serpApi/server/getAsyncRequestId.js +2 -2
  71. package/brightData/serpApi/server/index.d.ts +6 -15
  72. package/brightData/serpApi/server/index.js +6 -14
  73. package/brightData/server/brightData.d.ts +15 -0
  74. package/brightData/server/brightData.js +15 -0
  75. package/brightData/server/index.d.ts +1 -15
  76. package/brightData/server/index.js +1 -15
  77. package/brightData/webScraperIde/server/getRealtime.js +5 -5
  78. package/brightData/webScraperIde/server/index.d.ts +2 -2
  79. package/brightData/webScraperIde/server/index.js +2 -2
  80. package/cache/server/cache.d.ts +7 -0
  81. package/cache/server/cache.js +43 -0
  82. package/cache/server/index.d.ts +1 -7
  83. package/cache/server/index.js +1 -43
  84. package/crud/crud.d.ts +7 -0
  85. package/crud/crud.js +6 -0
  86. package/crud/index.d.ts +1 -7
  87. package/crud/index.js +1 -6
  88. package/crypto/index.d.ts +4 -4
  89. package/crypto/index.js +4 -4
  90. package/date/calculation.d.ts +4 -1
  91. package/date/calculation.js +3 -0
  92. package/date/{type.d.ts → date.d.ts} +2 -2
  93. package/date/{type.js → date.js} +1 -1
  94. package/date/financialYear.d.ts +2 -2
  95. package/date/financialYear.js +1 -1
  96. package/date/format.d.ts +1 -1
  97. package/date/index.d.ts +1 -1
  98. package/date/index.js +1 -1
  99. package/environment/environment.d.ts +34 -0
  100. package/environment/environment.js +79 -0
  101. package/environment/index.d.ts +1 -34
  102. package/environment/index.js +1 -79
  103. package/eskimi/eskimi.d.ts +49 -0
  104. package/eskimi/eskimi.js +93 -0
  105. package/eskimi/index.d.ts +1 -49
  106. package/eskimi/index.js +1 -93
  107. package/file/getFileKey.js +2 -2
  108. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +41 -0
  109. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +55 -0
  110. package/googleAds/keywordPlanner/server/index.d.ts +1 -41
  111. package/googleAds/keywordPlanner/server/index.js +1 -55
  112. package/googleAds/server/GoogleAdsNamespace.js +1 -2
  113. package/googleAds/server/googleAds.d.ts +11 -0
  114. package/googleAds/server/googleAds.js +26 -0
  115. package/googleAds/server/index.d.ts +2 -11
  116. package/googleAds/server/index.js +2 -26
  117. package/{google/bigquery/server/GoogleBigqueryNamespace.d.ts → googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts} +1 -1
  118. package/{google/bigquery/server/GoogleBigqueryNamespace.js → googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js} +1 -1
  119. package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +5 -0
  120. package/{google/bigquery/server/index.js → googleCloud/bigquery/server/googleCloudBigquery.js} +7 -8
  121. package/googleCloud/bigquery/server/index.d.ts +3 -0
  122. package/googleCloud/bigquery/server/index.js +3 -0
  123. package/{google → googleCloud}/bigquery/server/loadData.d.ts +3 -3
  124. package/{google → googleCloud}/bigquery/server/loadData.js +3 -3
  125. package/googleCloud/server/index.d.ts +1 -0
  126. package/googleCloud/server/index.js +1 -0
  127. package/{google/sheets/server/GoogleSheetsNamespace.d.ts → googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts} +1 -1
  128. package/{google/sheets/server/GoogleSheetsNamespace.js → googleCloud/sheets/server/GoogleCloudSheetsNamespace.js} +1 -1
  129. package/googleCloud/sheets/server/index.d.ts +1 -0
  130. package/googleCloud/sheets/server/index.js +1 -0
  131. package/googleCloud/storage/server/index.d.ts +2 -0
  132. package/googleCloud/storage/server/index.js +2 -0
  133. package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +1 -1
  134. package/googlePageSpeed/server/GooglePageSpeedNamespace.js +3 -3
  135. package/googlePageSpeed/server/googlePageSpeed.d.ts +19 -0
  136. package/googlePageSpeed/server/googlePageSpeed.js +38 -0
  137. package/googlePageSpeed/server/index.d.ts +2 -19
  138. package/googlePageSpeed/server/index.js +2 -38
  139. package/googleSearchIncidents/server/googleSearchIncidents.d.ts +69 -0
  140. package/googleSearchIncidents/server/googleSearchIncidents.js +42 -0
  141. package/googleSearchIncidents/server/index.d.ts +1 -69
  142. package/googleSearchIncidents/server/index.js +1 -42
  143. package/greenDomain/server/greenDomain.d.ts +21 -0
  144. package/greenDomain/server/greenDomain.js +37 -0
  145. package/greenDomain/server/index.d.ts +1 -21
  146. package/greenDomain/server/index.js +1 -37
  147. package/inngest/index.d.ts +1 -7
  148. package/inngest/index.js +1 -6
  149. package/inngest/inngest.d.ts +7 -0
  150. package/inngest/inngest.js +6 -0
  151. package/littleWarden/server/index.d.ts +2 -30
  152. package/littleWarden/server/index.js +2 -65
  153. package/littleWarden/server/littleWarden.d.ts +30 -0
  154. package/littleWarden/server/littleWarden.js +65 -0
  155. package/lumar/api/server/buildRequest.d.ts +3 -3
  156. package/lumar/api/server/buildRequest.js +15 -15
  157. package/lumar/api/server/index.d.ts +1 -33
  158. package/lumar/api/server/index.js +1 -24
  159. package/lumar/api/server/lumarApi.d.ts +36 -0
  160. package/lumar/api/server/lumarApi.js +24 -0
  161. package/lumar/graphql/server/columns.d.ts +28 -27
  162. package/lumar/graphql/server/columns.js +1 -1
  163. package/lumar/graphql/server/getData.js +1 -2
  164. package/lumar/graphql/server/index.d.ts +11 -29
  165. package/lumar/graphql/server/index.js +11 -31
  166. package/lumar/graphql/server/lumarGraphql.d.ts +27 -0
  167. package/lumar/graphql/server/lumarGraphql.js +27 -0
  168. package/lumar/graphql/server/queries/getReportDifferences.d.ts +1 -1
  169. package/lumar/graphql/server/queries/getReportDifferences.js +2 -2
  170. package/lumar/graphql/server/reportTemplates.d.ts +67 -66
  171. package/lumar/graphql/server/reportTemplates.js +1 -1
  172. package/myTarget/server/index.d.ts +1 -5
  173. package/myTarget/server/index.js +1 -13
  174. package/myTarget/server/myTarget.d.ts +5 -0
  175. package/myTarget/server/myTarget.js +13 -0
  176. package/nextAuth/index.d.ts +2 -7
  177. package/nextAuth/index.js +2 -6
  178. package/nextAuth/nextAuth.d.ts +7 -0
  179. package/nextAuth/nextAuth.js +6 -0
  180. package/nextJs/index.d.ts +1 -12
  181. package/nextJs/index.js +1 -14
  182. package/nextJs/nextJs.d.ts +12 -0
  183. package/nextJs/nextJs.js +8 -0
  184. package/onePassword/server/index.d.ts +2 -7
  185. package/onePassword/server/index.js +2 -21
  186. package/onePassword/server/onePassword.d.ts +8 -0
  187. package/onePassword/server/onePassword.js +21 -0
  188. package/openAi/server/index.d.ts +2 -5
  189. package/openAi/server/index.js +2 -26
  190. package/openAi/server/openAi.d.ts +6 -0
  191. package/openAi/server/openAi.js +26 -0
  192. package/package.json +65 -65
  193. package/prisma/server/index.d.ts +2 -20
  194. package/prisma/server/index.js +2 -26
  195. package/prisma/server/prisma.d.ts +20 -0
  196. package/prisma/server/prisma.js +26 -0
  197. package/snapchat/server/index.d.ts +2 -7
  198. package/snapchat/server/index.js +2 -26
  199. package/snapchat/server/snapchat.d.ts +7 -0
  200. package/snapchat/server/snapchat.js +26 -0
  201. package/sorting/index.d.ts +1 -4
  202. package/sorting/index.js +1 -4
  203. package/sorting/sorting.d.ts +4 -0
  204. package/sorting/sorting.js +4 -0
  205. package/stream/server/index.d.ts +1 -1
  206. package/stream/server/index.js +1 -1
  207. package/string/index.d.ts +13 -12
  208. package/string/index.js +13 -12
  209. package/swr/client/index.d.ts +1 -42
  210. package/swr/client/index.js +1 -50
  211. package/swr/client/swr.d.ts +42 -0
  212. package/swr/client/swr.js +50 -0
  213. package/upTimeRobot/server/index.d.ts +2 -38
  214. package/upTimeRobot/server/index.js +2 -59
  215. package/upTimeRobot/server/upTimeRobot.d.ts +38 -0
  216. package/upTimeRobot/server/upTimeRobot.js +59 -0
  217. package/url/index.d.ts +1 -26
  218. package/url/index.js +1 -59
  219. package/url/server/index.d.ts +1 -1
  220. package/url/server/index.js +1 -1
  221. package/url/url.d.ts +26 -0
  222. package/url/url.js +59 -0
  223. package/util/index.d.ts +7 -7
  224. package/util/index.js +7 -7
  225. package/util/isUndefined.js +2 -2
  226. package/util/server/index.d.ts +4 -4
  227. package/util/server/index.js +4 -4
  228. package/webWorker/index.d.ts +1 -8
  229. package/webWorker/index.js +1 -7
  230. package/webWorker/webWorker.d.ts +8 -0
  231. package/webWorker/webWorker.js +7 -0
  232. package/google/bigquery/server/index.d.ts +0 -6
  233. package/google/sheets/server/index.d.ts +0 -8
  234. package/google/sheets/server/index.js +0 -42
  235. /package/{google/server/index.d.ts → googleCloud/server/googleCloud.d.ts} +0 -0
  236. /package/{google/server/index.js → googleCloud/server/googleCloud.js} +0 -0
  237. /package/{google → googleCloud}/sheets/server/getAssociatedData.d.ts +0 -0
  238. /package/{google → googleCloud}/sheets/server/getAssociatedData.js +0 -0
  239. /package/{google → googleCloud}/storage/server/GoogleCloudStorageNamespace.d.ts +0 -0
  240. /package/{google → googleCloud}/storage/server/GoogleCloudStorageNamespace.js +0 -0
  241. /package/{google/storage/server/index.d.ts → googleCloud/storage/server/googleCloudStorage.d.ts} +0 -0
  242. /package/{google/storage/server/index.js → googleCloud/storage/server/googleCloudStorage.js} +0 -0
@@ -1,12 +1,2 @@
1
- import { AwsEc2Namespace } from "./AwsEc2Namespace";
2
- import { getConfig } from "../../server";
3
- const awsEc2Namespaces = new Map();
4
- export const awsEc2Client = async (key = "default", config, vaultId, itemId) => {
5
- if (awsEc2Namespaces.has(key)) {
6
- return awsEc2Namespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsEc2Namespace(key, instanceConfig);
10
- awsEc2Namespaces.set(key, namespace);
11
- return namespace;
12
- };
1
+ export * from "./awsEc2";
2
+ export * from "./AwsEc2Namespace";
@@ -0,0 +1,3 @@
1
+ import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsEcsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsEcsNamespace>;
@@ -0,0 +1,12 @@
1
+ import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsEcsNamespaces = new Map();
4
+ export const awsEcsClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsEcsNamespaces.has(key)) {
6
+ return awsEcsNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsEcsNamespace(key, instanceConfig);
10
+ awsEcsNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
@@ -1,3 +1,2 @@
1
- import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsEcsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsEcsNamespace>;
1
+ export * from "./awsEcs";
2
+ export * from "./AwsEcsNamespace";
@@ -1,12 +1,2 @@
1
- import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
- import { getConfig } from "../../server";
3
- const awsEcsNamespaces = new Map();
4
- export const awsEcsClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsEcsNamespaces.has(key)) {
6
- return awsEcsNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsEcsNamespace(key, instanceConfig);
10
- awsEcsNamespaces.set(key, namespace);
11
- return namespace;
12
- };
1
+ export * from "./awsEcs";
2
+ export * from "./AwsEcsNamespace";
@@ -0,0 +1,3 @@
1
+ import { AwsGlueNamespace } from "./AwsGlueNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsGlueClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsGlueNamespace>;
@@ -0,0 +1,12 @@
1
+ import { AwsGlueNamespace } from "./AwsGlueNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsGlueNamespaces = new Map();
4
+ export const awsGlueClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsGlueNamespaces.has(key)) {
6
+ return awsGlueNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsGlueNamespace(key, instanceConfig);
10
+ awsGlueNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
@@ -1,3 +1,2 @@
1
- import { AwsGlueNamespace } from "./AwsGlueNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsGlueClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsGlueNamespace>;
1
+ export * from "./awsGlue";
2
+ export * from "./AwsGlueNamespace";
@@ -1,12 +1,2 @@
1
- import { AwsGlueNamespace } from "./AwsGlueNamespace";
2
- import { getConfig } from "../../server";
3
- const awsGlueNamespaces = new Map();
4
- export const awsGlueClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsGlueNamespaces.has(key)) {
6
- return awsGlueNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsGlueNamespace(key, instanceConfig);
10
- awsGlueNamespaces.set(key, namespace);
11
- return namespace;
12
- };
1
+ export * from "./awsGlue";
2
+ export * from "./AwsGlueNamespace";
@@ -0,0 +1,4 @@
1
+ import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsLambdaClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsLambdaNamespace>;
4
+ export declare const getHandlerPath: (input: string) => string;
@@ -0,0 +1,16 @@
1
+ import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsLambdaNamespaces = new Map();
4
+ export const awsLambdaClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsLambdaNamespaces.has(key)) {
6
+ return awsLambdaNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsLambdaNamespace(key, instanceConfig);
10
+ awsLambdaNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
13
+ export const getHandlerPath = (input) => {
14
+ return `${input.split(process.cwd())[1].substring(1)
15
+ .replace(/\\/g, "/")}`;
16
+ };
@@ -1,4 +1,2 @@
1
- import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsLambdaClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsLambdaNamespace>;
4
- export declare const getHandlerPath: (input: string) => string;
1
+ export * from "./awsLambda";
2
+ export * from "./AwsLambdaNamespace";
@@ -1,16 +1,2 @@
1
- import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
2
- import { getConfig } from "../../server";
3
- const awsLambdaNamespaces = new Map();
4
- export const awsLambdaClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsLambdaNamespaces.has(key)) {
6
- return awsLambdaNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsLambdaNamespace(key, instanceConfig);
10
- awsLambdaNamespaces.set(key, namespace);
11
- return namespace;
12
- };
13
- export const getHandlerPath = (input) => {
14
- return `${input.split(process.cwd())[1].substring(1)
15
- .replace(/\\/g, "/")}`;
16
- };
1
+ export * from "./awsLambda";
2
+ export * from "./AwsLambdaNamespace";
@@ -0,0 +1,13 @@
1
+ import { AwsS3Namespace } from "./AwsS3Namespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsS3Client: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsS3Namespace>;
4
+ export type Modified = {
5
+ now: number;
6
+ modified: string;
7
+ };
8
+ export type ReadFileResponse = Modified & {
9
+ body: any;
10
+ error: any;
11
+ };
12
+ export declare const readFileDefault: ReadFileResponse;
13
+ export { payloadSchema, PayloadSchemaType } from "./payload";
@@ -0,0 +1,20 @@
1
+ import { AwsS3Namespace } from "./AwsS3Namespace";
2
+ import { getConfig } from "../../server";
3
+ import { defaultDateTime } from "../../../date";
4
+ const awsS3Namespaces = new Map();
5
+ export const awsS3Client = async (key = "default", config, vaultId, itemId) => {
6
+ if (awsS3Namespaces.has(key)) {
7
+ return awsS3Namespaces.get(key);
8
+ }
9
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
10
+ const namespace = new AwsS3Namespace(key, instanceConfig);
11
+ awsS3Namespaces.set(key, namespace);
12
+ return namespace;
13
+ };
14
+ export const readFileDefault = {
15
+ body: undefined,
16
+ now: undefined,
17
+ error: undefined,
18
+ modified: defaultDateTime,
19
+ };
20
+ export { payloadSchema } from "./payload";
@@ -1,13 +1,3 @@
1
- import { AwsS3Namespace } from "./AwsS3Namespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsS3Client: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsS3Namespace>;
4
- export type Modified = {
5
- now: number;
6
- modified: string;
7
- };
8
- export type ReadFileResponse = Modified & {
9
- body: any;
10
- error: any;
11
- };
12
- export declare const readFileDefault: ReadFileResponse;
13
- export { payloadSchema, PayloadSchemaType } from "./payload";
1
+ export * from "./awsS3";
2
+ export * from "./AwsS3Namespace";
3
+ export * from "./payload";
@@ -1,20 +1,3 @@
1
- import { AwsS3Namespace } from "./AwsS3Namespace";
2
- import { getConfig } from "../../server";
3
- import { defaultDateTime } from "../../../date";
4
- const awsS3Namespaces = new Map();
5
- export const awsS3Client = async (key = "default", config, vaultId, itemId) => {
6
- if (awsS3Namespaces.has(key)) {
7
- return awsS3Namespaces.get(key);
8
- }
9
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
10
- const namespace = new AwsS3Namespace(key, instanceConfig);
11
- awsS3Namespaces.set(key, namespace);
12
- return namespace;
13
- };
14
- export const readFileDefault = {
15
- body: undefined,
16
- now: undefined,
17
- error: undefined,
18
- modified: defaultDateTime,
19
- };
20
- export { payloadSchema } from "./payload";
1
+ export * from "./awsS3";
2
+ export * from "./AwsS3Namespace";
3
+ export * from "./payload";
@@ -0,0 +1,9 @@
1
+ export type AwsConfig = {
2
+ region: string;
3
+ credentials: {
4
+ accessKeyId: string;
5
+ secretAccessKey: string;
6
+ };
7
+ };
8
+ export declare const getConfig: (key: any, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsConfig>;
9
+ export { isResponse200 } from "./isResponse200";
@@ -0,0 +1,29 @@
1
+ import { onePasswordClient } from "../../onePassword/server";
2
+ export const getConfig = async (key, config, vaultId, itemId) => {
3
+ let response;
4
+ if (config) {
5
+ response = config;
6
+ }
7
+ else if (vaultId && itemId) {
8
+ response = await (await onePasswordClient())
9
+ .getJsonNote(vaultId, itemId);
10
+ }
11
+ else if (process.env.AWS_VAULT_ID && process.env.AWS_ITEM_ID) {
12
+ response = await (await onePasswordClient())
13
+ .getJsonNote(process.env.AWS_VAULT_ID, process.env.AWS_ITEM_ID);
14
+ }
15
+ else if (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_REGION && process.env.AWS_SECRET_ACCESS_KEY) {
16
+ response = {
17
+ region: process.env.AWS_REGION,
18
+ credentials: {
19
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID,
20
+ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
21
+ }
22
+ };
23
+ }
24
+ else {
25
+ throw new Error(`Config required for namespace '${key}'`);
26
+ }
27
+ return response;
28
+ };
29
+ export { isResponse200 } from "./isResponse200";
@@ -1,9 +1,2 @@
1
- export type AwsConfig = {
2
- region: string;
3
- credentials: {
4
- accessKeyId: string;
5
- secretAccessKey: string;
6
- };
7
- };
8
- export declare const getConfig: (key: any, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsConfig>;
9
- export { isResponse200 } from "./isResponse200";
1
+ export * from "./aws";
2
+ export * from "./isResponse200";
@@ -1,29 +1,2 @@
1
- import { onePasswordClient } from "../../onePassword/server";
2
- export const getConfig = async (key, config, vaultId, itemId) => {
3
- let response;
4
- if (config) {
5
- response = config;
6
- }
7
- else if (vaultId && itemId) {
8
- response = await (await onePasswordClient())
9
- .getJsonNote(vaultId, itemId);
10
- }
11
- else if (process.env.AWS_VAULT_ID && process.env.AWS_ITEM_ID) {
12
- response = await (await onePasswordClient())
13
- .getJsonNote(process.env.AWS_VAULT_ID, process.env.AWS_ITEM_ID);
14
- }
15
- else if (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_REGION && process.env.AWS_SECRET_ACCESS_KEY) {
16
- response = {
17
- region: process.env.AWS_REGION,
18
- credentials: {
19
- accessKeyId: process.env.AWS_ACCESS_KEY_ID,
20
- secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
21
- }
22
- };
23
- }
24
- else {
25
- throw new Error(`Config required for namespace '${key}'`);
26
- }
27
- return response;
28
- };
29
- export { isResponse200 } from "./isResponse200";
1
+ export * from "./aws";
2
+ export * from "./isResponse200";
@@ -0,0 +1,4 @@
1
+ import { AwsSesNamespace } from "./AwsSesNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
4
+ export { SimpleEmail } from "./SimpleEmail";
@@ -0,0 +1,13 @@
1
+ import { AwsSesNamespace } from "./AwsSesNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsSesNamespaces = new Map();
4
+ export const awsSesClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsSesNamespaces.has(key)) {
6
+ return awsSesNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsSesNamespace(key, instanceConfig);
10
+ awsSesNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
13
+ export { SimpleEmail } from "./SimpleEmail";
@@ -1,4 +1,3 @@
1
- import { AwsSesNamespace } from "./AwsSesNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
4
- export { SimpleEmail } from "./SimpleEmail";
1
+ export * from "./awsSes";
2
+ export * from "./AwsSesNamespace";
3
+ export * from "./SimpleEmail";
@@ -1,13 +1,3 @@
1
- import { AwsSesNamespace } from "./AwsSesNamespace";
2
- import { getConfig } from "../../server";
3
- const awsSesNamespaces = new Map();
4
- export const awsSesClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsSesNamespaces.has(key)) {
6
- return awsSesNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsSesNamespace(key, instanceConfig);
10
- awsSesNamespaces.set(key, namespace);
11
- return namespace;
12
- };
13
- export { SimpleEmail } from "./SimpleEmail";
1
+ export * from "./awsSes";
2
+ export * from "./AwsSesNamespace";
3
+ export * from "./SimpleEmail";
@@ -0,0 +1,3 @@
1
+ import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsSqsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSqsNamespace>;
@@ -0,0 +1,12 @@
1
+ import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsSqsNamespaces = new Map();
4
+ export const awsSqsClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsSqsNamespaces.has(key)) {
6
+ return awsSqsNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsSqsNamespace(key, instanceConfig);
10
+ awsSqsNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
@@ -1,3 +1,2 @@
1
- import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsSqsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSqsNamespace>;
1
+ export * from "./awsSqs";
2
+ export * from "./AwsSqsNamespace";
@@ -1,12 +1,2 @@
1
- import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
- import { getConfig } from "../../server";
3
- const awsSqsNamespaces = new Map();
4
- export const awsSqsClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsSqsNamespaces.has(key)) {
6
- return awsSqsNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsSqsNamespace(key, instanceConfig);
10
- awsSqsNamespaces.set(key, namespace);
11
- return namespace;
12
- };
1
+ export * from "./awsSqs";
2
+ export * from "./AwsSqsNamespace";
@@ -0,0 +1,3 @@
1
+ import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
+ import { AwsConfig } from "../../server";
3
+ export declare const awsSsmClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSsmNamespace>;
@@ -0,0 +1,12 @@
1
+ import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
+ import { getConfig } from "../../server";
3
+ const awsSsmNamespaces = new Map();
4
+ export const awsSsmClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (awsSsmNamespaces.has(key)) {
6
+ return awsSsmNamespaces.get(key);
7
+ }
8
+ const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
+ const namespace = new AwsSsmNamespace(key, instanceConfig);
10
+ awsSsmNamespaces.set(key, namespace);
11
+ return namespace;
12
+ };
@@ -1,3 +1,2 @@
1
- import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
- import { AwsConfig } from "../../server";
3
- export declare const awsSsmClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSsmNamespace>;
1
+ export * from "./awsSsm";
2
+ export * from "./AwsSsmNamespace";
@@ -1,12 +1,2 @@
1
- import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
- import { getConfig } from "../../server";
3
- const awsSsmNamespaces = new Map();
4
- export const awsSsmClient = async (key = "default", config, vaultId, itemId) => {
5
- if (awsSsmNamespaces.has(key)) {
6
- return awsSsmNamespaces.get(key);
7
- }
8
- const instanceConfig = await getConfig(key, config, vaultId, itemId);
9
- const namespace = new AwsSsmNamespace(key, instanceConfig);
10
- awsSsmNamespaces.set(key, namespace);
11
- return namespace;
12
- };
1
+ export * from "./awsSsm";
2
+ export * from "./AwsSsmNamespace";
package/axios/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { get } from "./get";
2
- export { post } from "./post";
3
- export { deleteRequest } from "./deleteRequest";
1
+ export * from "./deleteRequest";
2
+ export * from "./get";
3
+ export * from "./post";
package/axios/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { get } from "./get";
2
- export { post } from "./post";
3
- export { deleteRequest } from "./deleteRequest";
1
+ export * from "./deleteRequest";
2
+ export * from "./get";
3
+ export * from "./post";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Convert an input from a variety of forms into boolean.
3
+ */
4
+ export declare const getBoolean: (input: any, defaultValue?: boolean) => boolean;
@@ -0,0 +1,16 @@
1
+ import isBoolean from "lodash/isBoolean";
2
+ /**
3
+ * Convert an input from a variety of forms into boolean.
4
+ */
5
+ export const getBoolean = (input, defaultValue = false) => {
6
+ if (isBoolean(input)) {
7
+ return input;
8
+ }
9
+ else if ("string" === typeof input) {
10
+ return "true" === input || "1" === input || "yes" === input || "y" === input;
11
+ }
12
+ else if ("number" === typeof input) {
13
+ return 1 === input;
14
+ }
15
+ return defaultValue;
16
+ };
@@ -1,4 +1 @@
1
- /**
2
- * Convert an input from a variety of forms into boolean.
3
- */
4
- export declare const getBoolean: (input: any, defaultValue?: boolean) => boolean;
1
+ export * from "./boolean";
package/boolean/index.js CHANGED
@@ -1,16 +1 @@
1
- import isBoolean from "lodash/isBoolean";
2
- /**
3
- * Convert an input from a variety of forms into boolean.
4
- */
5
- export const getBoolean = (input, defaultValue = false) => {
6
- if (isBoolean(input)) {
7
- return input;
8
- }
9
- else if ("string" === typeof input) {
10
- return "true" === input || "1" === input || "yes" === input || "y" === input;
11
- }
12
- else if ("number" === typeof input) {
13
- return 1 === input;
14
- }
15
- return defaultValue;
16
- };
1
+ export * from "./boolean";
@@ -0,0 +1,10 @@
1
+ export declare const brightDataSerpApiType: {
2
+ readonly GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS";
3
+ readonly GOOGLE_HOTELS: "GOOGLE_HOTELS";
4
+ readonly GOOGLE_LENS: "GOOGLE_LENS";
5
+ readonly GOOGLE_MAPS: "GOOGLE_MAPS";
6
+ readonly GOOGLE_REVIEWS: "GOOGLE_REVIEWS";
7
+ readonly GOOGLE_SEARCH: "GOOGLE_SEARCH";
8
+ readonly GOOGLE_TRENDS: "GOOGLE_TRENDS";
9
+ };
10
+ export type BrightDataSerpApiType = typeof brightDataSerpApiType[keyof typeof brightDataSerpApiType];
@@ -0,0 +1,9 @@
1
+ export const brightDataSerpApiType = {
2
+ GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS",
3
+ GOOGLE_HOTELS: "GOOGLE_HOTELS",
4
+ GOOGLE_LENS: "GOOGLE_LENS",
5
+ GOOGLE_MAPS: "GOOGLE_MAPS",
6
+ GOOGLE_REVIEWS: "GOOGLE_REVIEWS",
7
+ GOOGLE_SEARCH: "GOOGLE_SEARCH",
8
+ GOOGLE_TRENDS: "GOOGLE_TRENDS",
9
+ };
@@ -1,6 +1,6 @@
1
1
  import { post } from "../../../axios";
2
2
  import { getCustomerId, getZone } from "../../server";
3
- import { BrightDataSerpApiType } from "../server";
3
+ import { brightDataSerpApiType } from "../server";
4
4
  /**
5
5
  * Make an async request to the SERP API using the Bright Data proxy.
6
6
  * Returns a request ID used with getAsyncResults
@@ -14,7 +14,7 @@ export const getAsyncRequestId = async (auth, data = {}, type) => {
14
14
  const customerId = getCustomerId(auth);
15
15
  const zone = getZone(auth);
16
16
  switch (type) {
17
- case BrightDataSerpApiType.GOOGLE_TRENDS:
17
+ case brightDataSerpApiType.GOOGLE_TRENDS:
18
18
  url = `https://api.brightdata.com/serp/trends?customer=${customerId}&zone=${zone}`;
19
19
  break;
20
20
  default:
@@ -1,15 +1,6 @@
1
- export declare const BrightDataSerpApiType: {
2
- readonly GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS";
3
- readonly GOOGLE_HOTELS: "GOOGLE_HOTELS";
4
- readonly GOOGLE_LENS: "GOOGLE_LENS";
5
- readonly GOOGLE_MAPS: "GOOGLE_MAPS";
6
- readonly GOOGLE_REVIEWS: "GOOGLE_REVIEWS";
7
- readonly GOOGLE_SEARCH: "GOOGLE_SEARCH";
8
- readonly GOOGLE_TRENDS: "GOOGLE_TRENDS";
9
- };
10
- export type BrightDataSerpApiType = typeof BrightDataSerpApiType[keyof typeof BrightDataSerpApiType];
11
- export { buildGoogleSerpUrl } from "./buildGoogleSerpUrl";
12
- export { buildGoogleTrendsUrl } from "./buildGoogleTrendsUrl";
13
- export { getAsyncRequestId } from "./getAsyncRequestId";
14
- export { getAsyncResults } from "./getAsyncResults";
15
- export { getRealtime } from "./getRealtime";
1
+ export * from "./brightDataSerpApi";
2
+ export * from "./buildGoogleSerpUrl";
3
+ export * from "./buildGoogleTrendsUrl";
4
+ export * from "./getAsyncResults";
5
+ export * from "./getAsyncRequestId";
6
+ export * from "./getRealtime";
@@ -1,14 +1,6 @@
1
- export const BrightDataSerpApiType = {
2
- GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS",
3
- GOOGLE_HOTELS: "GOOGLE_HOTELS",
4
- GOOGLE_LENS: "GOOGLE_LENS",
5
- GOOGLE_MAPS: "GOOGLE_MAPS",
6
- GOOGLE_REVIEWS: "GOOGLE_REVIEWS",
7
- GOOGLE_SEARCH: "GOOGLE_SEARCH",
8
- GOOGLE_TRENDS: "GOOGLE_TRENDS",
9
- };
10
- export { buildGoogleSerpUrl } from "./buildGoogleSerpUrl";
11
- export { buildGoogleTrendsUrl } from "./buildGoogleTrendsUrl";
12
- export { getAsyncRequestId } from "./getAsyncRequestId";
13
- export { getAsyncResults } from "./getAsyncResults";
14
- export { getRealtime } from "./getRealtime";
1
+ export * from "./brightDataSerpApi";
2
+ export * from "./buildGoogleSerpUrl";
3
+ export * from "./buildGoogleTrendsUrl";
4
+ export * from "./getAsyncResults";
5
+ export * from "./getAsyncRequestId";
6
+ export * from "./getRealtime";
@@ -0,0 +1,15 @@
1
+ export type Auth = {
2
+ apiKey: string;
3
+ host: string;
4
+ port: string;
5
+ username: string;
6
+ password: string;
7
+ };
8
+ /**
9
+ * Return the Zone based on the username.
10
+ */
11
+ export declare const getZone: (auth: Auth) => string;
12
+ /**
13
+ * Return the customer Id based on the username.
14
+ */
15
+ export declare const getCustomerId: (auth: Auth, prefix?: string) => string;