@8ms/helpers 3.0.22 → 3.0.24

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 (208) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/dist/adverity/adverity.d.cts +0 -1
  3. package/dist/adverity/adverity.d.mts +0 -1
  4. package/dist/adverity/server/getJobs.d.cts +2 -0
  5. package/dist/adverity/server/getJobs.d.mts +2 -0
  6. package/dist/api/ApiResponseClass.d.cts +1 -6
  7. package/dist/api/ApiResponseClass.d.mts +1 -6
  8. package/dist/api/api.d.cts +0 -1
  9. package/dist/api/api.d.mts +0 -1
  10. package/dist/api/deleteRequest.d.cts +0 -1
  11. package/dist/api/deleteRequest.d.mts +0 -1
  12. package/dist/api/functions.d.cts +0 -1
  13. package/dist/api/functions.d.mts +0 -1
  14. package/dist/api/get.d.cts +0 -1
  15. package/dist/api/get.d.mts +0 -1
  16. package/dist/api/post.d.cts +0 -1
  17. package/dist/api/post.d.mts +0 -1
  18. package/dist/atInternet/atInternet.d.cts +0 -1
  19. package/dist/atInternet/atInternet.d.mts +0 -1
  20. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.cts +0 -1
  21. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.mts +0 -1
  22. package/dist/aws/cloudWatchLog/server/logEvent.d.cts +1 -0
  23. package/dist/aws/cloudWatchLog/server/logEvent.d.mts +1 -0
  24. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.cts +0 -1
  25. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.mts +0 -1
  26. package/dist/aws/cloudWatchMetric/server/logMetric.d.cts +1 -1
  27. package/dist/aws/cloudWatchMetric/server/logMetric.d.mts +1 -1
  28. package/dist/aws/ec2/server/AwsEc2.d.cts +0 -1
  29. package/dist/aws/ec2/server/AwsEc2.d.mts +0 -1
  30. package/dist/aws/ecs/server/AwsEcs.d.cts +0 -1
  31. package/dist/aws/ecs/server/AwsEcs.d.mts +0 -1
  32. package/dist/aws/glue/server/AwsGlue.cjs +2 -1
  33. package/dist/aws/glue/server/AwsGlue.d.cts +0 -1
  34. package/dist/aws/glue/server/AwsGlue.d.mts +0 -1
  35. package/dist/aws/glue/server/AwsGlue.mjs +2 -1
  36. package/dist/aws/lambda/server/AwsLambda.cjs +10 -8
  37. package/dist/aws/lambda/server/AwsLambda.d.cts +0 -1
  38. package/dist/aws/lambda/server/AwsLambda.d.mts +0 -1
  39. package/dist/aws/lambda/server/AwsLambda.mjs +10 -8
  40. package/dist/aws/s3/server/AwsS3.cjs +3 -2
  41. package/dist/aws/s3/server/AwsS3.d.cts +1 -1
  42. package/dist/aws/s3/server/AwsS3.d.mts +1 -1
  43. package/dist/aws/s3/server/AwsS3.mjs +3 -2
  44. package/dist/aws/s3/server/payload.d.cts +0 -1
  45. package/dist/aws/s3/server/payload.d.mts +0 -1
  46. package/dist/aws/ses/server/AwsSes.cjs +4 -11
  47. package/dist/aws/ses/server/AwsSes.d.cts +3 -4
  48. package/dist/aws/ses/server/AwsSes.d.mts +3 -4
  49. package/dist/aws/ses/server/AwsSes.mjs +4 -11
  50. package/dist/aws/ses/server/SimpleEmail.cjs +10 -11
  51. package/dist/aws/ses/server/SimpleEmail.d.cts +3 -12
  52. package/dist/aws/ses/server/SimpleEmail.d.mts +3 -12
  53. package/dist/aws/ses/server/SimpleEmail.mjs +10 -11
  54. package/dist/aws/sqs/server/AwsSqs.d.cts +0 -1
  55. package/dist/aws/sqs/server/AwsSqs.d.mts +0 -1
  56. package/dist/aws/ssm/server/AwsSsm.cjs +5 -4
  57. package/dist/aws/ssm/server/AwsSsm.d.cts +0 -1
  58. package/dist/aws/ssm/server/AwsSsm.d.mts +0 -1
  59. package/dist/aws/ssm/server/AwsSsm.mjs +5 -4
  60. package/dist/brightData/serpApi/server/buildGoogleSerpUrl.cjs +0 -2
  61. package/dist/brightData/serpApi/server/buildGoogleSerpUrl.mjs +0 -2
  62. package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.cjs +0 -1
  63. package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.mjs +0 -1
  64. package/dist/brightData/serpApi/server/getAsyncRequestId.d.cts +1 -0
  65. package/dist/brightData/serpApi/server/getAsyncRequestId.d.mts +1 -0
  66. package/dist/brightData/serpApi/server/getAsyncResults.cjs +7 -4
  67. package/dist/brightData/serpApi/server/getAsyncResults.d.cts +1 -1
  68. package/dist/brightData/serpApi/server/getAsyncResults.d.mts +1 -1
  69. package/dist/brightData/serpApi/server/getAsyncResults.mjs +7 -4
  70. package/dist/brightData/serpApi/server/getRealtime.d.cts +0 -1
  71. package/dist/brightData/serpApi/server/getRealtime.d.mts +0 -1
  72. package/dist/brightData/webScraperIde/server/getBatch.d.cts +0 -1
  73. package/dist/brightData/webScraperIde/server/getBatch.d.mts +0 -1
  74. package/dist/brightData/webScraperIde/server/getRealtime.cjs +10 -6
  75. package/dist/brightData/webScraperIde/server/getRealtime.d.cts +0 -1
  76. package/dist/brightData/webScraperIde/server/getRealtime.d.mts +0 -1
  77. package/dist/brightData/webScraperIde/server/getRealtime.mjs +10 -6
  78. package/dist/date/calculation.cjs +27 -24
  79. package/dist/date/calculation.d.cts +0 -1
  80. package/dist/date/calculation.d.mts +0 -1
  81. package/dist/date/calculation.mjs +27 -24
  82. package/dist/date/date.d.cts +0 -1
  83. package/dist/date/date.d.mts +0 -1
  84. package/dist/date/financialYear.d.cts +0 -1
  85. package/dist/date/financialYear.d.mts +0 -1
  86. package/dist/date/format.d.cts +0 -1
  87. package/dist/date/format.d.mts +0 -1
  88. package/dist/drizzle/server/Drizzle.d.cts +0 -1
  89. package/dist/drizzle/server/Drizzle.d.mts +0 -1
  90. package/dist/emsApi/awsTs/get.cjs +2 -1
  91. package/dist/emsApi/awsTs/get.d.cts +1 -0
  92. package/dist/emsApi/awsTs/get.d.mts +1 -0
  93. package/dist/emsApi/awsTs/get.mjs +2 -1
  94. package/dist/emsApi/awsTs/post.cjs +2 -1
  95. package/dist/emsApi/awsTs/post.d.cts +1 -0
  96. package/dist/emsApi/awsTs/post.d.mts +1 -0
  97. package/dist/emsApi/awsTs/post.mjs +2 -1
  98. package/dist/emsApi/vercel/get.cjs +2 -1
  99. package/dist/emsApi/vercel/get.d.cts +1 -0
  100. package/dist/emsApi/vercel/get.d.mts +1 -0
  101. package/dist/emsApi/vercel/get.mjs +2 -1
  102. package/dist/emsApi/vercel/post.cjs +2 -1
  103. package/dist/emsApi/vercel/post.d.cts +1 -0
  104. package/dist/emsApi/vercel/post.d.mts +1 -0
  105. package/dist/emsApi/vercel/post.mjs +2 -1
  106. package/dist/eskimi/eskimi.d.cts +0 -1
  107. package/dist/eskimi/eskimi.d.mts +0 -1
  108. package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.cts +0 -1
  109. package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.mts +0 -1
  110. package/dist/googleAds/server/GoogleAds.d.cts +0 -1
  111. package/dist/googleAds/server/GoogleAds.d.mts +0 -1
  112. package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.cts +0 -1
  113. package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.mts +0 -1
  114. package/dist/googleCloud/bigquery/server/loadData.d.cts +1 -7
  115. package/dist/googleCloud/bigquery/server/loadData.d.mts +1 -7
  116. package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.cts +1 -2
  117. package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.mts +1 -2
  118. package/dist/googleCloud/storage/server/GoogleCloudStorage.d.cts +0 -1
  119. package/dist/googleCloud/storage/server/GoogleCloudStorage.d.mts +0 -1
  120. package/dist/googlePageSpeed/server/GooglePageSpeed.cjs +2 -1
  121. package/dist/googlePageSpeed/server/GooglePageSpeed.d.cts +0 -1
  122. package/dist/googlePageSpeed/server/GooglePageSpeed.d.mts +0 -1
  123. package/dist/googlePageSpeed/server/GooglePageSpeed.mjs +2 -1
  124. package/dist/googleSearchIncidents/server/googleSearchIncidents.d.cts +0 -1
  125. package/dist/googleSearchIncidents/server/googleSearchIncidents.d.mts +0 -1
  126. package/dist/greenDomain/server/greenDomain.cjs +2 -1
  127. package/dist/greenDomain/server/greenDomain.d.cts +0 -1
  128. package/dist/greenDomain/server/greenDomain.d.mts +0 -1
  129. package/dist/greenDomain/server/greenDomain.mjs +2 -1
  130. package/dist/littleWarden/server/LittleWarden.cjs +2 -1
  131. package/dist/littleWarden/server/LittleWarden.d.cts +0 -1
  132. package/dist/littleWarden/server/LittleWarden.d.mts +0 -1
  133. package/dist/littleWarden/server/LittleWarden.mjs +2 -1
  134. package/dist/littleWarden/server/littleWardenAttrs.d.cts +3 -10
  135. package/dist/littleWarden/server/littleWardenAttrs.d.mts +3 -10
  136. package/dist/lumar/api/server/buildRequest.cjs +0 -1
  137. package/dist/lumar/api/server/buildRequest.d.cts +1 -0
  138. package/dist/lumar/api/server/buildRequest.d.mts +1 -0
  139. package/dist/lumar/api/server/buildRequest.mjs +0 -1
  140. package/dist/lumar/api/server/getData.d.cts +1 -0
  141. package/dist/lumar/api/server/getData.d.mts +1 -0
  142. package/dist/lumar/graphql/server/getData.d.cts +1 -0
  143. package/dist/lumar/graphql/server/getData.d.mts +1 -0
  144. package/dist/lumar/graphql/server/queries/getCrawls.d.cts +1 -4
  145. package/dist/lumar/graphql/server/queries/getCrawls.d.mts +1 -4
  146. package/dist/lumar/graphql/server/queries/getReportDifferences.d.cts +1 -5
  147. package/dist/lumar/graphql/server/queries/getReportDifferences.d.mts +1 -5
  148. package/dist/lumar/graphql/server/queries/getRows.d.cts +1 -11
  149. package/dist/lumar/graphql/server/queries/getRows.d.mts +1 -11
  150. package/dist/lumar/graphql/server/queries/getTotals.d.cts +1 -7
  151. package/dist/lumar/graphql/server/queries/getTotals.d.mts +1 -7
  152. package/dist/myTarget/server/myTarget.d.cts +0 -1
  153. package/dist/myTarget/server/myTarget.d.mts +0 -1
  154. package/dist/nextAuth/nextAuth.d.cts +0 -1
  155. package/dist/nextAuth/nextAuth.d.mts +0 -1
  156. package/dist/nextJs/client/LazyLoad.d.cts +0 -1
  157. package/dist/nextJs/client/LazyLoad.d.mts +0 -1
  158. package/dist/onePassword/server/OnePassword.d.cts +0 -1
  159. package/dist/onePassword/server/OnePassword.d.mts +0 -1
  160. package/dist/openAi/server/OpenAi.d.cts +0 -1
  161. package/dist/openAi/server/OpenAi.d.mts +0 -1
  162. package/dist/prisma/server/Prisma.d.cts +0 -1
  163. package/dist/prisma/server/Prisma.d.mts +0 -1
  164. package/dist/snapchat/server/Snapchat.cjs +3 -2
  165. package/dist/snapchat/server/Snapchat.d.cts +0 -1
  166. package/dist/snapchat/server/Snapchat.d.mts +0 -1
  167. package/dist/snapchat/server/Snapchat.mjs +3 -2
  168. package/dist/stream/server/sort.d.cts +0 -1
  169. package/dist/stream/server/sort.d.mts +0 -1
  170. package/dist/swr/client/swr.d.cts +1 -0
  171. package/dist/swr/client/swr.d.mts +1 -0
  172. package/dist/upTimeRobot/server/UpTimeRobot.d.cts +0 -1
  173. package/dist/upTimeRobot/server/UpTimeRobot.d.mts +0 -1
  174. package/dist/util/defaultTo.cjs +6 -3
  175. package/dist/util/defaultTo.mjs +6 -3
  176. package/dist/util/server/getBrotliCompressed.d.cts +0 -1
  177. package/dist/util/server/getBrotliCompressed.d.mts +0 -1
  178. package/dist/util/server/getBrotliDecompressed.d.cts +0 -1
  179. package/dist/util/server/getBrotliDecompressed.d.mts +0 -1
  180. package/dist/util/server/getGzipCompressed.d.cts +0 -1
  181. package/dist/util/server/getGzipCompressed.d.mts +0 -1
  182. package/dist/util/server/getGzipDecompressed.d.cts +0 -1
  183. package/dist/util/server/getGzipDecompressed.d.mts +0 -1
  184. package/dist/xlsx/cell.cjs +102 -0
  185. package/dist/xlsx/cell.d.cts +38 -0
  186. package/dist/xlsx/cell.d.mts +38 -0
  187. package/dist/xlsx/cell.mjs +97 -0
  188. package/dist/xlsx/column.cjs +37 -0
  189. package/dist/xlsx/column.d.cts +23 -0
  190. package/dist/xlsx/column.d.mts +23 -0
  191. package/dist/xlsx/column.mjs +35 -0
  192. package/dist/xlsx/createXlsx.cjs +138 -0
  193. package/dist/xlsx/createXlsx.d.cts +18 -0
  194. package/dist/xlsx/createXlsx.d.mts +18 -0
  195. package/dist/xlsx/createXlsx.mjs +136 -0
  196. package/dist/xlsx/index.cjs +18 -0
  197. package/dist/xlsx/index.d.cts +6 -0
  198. package/dist/xlsx/index.d.mts +6 -0
  199. package/dist/xlsx/index.mjs +6 -0
  200. package/dist/xlsx/modifyXlsx.cjs +125 -0
  201. package/dist/xlsx/modifyXlsx.d.cts +24 -0
  202. package/dist/xlsx/modifyXlsx.d.mts +24 -0
  203. package/dist/xlsx/modifyXlsx.mjs +124 -0
  204. package/dist/xlsx/sheet.cjs +36 -0
  205. package/dist/xlsx/sheet.d.cts +29 -0
  206. package/dist/xlsx/sheet.d.mts +29 -0
  207. package/dist/xlsx/sheet.mjs +34 -0
  208. package/package.json +103 -57
@@ -1,6 +1,5 @@
1
1
  import { BaseClass } from "../../../_class/BaseClass.mjs";
2
- import { SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
3
-
2
+ import { SendEmailCommandInput } from "@aws-sdk/client-sesv2";
4
3
  //#region src/aws/ses/server/SimpleEmail.d.ts
5
4
  type AttachmentSource = {
6
5
  filename: string;
@@ -28,15 +27,7 @@ declare class SimpleEmail extends BaseClass {
28
27
  html?: string;
29
28
  subject?: string;
30
29
  attachments: AttachmentSource[];
31
- constructor({
32
- bcc,
33
- cc,
34
- from,
35
- html,
36
- subject,
37
- to,
38
- attachments
39
- }: ConstructorProps);
30
+ constructor({ bcc, cc, from, html, subject, to, attachments }: ConstructorProps);
40
31
  setFrom: (from: string) => this;
41
32
  setHtml: (html: string) => this;
42
33
  setSubject: (subject: string) => this;
@@ -51,7 +42,7 @@ declare class SimpleEmail extends BaseClass {
51
42
  setBcc: (recipient: string | string[]) => this;
52
43
  setCc: (recipient: string | string[]) => this;
53
44
  setTo: (recipient: string | string[]) => this;
54
- getSendParam: () => Promise<SendEmailCommandInput | SendRawEmailCommandInput>;
45
+ getSendParam: () => Promise<SendEmailCommandInput>;
55
46
  private _getRawEmailParams;
56
47
  private _isTextFile;
57
48
  private _getAttachmentTextData;
@@ -82,7 +82,7 @@ var SimpleEmail = class extends BaseClass {
82
82
  CcAddresses: this._filterRecipients("cc"),
83
83
  ToAddresses: this._filterRecipients("to")
84
84
  },
85
- Message: {
85
+ Content: { Simple: {
86
86
  Body: {
87
87
  Html: {
88
88
  Charset: "UTF-8",
@@ -97,17 +97,12 @@ var SimpleEmail = class extends BaseClass {
97
97
  Charset: "UTF-8",
98
98
  Data: this.subject ?? ""
99
99
  }
100
- },
101
- Source: this.from ?? ""
100
+ } },
101
+ FromEmailAddress: this.from ?? ""
102
102
  };
103
103
  };
104
104
  _getRawEmailParams = async () => {
105
105
  const boundary = `----=_NextPart_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
106
- const allRecipients = [
107
- ...this._filterRecipients("to"),
108
- ...this._filterRecipients("cc"),
109
- ...this._filterRecipients("bcc")
110
- ];
111
106
  let rawMessage = "";
112
107
  rawMessage += `From: ${this.from}\r\n`;
113
108
  if (this._filterRecipients("to").length > 0) rawMessage += `To: ${this._filterRecipients("to").join(", ")}\r\n`;
@@ -136,9 +131,13 @@ var SimpleEmail = class extends BaseClass {
136
131
  }
137
132
  rawMessage += `--${boundary}--\r\n`;
138
133
  return {
139
- Destinations: allRecipients,
140
- RawMessage: { Data: Buffer.from(rawMessage) },
141
- Source: this.from ?? ""
134
+ Destination: {
135
+ ToAddresses: this._filterRecipients("to"),
136
+ CcAddresses: this._filterRecipients("cc"),
137
+ BccAddresses: this._filterRecipients("bcc")
138
+ },
139
+ Content: { Raw: { Data: Buffer.from(rawMessage) } },
140
+ FromEmailAddress: this.from ?? ""
142
141
  };
143
142
  };
144
143
  _isTextFile = (contentType) => {
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { SQSClient } from "@aws-sdk/client-sqs";
3
-
4
3
  //#region src/aws/sqs/server/AwsSqs.d.ts
5
4
  type SqsEventRecord = {
6
5
  messageId: string;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { SQSClient } from "@aws-sdk/client-sqs";
3
-
4
3
  //#region src/aws/sqs/server/AwsSqs.d.ts
5
4
  type SqsEventRecord = {
6
5
  messageId: string;
@@ -24,10 +24,11 @@ var AwsSsm = class extends require__class_BaseNamespace.BaseNamespace {
24
24
  Name: name,
25
25
  WithDecryption: "undefined" === typeof withDecryption ? true : withDecryption
26
26
  }));
27
- if (apiResponse?.Parameter?.Value) if ("undefined" === typeof apiResponse?.Parameter?.Value) this.parameters.set(name, null);
28
- else if ("undefined" === typeof isJson || true === isJson) this.parameters.set(name, JSON.parse(apiResponse.Parameter.Value) || null);
29
- else this.parameters.set(name, apiResponse.Parameter.Value);
30
- else this.parameters.set(name, null);
27
+ if (apiResponse?.Parameter?.Value) {
28
+ if ("undefined" === typeof apiResponse?.Parameter?.Value) this.parameters.set(name, null);
29
+ else if ("undefined" === typeof isJson || true === isJson) this.parameters.set(name, JSON.parse(apiResponse.Parameter.Value) || null);
30
+ else this.parameters.set(name, apiResponse.Parameter.Value);
31
+ } else this.parameters.set(name, null);
31
32
  }
32
33
  return this.parameters.get(name);
33
34
  };
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { SSMClient } from "@aws-sdk/client-ssm";
3
-
4
3
  //#region src/aws/ssm/server/AwsSsm.d.ts
5
4
  declare class AwsSsm extends BaseNamespace {
6
5
  client: SSMClient;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { SSMClient } from "@aws-sdk/client-ssm";
3
-
4
3
  //#region src/aws/ssm/server/AwsSsm.d.ts
5
4
  declare class AwsSsm extends BaseNamespace {
6
5
  client: SSMClient;
@@ -23,10 +23,11 @@ var AwsSsm = class extends BaseNamespace {
23
23
  Name: name,
24
24
  WithDecryption: "undefined" === typeof withDecryption ? true : withDecryption
25
25
  }));
26
- if (apiResponse?.Parameter?.Value) if ("undefined" === typeof apiResponse?.Parameter?.Value) this.parameters.set(name, null);
27
- else if ("undefined" === typeof isJson || true === isJson) this.parameters.set(name, JSON.parse(apiResponse.Parameter.Value) || null);
28
- else this.parameters.set(name, apiResponse.Parameter.Value);
29
- else this.parameters.set(name, null);
26
+ if (apiResponse?.Parameter?.Value) {
27
+ if ("undefined" === typeof apiResponse?.Parameter?.Value) this.parameters.set(name, null);
28
+ else if ("undefined" === typeof isJson || true === isJson) this.parameters.set(name, JSON.parse(apiResponse.Parameter.Value) || null);
29
+ else this.parameters.set(name, apiResponse.Parameter.Value);
30
+ } else this.parameters.set(name, null);
30
31
  }
31
32
  return this.parameters.get(name);
32
33
  };
@@ -35,7 +35,6 @@ const buildGoogleSerpUrl = (props) => {
35
35
  case "iphone":
36
36
  params.query["brd_mobile"] = "ios";
37
37
  url.searchParams.append("brd_mobile", "ios");
38
- break;
39
38
  }
40
39
  if (props?.geoLocation) {
41
40
  params.query["uule"] = props.geoLocation;
@@ -75,7 +74,6 @@ const buildGoogleSerpUrl = (props) => {
75
74
  case "video":
76
75
  params.query["tbm"] = "vid";
77
76
  url.searchParams.append("tbm", "vid");
78
- break;
79
77
  }
80
78
  if (props?.pagination) {
81
79
  if (props.pagination?.offset) {
@@ -34,7 +34,6 @@ const buildGoogleSerpUrl = (props) => {
34
34
  case "iphone":
35
35
  params.query["brd_mobile"] = "ios";
36
36
  url.searchParams.append("brd_mobile", "ios");
37
- break;
38
37
  }
39
38
  if (props?.geoLocation) {
40
39
  params.query["uule"] = props.geoLocation;
@@ -74,7 +73,6 @@ const buildGoogleSerpUrl = (props) => {
74
73
  case "video":
75
74
  params.query["tbm"] = "vid";
76
75
  url.searchParams.append("tbm", "vid");
77
- break;
78
76
  }
79
77
  if (props?.pagination) {
80
78
  if (props.pagination?.offset) {
@@ -43,7 +43,6 @@ const buildGoogleTrendsUrl = (props) => {
43
43
  case "youtube":
44
44
  params.query["group"] = "youtube";
45
45
  url.searchParams.append("gprop", "youtube");
46
- break;
47
46
  }
48
47
  if ("json" === props.returnType) return params;
49
48
  return url.toString();
@@ -42,7 +42,6 @@ const buildGoogleTrendsUrl = (props) => {
42
42
  case "youtube":
43
43
  params.query["group"] = "youtube";
44
44
  url.searchParams.append("gprop", "youtube");
45
- break;
46
45
  }
47
46
  if ("json" === props.returnType) return params;
48
47
  return url.toString();
@@ -1,5 +1,6 @@
1
1
  import { BrightDataSerpApiType } from "./brightDataSerpApi.cjs";
2
2
  import { Auth } from "../../server/brightData.cjs";
3
+ import "./index.cjs";
3
4
  //#region src/brightData/serpApi/server/getAsyncRequestId.d.ts
4
5
  /**
5
6
  * Make an async request to the SERP API using the Bright Data proxy.
@@ -1,5 +1,6 @@
1
1
  import { BrightDataSerpApiType } from "./brightDataSerpApi.mjs";
2
2
  import { Auth } from "../../server/brightData.mjs";
3
+ import "./index.mjs";
3
4
  //#region src/brightData/serpApi/server/getAsyncRequestId.d.ts
4
5
  /**
5
6
  * Make an async request to the SERP API using the Bright Data proxy.
@@ -11,10 +11,13 @@ const require_brightData_server_brightData = require("../../server/brightData.cj
11
11
  const getAsyncResults = async (auth, requestId) => {
12
12
  let response = new require_api_ApiResponseClass.ApiResponseClass();
13
13
  process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
14
- const requestResponse = await require_api_get.get(`https://api.brightdata.com/serp/get_result?customer=${require_brightData_server_brightData.getCustomerId(auth)}&zone=${require_brightData_server_brightData.getZone(auth)}&response_id=${requestId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
15
- if (requestResponse.isSuccess()) if ("Request is pending" === requestResponse.getBody()) response.setToPending();
16
- else response.setToSuccess(requestResponse.getBody());
17
- else response.setToError(null, "Error in request");
14
+ const customerId = require_brightData_server_brightData.getCustomerId(auth);
15
+ const zone = require_brightData_server_brightData.getZone(auth);
16
+ const requestResponse = await require_api_get.get(`https://api.brightdata.com/serp/get_result?customer=${customerId}&zone=${zone}&response_id=${requestId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
17
+ if (requestResponse.isSuccess()) {
18
+ if ("Request is pending" === requestResponse.getBody()) response.setToPending();
19
+ else response.setToSuccess(requestResponse.getBody());
20
+ } else response.setToError(null, "Error in request");
18
21
  return response;
19
22
  };
20
23
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { ApiResponseClass } from "../../../api/ApiResponseClass.cjs";
2
+ import "../../../api/index.cjs";
2
3
  import { Auth } from "../../server/brightData.cjs";
3
-
4
4
  //#region src/brightData/serpApi/server/getAsyncResults.d.ts
5
5
  /**
6
6
  * Using the request ID from getAsyncRequestId fetch to see if the data is available.
@@ -1,6 +1,6 @@
1
1
  import { ApiResponseClass } from "../../../api/ApiResponseClass.mjs";
2
+ import "../../../api/index.mjs";
2
3
  import { Auth } from "../../server/brightData.mjs";
3
-
4
4
  //#region src/brightData/serpApi/server/getAsyncResults.d.ts
5
5
  /**
6
6
  * Using the request ID from getAsyncRequestId fetch to see if the data is available.
@@ -10,10 +10,13 @@ import { getCustomerId, getZone } from "../../server/brightData.mjs";
10
10
  const getAsyncResults = async (auth, requestId) => {
11
11
  let response = new ApiResponseClass();
12
12
  process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
13
- const requestResponse = await get(`https://api.brightdata.com/serp/get_result?customer=${getCustomerId(auth)}&zone=${getZone(auth)}&response_id=${requestId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
14
- if (requestResponse.isSuccess()) if ("Request is pending" === requestResponse.getBody()) response.setToPending();
15
- else response.setToSuccess(requestResponse.getBody());
16
- else response.setToError(null, "Error in request");
13
+ const customerId = getCustomerId(auth);
14
+ const zone = getZone(auth);
15
+ const requestResponse = await get(`https://api.brightdata.com/serp/get_result?customer=${customerId}&zone=${zone}&response_id=${requestId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
16
+ if (requestResponse.isSuccess()) {
17
+ if ("Request is pending" === requestResponse.getBody()) response.setToPending();
18
+ else response.setToSuccess(requestResponse.getBody());
19
+ } else response.setToError(null, "Error in request");
17
20
  return response;
18
21
  };
19
22
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.cjs";
2
-
3
2
  //#region src/brightData/serpApi/server/getRealtime.d.ts
4
3
  /**
5
4
  * Make a request to the SERP API using the Bright Data proxy
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.mjs";
2
-
3
2
  //#region src/brightData/serpApi/server/getRealtime.d.ts
4
3
  /**
5
4
  * Make a request to the SERP API using the Bright Data proxy
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.cjs";
2
-
3
2
  //#region src/brightData/webScraperIde/server/getBatch.d.ts
4
3
  type Response = {
5
4
  collection_id: string;
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.mjs";
2
-
3
2
  //#region src/brightData/webScraperIde/server/getBatch.d.ts
4
3
  type Response = {
5
4
  collection_id: string;
@@ -11,17 +11,21 @@ const require_api_post = require("../../../api/post.cjs");
11
11
  */
12
12
  const getRealtime = async (auth, scraperId, data = {}) => {
13
13
  let response = {};
14
- const requestResponse = await require_api_post.post(`https://api.brightdata.com/dca/trigger_immediate?collector=${scraperId}`, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
14
+ const requestUrl = `https://api.brightdata.com/dca/trigger_immediate?collector=${scraperId}`;
15
+ const requestResponse = await require_api_post.post(requestUrl, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
15
16
  if (requestResponse.isSuccess()) {
16
17
  const responseId = requestResponse.getBodyDefaultTo(["response_id"], "");
17
18
  if ("" !== responseId) {
18
19
  let state = require_api_api.apiState.PENDING;
19
20
  while (require_api_api.apiState.PENDING === state) {
20
- const resultResponse = await require_api_get.get(`https://api.brightdata.com/dca/get_result?response_id=${responseId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
21
- if (resultResponse.isSuccess()) if (void 0 !== resultResponse.body.pending && true === resultResponse.body.pending) state = require_api_api.apiState.PENDING;
22
- else {
23
- state = require_api_api.apiState.SUCCESS;
24
- response = resultResponse.getBody();
21
+ const resultUrl = `https://api.brightdata.com/dca/get_result?response_id=${responseId}`;
22
+ const resultResponse = await require_api_get.get(resultUrl, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
23
+ if (resultResponse.isSuccess()) {
24
+ if (void 0 !== resultResponse.body.pending && true === resultResponse.body.pending) state = require_api_api.apiState.PENDING;
25
+ else {
26
+ state = require_api_api.apiState.SUCCESS;
27
+ response = resultResponse.getBody();
28
+ }
25
29
  }
26
30
  await require_util_sleep.sleep(1);
27
31
  }
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.cjs";
2
-
3
2
  //#region src/brightData/webScraperIde/server/getRealtime.d.ts
4
3
  /**
5
4
  * Depends on the Scraper setup!
@@ -1,5 +1,4 @@
1
1
  import { Auth } from "../../server/brightData.mjs";
2
-
3
2
  //#region src/brightData/webScraperIde/server/getRealtime.d.ts
4
3
  /**
5
4
  * Depends on the Scraper setup!
@@ -10,17 +10,21 @@ import { post } from "../../../api/post.mjs";
10
10
  */
11
11
  const getRealtime = async (auth, scraperId, data = {}) => {
12
12
  let response = {};
13
- const requestResponse = await post(`https://api.brightdata.com/dca/trigger_immediate?collector=${scraperId}`, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
13
+ const requestUrl = `https://api.brightdata.com/dca/trigger_immediate?collector=${scraperId}`;
14
+ const requestResponse = await post(requestUrl, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
14
15
  if (requestResponse.isSuccess()) {
15
16
  const responseId = requestResponse.getBodyDefaultTo(["response_id"], "");
16
17
  if ("" !== responseId) {
17
18
  let state = apiState.PENDING;
18
19
  while (apiState.PENDING === state) {
19
- const resultResponse = await get(`https://api.brightdata.com/dca/get_result?response_id=${responseId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
20
- if (resultResponse.isSuccess()) if (void 0 !== resultResponse.body.pending && true === resultResponse.body.pending) state = apiState.PENDING;
21
- else {
22
- state = apiState.SUCCESS;
23
- response = resultResponse.getBody();
20
+ const resultUrl = `https://api.brightdata.com/dca/get_result?response_id=${responseId}`;
21
+ const resultResponse = await get(resultUrl, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
22
+ if (resultResponse.isSuccess()) {
23
+ if (void 0 !== resultResponse.body.pending && true === resultResponse.body.pending) state = apiState.PENDING;
24
+ else {
25
+ state = apiState.SUCCESS;
26
+ response = resultResponse.getBody();
27
+ }
24
28
  }
25
29
  await sleep(1);
26
30
  }
@@ -14,30 +14,33 @@ const getUnix = (input) => {
14
14
  */
15
15
  const getLuxonDate = (input, setMidnight) => {
16
16
  let instance = luxon.DateTime.now().toUTC();
17
- if (input) if (input instanceof Date) instance = luxon.DateTime.fromJSDate(input, { zone: "utc" });
18
- else if (input instanceof luxon.DateTime) instance = input.toUTC();
19
- else if ("number" === typeof input) if (input >= 19000101 && input <= 99991231) {
20
- const dateStr = input.toString();
21
- const year = parseInt(dateStr.substring(0, 4));
22
- const month = parseInt(dateStr.substring(4, 6));
23
- const day = parseInt(dateStr.substring(6, 8));
24
- instance = luxon.DateTime.fromObject({
25
- year,
26
- month,
27
- day
28
- }, { zone: "utc" });
29
- } else if (input < 1e10) instance = luxon.DateTime.fromSeconds(input, { zone: "utc" });
30
- else instance = luxon.DateTime.fromMillis(input, { zone: "utc" });
31
- else {
32
- const inputString = input.toString().toLowerCase();
33
- instance = luxon.DateTime.fromISO(inputString, { zone: "utc" });
34
- if (!instance.isValid) {
35
- const len = inputString.length;
36
- if (23 === len) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss.SSS", { zone: "utc" });
37
- else if (19 === len) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss", { zone: "utc" });
38
- else {
39
- instance = luxon.DateTime.fromFormat(inputString, "yyyy MMMM dd", { zone: "utc" });
40
- if (!instance.isValid) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MMMM-dd", { zone: "utc" });
17
+ if (input) {
18
+ if (input instanceof Date) instance = luxon.DateTime.fromJSDate(input, { zone: "utc" });
19
+ else if (input instanceof luxon.DateTime) instance = input.toUTC();
20
+ else if ("number" === typeof input) {
21
+ if (input >= 19000101 && input <= 99991231) {
22
+ const dateStr = input.toString();
23
+ const year = parseInt(dateStr.substring(0, 4));
24
+ const month = parseInt(dateStr.substring(4, 6));
25
+ const day = parseInt(dateStr.substring(6, 8));
26
+ instance = luxon.DateTime.fromObject({
27
+ year,
28
+ month,
29
+ day
30
+ }, { zone: "utc" });
31
+ } else if (input < 1e10) instance = luxon.DateTime.fromSeconds(input, { zone: "utc" });
32
+ else instance = luxon.DateTime.fromMillis(input, { zone: "utc" });
33
+ } else {
34
+ const inputString = input.toString().toLowerCase();
35
+ instance = luxon.DateTime.fromISO(inputString, { zone: "utc" });
36
+ if (!instance.isValid) {
37
+ const len = inputString.length;
38
+ if (23 === len) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss.SSS", { zone: "utc" });
39
+ else if (19 === len) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss", { zone: "utc" });
40
+ else {
41
+ instance = luxon.DateTime.fromFormat(inputString, "yyyy MMMM dd", { zone: "utc" });
42
+ if (!instance.isValid) instance = luxon.DateTime.fromFormat(inputString, "yyyy-MMMM-dd", { zone: "utc" });
43
+ }
41
44
  }
42
45
  }
43
46
  }
@@ -1,6 +1,5 @@
1
1
  import { InputDate, Timeframe } from "./date.cjs";
2
2
  import { DateTime } from "luxon";
3
-
4
3
  //#region src/date/calculation.d.ts
5
4
  /**
6
5
  * Return unix timestamp in seconds.
@@ -1,6 +1,5 @@
1
1
  import { InputDate, Timeframe } from "./date.mjs";
2
2
  import { DateTime } from "luxon";
3
-
4
3
  //#region src/date/calculation.d.ts
5
4
  /**
6
5
  * Return unix timestamp in seconds.
@@ -13,30 +13,33 @@ const getUnix = (input) => {
13
13
  */
14
14
  const getLuxonDate = (input, setMidnight) => {
15
15
  let instance = DateTime.now().toUTC();
16
- if (input) if (input instanceof Date) instance = DateTime.fromJSDate(input, { zone: "utc" });
17
- else if (input instanceof DateTime) instance = input.toUTC();
18
- else if ("number" === typeof input) if (input >= 19000101 && input <= 99991231) {
19
- const dateStr = input.toString();
20
- const year = parseInt(dateStr.substring(0, 4));
21
- const month = parseInt(dateStr.substring(4, 6));
22
- const day = parseInt(dateStr.substring(6, 8));
23
- instance = DateTime.fromObject({
24
- year,
25
- month,
26
- day
27
- }, { zone: "utc" });
28
- } else if (input < 1e10) instance = DateTime.fromSeconds(input, { zone: "utc" });
29
- else instance = DateTime.fromMillis(input, { zone: "utc" });
30
- else {
31
- const inputString = input.toString().toLowerCase();
32
- instance = DateTime.fromISO(inputString, { zone: "utc" });
33
- if (!instance.isValid) {
34
- const len = inputString.length;
35
- if (23 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss.SSS", { zone: "utc" });
36
- else if (19 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss", { zone: "utc" });
37
- else {
38
- instance = DateTime.fromFormat(inputString, "yyyy MMMM dd", { zone: "utc" });
39
- if (!instance.isValid) instance = DateTime.fromFormat(inputString, "yyyy-MMMM-dd", { zone: "utc" });
16
+ if (input) {
17
+ if (input instanceof Date) instance = DateTime.fromJSDate(input, { zone: "utc" });
18
+ else if (input instanceof DateTime) instance = input.toUTC();
19
+ else if ("number" === typeof input) {
20
+ if (input >= 19000101 && input <= 99991231) {
21
+ const dateStr = input.toString();
22
+ const year = parseInt(dateStr.substring(0, 4));
23
+ const month = parseInt(dateStr.substring(4, 6));
24
+ const day = parseInt(dateStr.substring(6, 8));
25
+ instance = DateTime.fromObject({
26
+ year,
27
+ month,
28
+ day
29
+ }, { zone: "utc" });
30
+ } else if (input < 1e10) instance = DateTime.fromSeconds(input, { zone: "utc" });
31
+ else instance = DateTime.fromMillis(input, { zone: "utc" });
32
+ } else {
33
+ const inputString = input.toString().toLowerCase();
34
+ instance = DateTime.fromISO(inputString, { zone: "utc" });
35
+ if (!instance.isValid) {
36
+ const len = inputString.length;
37
+ if (23 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss.SSS", { zone: "utc" });
38
+ else if (19 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss", { zone: "utc" });
39
+ else {
40
+ instance = DateTime.fromFormat(inputString, "yyyy MMMM dd", { zone: "utc" });
41
+ if (!instance.isValid) instance = DateTime.fromFormat(inputString, "yyyy-MMMM-dd", { zone: "utc" });
42
+ }
40
43
  }
41
44
  }
42
45
  }
@@ -1,5 +1,4 @@
1
1
  import { DateTime } from "luxon";
2
-
3
2
  //#region src/date/date.d.ts
4
3
  type InputDate = Date | DateTime | string | number;
5
4
  type FinancialWeek = {
@@ -1,5 +1,4 @@
1
1
  import { DateTime } from "luxon";
2
-
3
2
  //#region src/date/date.d.ts
4
3
  type InputDate = Date | DateTime | string | number;
5
4
  type FinancialWeek = {
@@ -1,6 +1,5 @@
1
1
  import { Timeframe } from "./date.cjs";
2
2
  import { Interval } from "luxon";
3
-
4
3
  //#region src/date/financialYear.d.ts
5
4
  /**
6
5
  * Get the financial year based on an optional year.
@@ -1,6 +1,5 @@
1
1
  import { Timeframe } from "./date.mjs";
2
2
  import { Interval } from "luxon";
3
-
4
3
  //#region src/date/financialYear.d.ts
5
4
  /**
6
5
  * Get the financial year based on an optional year.
@@ -1,6 +1,5 @@
1
1
  import { InputDate } from "./date.cjs";
2
2
  import { DateTime } from "luxon";
3
-
4
3
  //#region src/date/format.d.ts
5
4
  /**
6
5
  * Convert a number of seconds into HH:MM:SS
@@ -1,6 +1,5 @@
1
1
  import { InputDate } from "./date.mjs";
2
2
  import { DateTime } from "luxon";
3
-
4
3
  //#region src/date/format.d.ts
5
4
  /**
6
5
  * Convert a number of seconds into HH:MM:SS
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../_class/BaseNamespace.cjs";
2
2
  import { defineRelations } from "drizzle-orm";
3
-
4
3
  //#region src/drizzle/server/Drizzle.d.ts
5
4
  type DrizzleConfig<TSchema extends Record<string, unknown> = Record<string, unknown>> = {
6
5
  schema?: TSchema;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../_class/BaseNamespace.mjs";
2
2
  import { defineRelations } from "drizzle-orm";
3
-
4
3
  //#region src/drizzle/server/Drizzle.d.ts
5
4
  type DrizzleConfig<TSchema extends Record<string, unknown> = Record<string, unknown>> = {
6
5
  schema?: TSchema;
@@ -3,7 +3,8 @@ const require_api_get = require("../../api/get.cjs");
3
3
  const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
4
4
  //#region src/emsApi/awsTs/get.ts
5
5
  const getAwsTs = async (path, config = {}) => {
6
- return require_api_get.get(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, {
6
+ const endpoint = require_emsApi_awsTs_endpoint.getAwsTsEndpoint();
7
+ return require_api_get.get(`${endpoint}${path}`, {
7
8
  ...config,
8
9
  headers: {
9
10
  "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
@@ -1,5 +1,6 @@
1
1
  import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
2
2
  import { Config } from "../../api/config.cjs";
3
+ import "../../api/index.cjs";
3
4
  //#region src/emsApi/awsTs/get.d.ts
4
5
  declare const getAwsTs: (path: string, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
6
  //#endregion
@@ -1,5 +1,6 @@
1
1
  import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
2
2
  import { Config } from "../../api/config.mjs";
3
+ import "../../api/index.mjs";
3
4
  //#region src/emsApi/awsTs/get.d.ts
4
5
  declare const getAwsTs: (path: string, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
6
  //#endregion
@@ -2,7 +2,8 @@ import { get } from "../../api/get.mjs";
2
2
  import { getAwsTsEndpoint } from "./endpoint.mjs";
3
3
  //#region src/emsApi/awsTs/get.ts
4
4
  const getAwsTs = async (path, config = {}) => {
5
- return get(`${getAwsTsEndpoint()}${path}`, {
5
+ const endpoint = getAwsTsEndpoint();
6
+ return get(`${endpoint}${path}`, {
6
7
  ...config,
7
8
  headers: {
8
9
  "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",