@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
@@ -0,0 +1,93 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
4
+ */
5
+ export const endpoints = {
6
+ campaign: {
7
+ age: "https://dsp-api.eskimi.com/api/v1/report/ageGroups/get",
8
+ gender: "https://dsp-api.eskimi.com/api/v1/report/genders/get",
9
+ list: "https://dsp-api.eskimi.com/api/v1/campaign/get",
10
+ performance: "https://dsp-api.eskimi.com/api/v1/report/campaigns/get",
11
+ video: "https://dsp-api.eskimi.com/api/v1/report/videoCampaigns/get",
12
+ },
13
+ site: {
14
+ list: "https://dsp-api.eskimi.com/api/v1/report/sites/get",
15
+ },
16
+ };
17
+ const campaignSchema = z.object({
18
+ id: z.number(),
19
+ name: z.string(),
20
+ type: z.number(),
21
+ user_id: z.number(),
22
+ ad_domain: z.string(),
23
+ click_url: z.string(),
24
+ bid: z.string(),
25
+ budget: z.any(),
26
+ dates: z.any(),
27
+ creative_set_ids: z.any(),
28
+ audience_ids: z.any(),
29
+ ad_placement_type_ids: z.any(),
30
+ ad_placement_position_ids: z.any(),
31
+ operator_ids: z.any(),
32
+ devices: z.any(),
33
+ auto_start: z.number(),
34
+ created_at: z.string(),
35
+ });
36
+ export const ageGroups = [
37
+ {
38
+ "id": 0,
39
+ "name": "0-17",
40
+ },
41
+ {
42
+ "id": 1,
43
+ "name": "18-24",
44
+ },
45
+ {
46
+ "id": 2,
47
+ "name": "25-29",
48
+ },
49
+ {
50
+ "id": 3,
51
+ "name": "30-34",
52
+ },
53
+ {
54
+ "id": 4,
55
+ "name": "35-39",
56
+ },
57
+ {
58
+ "id": 5,
59
+ "name": "40-44",
60
+ },
61
+ {
62
+ "id": 6,
63
+ "name": "45-54",
64
+ },
65
+ {
66
+ "id": 7,
67
+ "name": "55-64",
68
+ },
69
+ {
70
+ "id": 8,
71
+ "name": "65+",
72
+ },
73
+ ];
74
+ export const devices = [
75
+ {
76
+ "id": 2,
77
+ "name": "Personal Computer",
78
+ },
79
+ {
80
+ "id": 3,
81
+ "name": "Connected TV",
82
+ },
83
+ ];
84
+ export const genders = [
85
+ {
86
+ "id": 1,
87
+ "name": "Male",
88
+ },
89
+ {
90
+ "id": 2,
91
+ "name": "Female",
92
+ },
93
+ ];
package/eskimi/index.d.ts CHANGED
@@ -1,49 +1 @@
1
- import { z } from "zod/v4";
2
- /**
3
- * https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
4
- */
5
- export declare const endpoints: {
6
- campaign: {
7
- age: string;
8
- gender: string;
9
- list: string;
10
- performance: string;
11
- video: string;
12
- };
13
- site: {
14
- list: string;
15
- };
16
- };
17
- declare const campaignSchema: z.ZodObject<{
18
- id: z.ZodNumber;
19
- name: z.ZodString;
20
- type: z.ZodNumber;
21
- user_id: z.ZodNumber;
22
- ad_domain: z.ZodString;
23
- click_url: z.ZodString;
24
- bid: z.ZodString;
25
- budget: z.ZodAny;
26
- dates: z.ZodAny;
27
- creative_set_ids: z.ZodAny;
28
- audience_ids: z.ZodAny;
29
- ad_placement_type_ids: z.ZodAny;
30
- ad_placement_position_ids: z.ZodAny;
31
- operator_ids: z.ZodAny;
32
- devices: z.ZodAny;
33
- auto_start: z.ZodNumber;
34
- created_at: z.ZodString;
35
- }, z.core.$strip>;
36
- export type CampaignSchemaType = z.infer<typeof campaignSchema>;
37
- export declare const ageGroups: {
38
- id: number;
39
- name: string;
40
- }[];
41
- export declare const devices: {
42
- id: number;
43
- name: string;
44
- }[];
45
- export declare const genders: {
46
- id: number;
47
- name: string;
48
- }[];
49
- export {};
1
+ export * from "./eskimi";
package/eskimi/index.js CHANGED
@@ -1,93 +1 @@
1
- import { z } from "zod/v4";
2
- /**
3
- * https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
4
- */
5
- export const endpoints = {
6
- campaign: {
7
- age: "https://dsp-api.eskimi.com/api/v1/report/ageGroups/get",
8
- gender: "https://dsp-api.eskimi.com/api/v1/report/genders/get",
9
- list: "https://dsp-api.eskimi.com/api/v1/campaign/get",
10
- performance: "https://dsp-api.eskimi.com/api/v1/report/campaigns/get",
11
- video: "https://dsp-api.eskimi.com/api/v1/report/videoCampaigns/get",
12
- },
13
- site: {
14
- list: "https://dsp-api.eskimi.com/api/v1/report/sites/get",
15
- },
16
- };
17
- const campaignSchema = z.object({
18
- id: z.number(),
19
- name: z.string(),
20
- type: z.number(),
21
- user_id: z.number(),
22
- ad_domain: z.string(),
23
- click_url: z.string(),
24
- bid: z.string(),
25
- budget: z.any(),
26
- dates: z.any(),
27
- creative_set_ids: z.any(),
28
- audience_ids: z.any(),
29
- ad_placement_type_ids: z.any(),
30
- ad_placement_position_ids: z.any(),
31
- operator_ids: z.any(),
32
- devices: z.any(),
33
- auto_start: z.number(),
34
- created_at: z.string(),
35
- });
36
- export const ageGroups = [
37
- {
38
- "id": 0,
39
- "name": "0-17",
40
- },
41
- {
42
- "id": 1,
43
- "name": "18-24",
44
- },
45
- {
46
- "id": 2,
47
- "name": "25-29",
48
- },
49
- {
50
- "id": 3,
51
- "name": "30-34",
52
- },
53
- {
54
- "id": 4,
55
- "name": "35-39",
56
- },
57
- {
58
- "id": 5,
59
- "name": "40-44",
60
- },
61
- {
62
- "id": 6,
63
- "name": "45-54",
64
- },
65
- {
66
- "id": 7,
67
- "name": "55-64",
68
- },
69
- {
70
- "id": 8,
71
- "name": "65+",
72
- },
73
- ];
74
- export const devices = [
75
- {
76
- "id": 2,
77
- "name": "Personal Computer",
78
- },
79
- {
80
- "id": 3,
81
- "name": "Connected TV",
82
- },
83
- ];
84
- export const genders = [
85
- {
86
- "id": 1,
87
- "name": "Male",
88
- },
89
- {
90
- "id": 2,
91
- "name": "Female",
92
- },
93
- ];
1
+ export * from "./eskimi";
@@ -1,5 +1,5 @@
1
1
  import { DateTime } from "luxon";
2
- import { format } from "../date";
2
+ import { getYmdString } from "../date";
3
3
  /**
4
4
  * Create a file key from the inputs so it can handle objects/number/etc.
5
5
  */
@@ -13,7 +13,7 @@ export const getFileKey = (inputs) => {
13
13
  response += inputs[i];
14
14
  }
15
15
  else if (inputs[i] instanceof Date || inputs[i] instanceof DateTime) {
16
- response += format(inputs[i], "YYYY-MM-DD");
16
+ response += getYmdString(inputs[i]);
17
17
  }
18
18
  else {
19
19
  response += JSON.stringify(inputs[i]);
@@ -0,0 +1,41 @@
1
+ import { z } from "zod/v4";
2
+ export declare const network: {
3
+ readonly GOOGLE_SEARCH_ONLY: 2;
4
+ readonly GOOGLE_SEARCH_AND_PARTNERS: 3;
5
+ };
6
+ export type Network = typeof network[keyof typeof network];
7
+ export declare const requestSchema: z.ZodObject<{
8
+ countries: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9
+ customerId: z.ZodOptional<z.ZodString>;
10
+ historicalMetricsOptions: z.ZodOptional<z.ZodObject<{
11
+ startMonth: z.ZodString;
12
+ startYear: z.ZodNumber;
13
+ endMonth: z.ZodString;
14
+ endYear: z.ZodNumber;
15
+ }, z.core.$strip>>;
16
+ includeAdultKeywords: z.ZodOptional<z.ZodBoolean>;
17
+ keywordPlanNetwork: z.ZodOptional<z.ZodNumber>;
18
+ queries: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ language: z.ZodOptional<z.ZodNumber>;
20
+ url: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>;
22
+ export type RequestSchemaType = z.infer<typeof requestSchema>;
23
+ export declare const defaultRequest: RequestSchemaType;
24
+ export declare const responseSchema: z.ZodObject<{
25
+ payload: z.ZodObject<{}, z.core.$strip>;
26
+ keyword: z.ZodString;
27
+ avgCpc: z.ZodNumber;
28
+ avgSearchVolume: z.ZodNumber;
29
+ competition: z.ZodNumber;
30
+ competitionIndex: z.ZodNumber;
31
+ months: z.ZodArray<z.ZodObject<{
32
+ date: z.ZodString;
33
+ month: z.ZodNumber;
34
+ searchVolume: z.ZodNumber;
35
+ year: z.ZodNumber;
36
+ }, z.core.$strip>>;
37
+ topOfPageBidHigh: z.ZodNumber;
38
+ topOfPageBidLow: z.ZodNumber;
39
+ totalSearchVolume: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ export type ResponseSchemaType = z.infer<typeof responseSchema>;
@@ -0,0 +1,55 @@
1
+ import { z } from "zod/v4";
2
+ export const network = {
3
+ GOOGLE_SEARCH_ONLY: 2,
4
+ GOOGLE_SEARCH_AND_PARTNERS: 3,
5
+ };
6
+ export const requestSchema = z.object({
7
+ countries: z.array(z.number())
8
+ .optional(),
9
+ customerId: z.string()
10
+ .optional(),
11
+ historicalMetricsOptions: z.object({
12
+ startMonth: z.string(),
13
+ startYear: z.number(),
14
+ endMonth: z.string(),
15
+ endYear: z.number(),
16
+ })
17
+ .optional(),
18
+ includeAdultKeywords: z.boolean()
19
+ .optional(),
20
+ keywordPlanNetwork: z.number()
21
+ .optional(),
22
+ queries: z.array(z.string())
23
+ .optional(),
24
+ language: z.number()
25
+ .optional(),
26
+ url: z.string()
27
+ .optional(),
28
+ });
29
+ export const defaultRequest = {
30
+ countries: [],
31
+ customerId: "",
32
+ historicalMetricsOptions: null,
33
+ includeAdultKeywords: false,
34
+ keywordPlanNetwork: network.GOOGLE_SEARCH_ONLY,
35
+ queries: [],
36
+ language: null,
37
+ };
38
+ export const responseSchema = z.object({
39
+ payload: z.object(),
40
+ keyword: z.string(),
41
+ avgCpc: z.number(),
42
+ avgSearchVolume: z.number(),
43
+ competition: z.number(),
44
+ competitionIndex: z.number(),
45
+ months: z.object({
46
+ date: z.string(),
47
+ month: z.number(),
48
+ searchVolume: z.number(),
49
+ year: z.number(),
50
+ })
51
+ .array(),
52
+ topOfPageBidHigh: z.number(),
53
+ topOfPageBidLow: z.number(),
54
+ totalSearchVolume: z.number(),
55
+ });
@@ -1,41 +1 @@
1
- import { z } from "zod/v4";
2
- export declare const Network: {
3
- readonly GOOGLE_SEARCH_ONLY: 2;
4
- readonly GOOGLE_SEARCH_AND_PARTNERS: 3;
5
- };
6
- export type Network = typeof Network[keyof typeof Network];
7
- export declare const requestSchema: z.ZodObject<{
8
- countries: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9
- customerId: z.ZodOptional<z.ZodString>;
10
- historicalMetricsOptions: z.ZodOptional<z.ZodObject<{
11
- startMonth: z.ZodString;
12
- startYear: z.ZodNumber;
13
- endMonth: z.ZodString;
14
- endYear: z.ZodNumber;
15
- }, z.core.$strip>>;
16
- includeAdultKeywords: z.ZodOptional<z.ZodBoolean>;
17
- keywordPlanNetwork: z.ZodOptional<z.ZodNumber>;
18
- queries: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
- language: z.ZodOptional<z.ZodNumber>;
20
- url: z.ZodOptional<z.ZodString>;
21
- }, z.core.$strip>;
22
- export type RequestSchemaType = z.infer<typeof requestSchema>;
23
- export declare const defaultRequest: RequestSchemaType;
24
- export declare const responseSchema: z.ZodObject<{
25
- payload: z.ZodObject<{}, z.core.$strip>;
26
- keyword: z.ZodString;
27
- avgCpc: z.ZodNumber;
28
- avgSearchVolume: z.ZodNumber;
29
- competition: z.ZodNumber;
30
- competitionIndex: z.ZodNumber;
31
- months: z.ZodArray<z.ZodObject<{
32
- date: z.ZodString;
33
- month: z.ZodNumber;
34
- searchVolume: z.ZodNumber;
35
- year: z.ZodNumber;
36
- }, z.core.$strip>>;
37
- topOfPageBidHigh: z.ZodNumber;
38
- topOfPageBidLow: z.ZodNumber;
39
- totalSearchVolume: z.ZodNumber;
40
- }, z.core.$strip>;
41
- export type ResponseSchemaType = z.infer<typeof responseSchema>;
1
+ export * from "./googleAdsKeywordPlanner";
@@ -1,55 +1 @@
1
- import { z } from "zod/v4";
2
- export const Network = {
3
- GOOGLE_SEARCH_ONLY: 2,
4
- GOOGLE_SEARCH_AND_PARTNERS: 3,
5
- };
6
- export const requestSchema = z.object({
7
- countries: z.array(z.number())
8
- .optional(),
9
- customerId: z.string()
10
- .optional(),
11
- historicalMetricsOptions: z.object({
12
- startMonth: z.string(),
13
- startYear: z.number(),
14
- endMonth: z.string(),
15
- endYear: z.number(),
16
- })
17
- .optional(),
18
- includeAdultKeywords: z.boolean()
19
- .optional(),
20
- keywordPlanNetwork: z.number()
21
- .optional(),
22
- queries: z.array(z.string())
23
- .optional(),
24
- language: z.number()
25
- .optional(),
26
- url: z.string()
27
- .optional(),
28
- });
29
- export const defaultRequest = {
30
- countries: [],
31
- customerId: "",
32
- historicalMetricsOptions: null,
33
- includeAdultKeywords: false,
34
- keywordPlanNetwork: Network.GOOGLE_SEARCH_ONLY,
35
- queries: [],
36
- language: null,
37
- };
38
- export const responseSchema = z.object({
39
- payload: z.object(),
40
- keyword: z.string(),
41
- avgCpc: z.number(),
42
- avgSearchVolume: z.number(),
43
- competition: z.number(),
44
- competitionIndex: z.number(),
45
- months: z.object({
46
- date: z.string(),
47
- month: z.number(),
48
- searchVolume: z.number(),
49
- year: z.number(),
50
- })
51
- .array(),
52
- topOfPageBidHigh: z.number(),
53
- topOfPageBidLow: z.number(),
54
- totalSearchVolume: z.number(),
55
- });
1
+ export * from "./googleAdsKeywordPlanner";
@@ -21,11 +21,10 @@ export class GoogleAdsNamespace extends BaseNamespace {
21
21
  };
22
22
  getCustomer = async (customerId) => {
23
23
  await this.ensureInit();
24
- const customer = this.client.Customer({
24
+ return this.client.Customer({
25
25
  customer_id: customerId,
26
26
  login_customer_id: this.mccAccountId,
27
27
  refresh_token: this.refreshToken,
28
28
  });
29
- return customer;
30
29
  };
31
30
  }
@@ -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,26 @@
1
+ import { GoogleAdsNamespace } from "./GoogleAdsNamespace";
2
+ import { onePasswordClient } from "../../onePassword/server";
3
+ const googleAdsNamespaces = new Map();
4
+ export const googleAdsClient = async (key = "default", config, vaultId, itemId) => {
5
+ if (googleAdsNamespaces.has(key)) {
6
+ return googleAdsNamespaces.get(key);
7
+ }
8
+ let instanceConfig;
9
+ if (config) {
10
+ instanceConfig = config;
11
+ }
12
+ else if (vaultId && itemId) {
13
+ instanceConfig = await (await onePasswordClient())
14
+ .getJsonNote(vaultId, itemId);
15
+ }
16
+ else if (process.env.GOOGLE_ADS_VAULT_ID && process.env.GOOGLE_ADS_ITEM_ID) {
17
+ instanceConfig = await (await onePasswordClient())
18
+ .getJsonNote(process.env.GOOGLE_ADS_VAULT_ID, process.env.GOOGLE_ADS_ITEM_ID);
19
+ }
20
+ else {
21
+ throw new Error(`Config required for namespace '${key}'`);
22
+ }
23
+ const namespace = new GoogleAdsNamespace(key, instanceConfig);
24
+ googleAdsNamespaces.set(key, namespace);
25
+ return namespace;
26
+ };
@@ -1,11 +1,2 @@
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>;
1
+ export * from "./googleAds";
2
+ export * from "./GoogleAdsNamespace";
@@ -1,26 +1,2 @@
1
- import { GoogleAdsNamespace } from "./GoogleAdsNamespace";
2
- import { onePasswordClient } from "../../onePassword/server";
3
- const googleAdsNamespaces = new Map();
4
- export const googleAdsClient = async (key = "default", config, vaultId, itemId) => {
5
- if (googleAdsNamespaces.has(key)) {
6
- return googleAdsNamespaces.get(key);
7
- }
8
- let instanceConfig;
9
- if (config) {
10
- instanceConfig = config;
11
- }
12
- else if (vaultId && itemId) {
13
- instanceConfig = await (await onePasswordClient())
14
- .getJsonNote(vaultId, itemId);
15
- }
16
- else if (process.env.GOOGLE_ADS_VAULT_ID && process.env.GOOGLE_ADS_ITEM_ID) {
17
- instanceConfig = await (await onePasswordClient())
18
- .getJsonNote(process.env.GOOGLE_ADS_VAULT_ID, process.env.GOOGLE_ADS_ITEM_ID);
19
- }
20
- else {
21
- throw new Error(`Config required for namespace '${key}'`);
22
- }
23
- const namespace = new GoogleAdsNamespace(key, instanceConfig);
24
- googleAdsNamespaces.set(key, namespace);
25
- return namespace;
26
- };
1
+ export * from "./googleAds";
2
+ export * from "./GoogleAdsNamespace";
@@ -14,7 +14,7 @@ type Dataset = {
14
14
  type Table = {
15
15
  id: string;
16
16
  };
17
- export declare class GoogleBigqueryNamespace extends BaseNamespace {
17
+ export declare class GoogleCloudBigqueryNamespace extends BaseNamespace {
18
18
  client: BigQuery;
19
19
  config: GoogleCloudConfig & {
20
20
  projectId?: string;
@@ -1,6 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class";
2
2
  import { getConfig } from "../../server";
3
- export class GoogleBigqueryNamespace extends BaseNamespace {
3
+ export class GoogleCloudBigqueryNamespace extends BaseNamespace {
4
4
  ensureInit = async () => {
5
5
  if (!this.client) {
6
6
  try {
@@ -0,0 +1,5 @@
1
+ import { GoogleCloudBigqueryNamespace } from "./GoogleCloudBigqueryNamespace";
2
+ export type { GoogleCloudBigqueryNamespace } from "./GoogleCloudBigqueryNamespace";
3
+ import type { GoogleAuthOptions } from "@google-cloud/common";
4
+ export declare const googleCloudBigqueryClient: (key?: string, projectId?: string, config?: GoogleAuthOptions, vaultId?: string, itemId?: string) => Promise<GoogleCloudBigqueryNamespace>;
5
+ export declare const getHandlerPath: (input: string) => string;
@@ -1,9 +1,9 @@
1
- import { GoogleBigqueryNamespace } from "./GoogleBigqueryNamespace";
1
+ import { GoogleCloudBigqueryNamespace } from "./GoogleCloudBigqueryNamespace";
2
2
  import { onePasswordClient } from "../../../onePassword/server";
3
- const googleBigqueryNamespaces = new Map();
4
- export const googleBigqueryClient = async (key = "default", projectId, config, vaultId, itemId) => {
5
- if (googleBigqueryNamespaces.has(key)) {
6
- return googleBigqueryNamespaces.get(key);
3
+ const googleCloudBigqueryNamespaces = new Map();
4
+ export const googleCloudBigqueryClient = async (key = "default", projectId, config, vaultId, itemId) => {
5
+ if (googleCloudBigqueryNamespaces.has(key)) {
6
+ return googleCloudBigqueryNamespaces.get(key);
7
7
  }
8
8
  let instanceConfig;
9
9
  if (config) {
@@ -31,12 +31,11 @@ export const googleBigqueryClient = async (key = "default", projectId, config, v
31
31
  else {
32
32
  throw new Error(`Config required for namespace '${key}'`);
33
33
  }
34
- const namespace = new GoogleBigqueryNamespace(key, instanceConfig);
35
- googleBigqueryNamespaces.set(key, namespace);
34
+ const namespace = new GoogleCloudBigqueryNamespace(key, instanceConfig);
35
+ googleCloudBigqueryNamespaces.set(key, namespace);
36
36
  return namespace;
37
37
  };
38
38
  export const getHandlerPath = (input) => {
39
39
  return `${input.split(process.cwd())[1].substring(1)
40
40
  .replace(/\\/g, "/")}`;
41
41
  };
42
- export { loadData } from "./loadData";
@@ -0,0 +1,3 @@
1
+ export * from "./googleCloudBigquery";
2
+ export * from "./GoogleCloudBigqueryNamespace";
3
+ export * from "./loadData";
@@ -0,0 +1,3 @@
1
+ export * from "./googleCloudBigquery";
2
+ export * from "./GoogleCloudBigqueryNamespace";
3
+ export * from "./loadData";
@@ -1,6 +1,6 @@
1
- import { GoogleBigqueryNamespace } from "./GoogleBigqueryNamespace";
1
+ import { GoogleCloudBigqueryNamespace } from "./GoogleCloudBigqueryNamespace";
2
2
  type LoadData = {
3
- googleBigqueryClient: GoogleBigqueryNamespace;
3
+ googleCloudBigqueryClient: GoogleCloudBigqueryNamespace;
4
4
  googleCloudStorageClient: any;
5
5
  file: {
6
6
  bucket: string;
@@ -15,5 +15,5 @@ type LoadData = {
15
15
  /**
16
16
  * Load data into a given table using Google Cloud Storage.
17
17
  */
18
- export declare const loadData: ({ file, googleBigqueryClient, googleCloudStorageClient, table }: LoadData) => Promise<void>;
18
+ export declare const loadData: ({ file, googleCloudBigqueryClient, googleCloudStorageClient, table }: LoadData) => Promise<void>;
19
19
  export {};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Load data into a given table using Google Cloud Storage.
3
3
  */
4
- export const loadData = async ({ file, googleBigqueryClient, googleCloudStorageClient, table }) => {
5
- const tableExists = await googleBigqueryClient.tableExists(table.datasetId, table.tableId);
4
+ export const loadData = async ({ file, googleCloudBigqueryClient, googleCloudStorageClient, table }) => {
5
+ const tableExists = await googleCloudBigqueryClient.tableExists(table.datasetId, table.tableId);
6
6
  if (tableExists) {
7
- await googleBigqueryClient.client
7
+ await googleCloudBigqueryClient.client
8
8
  .dataset(table.datasetId)
9
9
  .table(table.tableId)
10
10
  .load(googleCloudStorageClient.client
@@ -0,0 +1 @@
1
+ export * from "./googleCloud";
@@ -0,0 +1 @@
1
+ export * from "./googleCloud";
@@ -7,7 +7,7 @@ type GetBatchDataProps = {
7
7
  dateTimeRender?: string;
8
8
  valueRender?: string;
9
9
  };
10
- export declare class GoogleSheetsNamespace extends BaseNamespace {
10
+ export declare class GoogleCloudSheetsNamespace extends BaseNamespace {
11
11
  client: GoogleAuth;
12
12
  config: GoogleCloudConfig & {
13
13
  projectId?: string;
@@ -1,6 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class";
2
2
  import { getConfig } from "../../server";
3
- export class GoogleSheetsNamespace extends BaseNamespace {
3
+ export class GoogleCloudSheetsNamespace extends BaseNamespace {
4
4
  ensureInit = async () => {
5
5
  if (!this.client) {
6
6
  try {