@8ms/helpers 3.0.21 → 3.0.23

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 (157) hide show
  1. package/dist/adverity/adverity.d.cts +0 -1
  2. package/dist/adverity/adverity.d.mts +0 -1
  3. package/dist/adverity/server/getJobs.d.cts +2 -0
  4. package/dist/adverity/server/getJobs.d.mts +2 -0
  5. package/dist/api/ApiResponseClass.cjs +2 -1
  6. package/dist/api/ApiResponseClass.d.cts +1 -6
  7. package/dist/api/ApiResponseClass.d.mts +1 -6
  8. package/dist/api/ApiResponseClass.mjs +2 -1
  9. package/dist/api/api.d.cts +0 -1
  10. package/dist/api/api.d.mts +0 -1
  11. package/dist/api/deleteRequest.d.cts +0 -1
  12. package/dist/api/deleteRequest.d.mts +0 -1
  13. package/dist/api/functions.d.cts +0 -1
  14. package/dist/api/functions.d.mts +0 -1
  15. package/dist/api/get.d.cts +0 -1
  16. package/dist/api/get.d.mts +0 -1
  17. package/dist/api/post.d.cts +0 -1
  18. package/dist/api/post.d.mts +0 -1
  19. package/dist/atInternet/atInternet.d.cts +0 -1
  20. package/dist/atInternet/atInternet.d.mts +0 -1
  21. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.cts +0 -1
  22. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.mts +0 -1
  23. package/dist/aws/cloudWatchLog/server/logEvent.d.cts +1 -0
  24. package/dist/aws/cloudWatchLog/server/logEvent.d.mts +1 -0
  25. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.cts +0 -1
  26. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.mts +0 -1
  27. package/dist/aws/cloudWatchMetric/server/logMetric.d.cts +1 -1
  28. package/dist/aws/cloudWatchMetric/server/logMetric.d.mts +1 -1
  29. package/dist/aws/ec2/server/AwsEc2.d.cts +0 -1
  30. package/dist/aws/ec2/server/AwsEc2.d.mts +0 -1
  31. package/dist/aws/ecs/server/AwsEcs.d.cts +0 -1
  32. package/dist/aws/ecs/server/AwsEcs.d.mts +0 -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/lambda/server/AwsLambda.d.cts +0 -1
  36. package/dist/aws/lambda/server/AwsLambda.d.mts +0 -1
  37. package/dist/aws/s3/server/AwsS3.d.cts +1 -1
  38. package/dist/aws/s3/server/AwsS3.d.mts +1 -1
  39. package/dist/aws/s3/server/payload.d.cts +0 -1
  40. package/dist/aws/s3/server/payload.d.mts +0 -1
  41. package/dist/aws/server/getAwsConfig.cjs +3 -1
  42. package/dist/aws/server/getAwsConfig.mjs +3 -1
  43. package/dist/aws/ses/server/AwsSes.cjs +4 -11
  44. package/dist/aws/ses/server/AwsSes.d.cts +3 -4
  45. package/dist/aws/ses/server/AwsSes.d.mts +3 -4
  46. package/dist/aws/ses/server/AwsSes.mjs +4 -11
  47. package/dist/aws/ses/server/SimpleEmail.cjs +10 -11
  48. package/dist/aws/ses/server/SimpleEmail.d.cts +3 -12
  49. package/dist/aws/ses/server/SimpleEmail.d.mts +3 -12
  50. package/dist/aws/ses/server/SimpleEmail.mjs +10 -11
  51. package/dist/aws/sqs/server/AwsSqs.d.cts +0 -1
  52. package/dist/aws/sqs/server/AwsSqs.d.mts +0 -1
  53. package/dist/aws/ssm/server/AwsSsm.d.cts +0 -1
  54. package/dist/aws/ssm/server/AwsSsm.d.mts +0 -1
  55. package/dist/brightData/serpApi/server/getAsyncRequestId.d.cts +1 -0
  56. package/dist/brightData/serpApi/server/getAsyncRequestId.d.mts +1 -0
  57. package/dist/brightData/serpApi/server/getAsyncResults.d.cts +1 -1
  58. package/dist/brightData/serpApi/server/getAsyncResults.d.mts +1 -1
  59. package/dist/brightData/serpApi/server/getRealtime.d.cts +0 -1
  60. package/dist/brightData/serpApi/server/getRealtime.d.mts +0 -1
  61. package/dist/brightData/webScraperIde/server/getBatch.d.cts +0 -1
  62. package/dist/brightData/webScraperIde/server/getBatch.d.mts +0 -1
  63. package/dist/brightData/webScraperIde/server/getRealtime.d.cts +0 -1
  64. package/dist/brightData/webScraperIde/server/getRealtime.d.mts +0 -1
  65. package/dist/date/calculation.d.cts +0 -1
  66. package/dist/date/calculation.d.mts +0 -1
  67. package/dist/date/date.d.cts +0 -1
  68. package/dist/date/date.d.mts +0 -1
  69. package/dist/date/financialYear.d.cts +0 -1
  70. package/dist/date/financialYear.d.mts +0 -1
  71. package/dist/date/format.cjs +8 -4
  72. package/dist/date/format.d.cts +0 -1
  73. package/dist/date/format.d.mts +0 -1
  74. package/dist/date/format.mjs +8 -4
  75. package/dist/drizzle/server/Drizzle.d.cts +0 -1
  76. package/dist/drizzle/server/Drizzle.d.mts +0 -1
  77. package/dist/emsApi/awsTs/get.d.cts +1 -0
  78. package/dist/emsApi/awsTs/get.d.mts +1 -0
  79. package/dist/emsApi/awsTs/post.d.cts +1 -0
  80. package/dist/emsApi/awsTs/post.d.mts +1 -0
  81. package/dist/emsApi/vercel/get.d.cts +1 -0
  82. package/dist/emsApi/vercel/get.d.mts +1 -0
  83. package/dist/emsApi/vercel/post.d.cts +1 -0
  84. package/dist/emsApi/vercel/post.d.mts +1 -0
  85. package/dist/environment/environment.cjs +3 -7
  86. package/dist/environment/environment.d.cts +1 -0
  87. package/dist/environment/environment.d.mts +1 -0
  88. package/dist/environment/environment.mjs +3 -7
  89. package/dist/eskimi/eskimi.d.cts +0 -1
  90. package/dist/eskimi/eskimi.d.mts +0 -1
  91. package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.cts +0 -1
  92. package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.mts +0 -1
  93. package/dist/googleAds/server/GoogleAds.d.cts +0 -1
  94. package/dist/googleAds/server/GoogleAds.d.mts +0 -1
  95. package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.cts +0 -1
  96. package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.mts +0 -1
  97. package/dist/googleCloud/bigquery/server/loadData.d.cts +1 -7
  98. package/dist/googleCloud/bigquery/server/loadData.d.mts +1 -7
  99. package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.cts +0 -1
  100. package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.mts +0 -1
  101. package/dist/googleCloud/storage/server/GoogleCloudStorage.d.cts +0 -1
  102. package/dist/googleCloud/storage/server/GoogleCloudStorage.d.mts +0 -1
  103. package/dist/googlePageSpeed/server/GooglePageSpeed.d.cts +0 -1
  104. package/dist/googlePageSpeed/server/GooglePageSpeed.d.mts +0 -1
  105. package/dist/googleSearchIncidents/server/googleSearchIncidents.d.cts +0 -1
  106. package/dist/googleSearchIncidents/server/googleSearchIncidents.d.mts +0 -1
  107. package/dist/greenDomain/server/greenDomain.d.cts +0 -1
  108. package/dist/greenDomain/server/greenDomain.d.mts +0 -1
  109. package/dist/littleWarden/server/LittleWarden.d.cts +0 -1
  110. package/dist/littleWarden/server/LittleWarden.d.mts +0 -1
  111. package/dist/littleWarden/server/littleWardenAttrs.d.cts +3 -10
  112. package/dist/littleWarden/server/littleWardenAttrs.d.mts +3 -10
  113. package/dist/lumar/api/server/buildRequest.d.cts +1 -0
  114. package/dist/lumar/api/server/buildRequest.d.mts +1 -0
  115. package/dist/lumar/api/server/getData.d.cts +1 -0
  116. package/dist/lumar/api/server/getData.d.mts +1 -0
  117. package/dist/lumar/graphql/server/getData.d.cts +1 -0
  118. package/dist/lumar/graphql/server/getData.d.mts +1 -0
  119. package/dist/lumar/graphql/server/queries/getCrawls.d.cts +1 -4
  120. package/dist/lumar/graphql/server/queries/getCrawls.d.mts +1 -4
  121. package/dist/lumar/graphql/server/queries/getReportDifferences.d.cts +1 -5
  122. package/dist/lumar/graphql/server/queries/getReportDifferences.d.mts +1 -5
  123. package/dist/lumar/graphql/server/queries/getRows.d.cts +1 -11
  124. package/dist/lumar/graphql/server/queries/getRows.d.mts +1 -11
  125. package/dist/lumar/graphql/server/queries/getTotals.d.cts +1 -7
  126. package/dist/lumar/graphql/server/queries/getTotals.d.mts +1 -7
  127. package/dist/myTarget/server/myTarget.d.cts +0 -1
  128. package/dist/myTarget/server/myTarget.d.mts +0 -1
  129. package/dist/nextAuth/nextAuth.d.cts +0 -1
  130. package/dist/nextAuth/nextAuth.d.mts +0 -1
  131. package/dist/nextJs/client/LazyLoad.d.cts +0 -1
  132. package/dist/nextJs/client/LazyLoad.d.mts +0 -1
  133. package/dist/onePassword/server/OnePassword.d.cts +0 -1
  134. package/dist/onePassword/server/OnePassword.d.mts +0 -1
  135. package/dist/openAi/server/OpenAi.d.cts +0 -1
  136. package/dist/openAi/server/OpenAi.d.mts +0 -1
  137. package/dist/prisma/server/Prisma.d.cts +0 -1
  138. package/dist/prisma/server/Prisma.d.mts +0 -1
  139. package/dist/snapchat/server/Snapchat.d.cts +0 -1
  140. package/dist/snapchat/server/Snapchat.d.mts +0 -1
  141. package/dist/stream/server/sort.d.cts +0 -1
  142. package/dist/stream/server/sort.d.mts +0 -1
  143. package/dist/swr/client/swr.d.cts +1 -0
  144. package/dist/swr/client/swr.d.mts +1 -0
  145. package/dist/upTimeRobot/server/UpTimeRobot.d.cts +0 -1
  146. package/dist/upTimeRobot/server/UpTimeRobot.d.mts +0 -1
  147. package/dist/util/isUndefined.cjs +2 -1
  148. package/dist/util/isUndefined.mjs +2 -1
  149. package/dist/util/server/getBrotliCompressed.d.cts +0 -1
  150. package/dist/util/server/getBrotliCompressed.d.mts +0 -1
  151. package/dist/util/server/getBrotliDecompressed.d.cts +0 -1
  152. package/dist/util/server/getBrotliDecompressed.d.mts +0 -1
  153. package/dist/util/server/getGzipCompressed.d.cts +0 -1
  154. package/dist/util/server/getGzipCompressed.d.mts +0 -1
  155. package/dist/util/server/getGzipDecompressed.d.cts +0 -1
  156. package/dist/util/server/getGzipDecompressed.d.mts +0 -1
  157. package/package.json +31 -31
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/adverity/adverity.d.ts
4
3
  declare const stackSchema: z.ZodObject<{
5
4
  id: z.ZodString;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/adverity/adverity.d.ts
4
3
  declare const stackSchema: z.ZodObject<{
5
4
  id: z.ZodString;
@@ -1,5 +1,7 @@
1
1
  import { JobSchemaType } from "../adverity.cjs";
2
+ import "../index.cjs";
2
3
  import { InputDate } from "../../date/date.cjs";
4
+ import "../../date/index.cjs";
3
5
  //#region src/adverity/server/getJobs.d.ts
4
6
  type AdverityJobsResponse = {
5
7
  count: number;
@@ -1,5 +1,7 @@
1
1
  import { JobSchemaType } from "../adverity.mjs";
2
+ import "../index.mjs";
2
3
  import { InputDate } from "../../date/date.mjs";
4
+ import "../../date/index.mjs";
3
5
  //#region src/adverity/server/getJobs.d.ts
4
6
  type AdverityJobsResponse = {
5
7
  count: number;
@@ -97,8 +97,9 @@ var ApiResponseClass = class ApiResponseClass {
97
97
  };
98
98
  validateZod = (schema) => {
99
99
  try {
100
+ const validatedBody = schema.parse(this.body);
100
101
  return new ApiResponseClass({
101
- body: schema.parse(this.body),
102
+ body: validatedBody,
102
103
  state: this.state
103
104
  });
104
105
  } catch (error) {
@@ -1,7 +1,6 @@
1
1
  import { ApiResponse, ApiState } from "./api.cjs";
2
2
  import { z } from "zod/v4";
3
3
  import { ZodSafeParseResult } from "zod";
4
-
5
4
  //#region src/api/ApiResponseClass.d.ts
6
5
  type ConstructorProps = {
7
6
  body?: any;
@@ -15,11 +14,7 @@ declare class ApiResponseClass<T = any, E = any> {
15
14
  state: ApiState;
16
15
  body: T | null;
17
16
  error: E | null;
18
- constructor({
19
- body,
20
- error,
21
- state
22
- }?: ConstructorProps);
17
+ constructor({ body, error, state }?: ConstructorProps);
23
18
  fromJson: (input: ApiResponse) => this;
24
19
  getBody: () => any;
25
20
  getBodyDefaultTo: (keys: any | any[], defaultValue: any) => any;
@@ -1,7 +1,6 @@
1
1
  import { ApiResponse, ApiState } from "./api.mjs";
2
2
  import { z } from "zod/v4";
3
3
  import { ZodSafeParseResult } from "zod";
4
-
5
4
  //#region src/api/ApiResponseClass.d.ts
6
5
  type ConstructorProps = {
7
6
  body?: any;
@@ -15,11 +14,7 @@ declare class ApiResponseClass<T = any, E = any> {
15
14
  state: ApiState;
16
15
  body: T | null;
17
16
  error: E | null;
18
- constructor({
19
- body,
20
- error,
21
- state
22
- }?: ConstructorProps);
17
+ constructor({ body, error, state }?: ConstructorProps);
23
18
  fromJson: (input: ApiResponse) => this;
24
19
  getBody: () => any;
25
20
  getBodyDefaultTo: (keys: any | any[], defaultValue: any) => any;
@@ -96,8 +96,9 @@ var ApiResponseClass = class ApiResponseClass {
96
96
  };
97
97
  validateZod = (schema) => {
98
98
  try {
99
+ const validatedBody = schema.parse(this.body);
99
100
  return new ApiResponseClass({
100
- body: schema.parse(this.body),
101
+ body: validatedBody,
101
102
  state: this.state
102
103
  });
103
104
  } catch (error) {
@@ -1,5 +1,4 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
-
3
2
  //#region src/api/api.d.ts
4
3
  declare const apiState: {
5
4
  readonly CANCELLED: "CANCELLED";
@@ -1,5 +1,4 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
-
3
2
  //#region src/api/api.d.ts
4
3
  declare const apiState: {
5
4
  readonly CANCELLED: "CANCELLED";
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
2
  import { Config } from "./config.cjs";
3
-
4
3
  //#region src/api/deleteRequest.d.ts
5
4
  /**
6
5
  * Make a DELETE request.
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
2
  import { Config } from "./config.mjs";
3
-
4
3
  //#region src/api/deleteRequest.d.ts
5
4
  /**
6
5
  * Make a DELETE request.
@@ -1,5 +1,4 @@
1
1
  import { ApiResponse } from "./api.cjs";
2
-
3
2
  //#region src/api/functions.d.ts
4
3
  declare const isCancelled: (apiResponse: ApiResponse) => boolean;
5
4
  declare const isError: (apiResponse: ApiResponse) => boolean;
@@ -1,5 +1,4 @@
1
1
  import { ApiResponse } from "./api.mjs";
2
-
3
2
  //#region src/api/functions.d.ts
4
3
  declare const isCancelled: (apiResponse: ApiResponse) => boolean;
5
4
  declare const isError: (apiResponse: ApiResponse) => boolean;
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
2
  import { Config } from "./config.cjs";
3
-
4
3
  //#region src/api/get.d.ts
5
4
  /**
6
5
  * Make a GET request.
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
2
  import { Config } from "./config.mjs";
3
-
4
3
  //#region src/api/get.d.ts
5
4
  /**
6
5
  * Make a GET request.
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
2
  import { Config } from "./config.cjs";
3
-
4
3
  //#region src/api/post.d.ts
5
4
  /**
6
5
  * Make a POST request.
@@ -1,6 +1,5 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
2
  import { Config } from "./config.mjs";
3
-
4
3
  //#region src/api/post.d.ts
5
4
  /**
6
5
  * Make a POST request.
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/atInternet/atInternet.d.ts
4
3
  /**
5
4
  * The request in the structure required by AT Internet.
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/atInternet/atInternet.d.ts
4
3
  /**
5
4
  * The request in the structure required by AT Internet.
@@ -1,7 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { LogEvent } from "./logEvent.cjs";
3
3
  import { CloudWatchLogsClient } from "@aws-sdk/client-cloudwatch-logs";
4
-
5
4
  //#region src/aws/cloudWatchLog/server/AwsCloudWatchLog.d.ts
6
5
  declare class AwsCloudWatchLog extends BaseNamespace {
7
6
  client: CloudWatchLogsClient;
@@ -1,7 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { LogEvent } from "./logEvent.mjs";
3
3
  import { CloudWatchLogsClient } from "@aws-sdk/client-cloudwatch-logs";
4
-
5
4
  //#region src/aws/cloudWatchLog/server/AwsCloudWatchLog.d.ts
6
5
  declare class AwsCloudWatchLog extends BaseNamespace {
7
6
  client: CloudWatchLogsClient;
@@ -1,4 +1,5 @@
1
1
  import { InputDate } from "../../../date/date.cjs";
2
+ import "../../../date/index.cjs";
2
3
  //#region src/aws/cloudWatchLog/server/logEvent.d.ts
3
4
  declare const logLevel: {
4
5
  readonly INFO: "info";
@@ -1,4 +1,5 @@
1
1
  import { InputDate } from "../../../date/date.mjs";
2
+ import "../../../date/index.mjs";
2
3
  //#region src/aws/cloudWatchLog/server/logEvent.d.ts
3
4
  declare const logLevel: {
4
5
  readonly INFO: "info";
@@ -1,7 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { LogMetric } from "./logMetric.cjs";
3
3
  import { CloudWatchClient } from "@aws-sdk/client-cloudwatch";
4
-
5
4
  //#region src/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.ts
6
5
  declare class AwsCloudWatchMetric extends BaseNamespace {
7
6
  client: CloudWatchClient;
@@ -1,7 +1,6 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { LogMetric } from "./logMetric.mjs";
3
3
  import { CloudWatchClient } from "@aws-sdk/client-cloudwatch";
4
-
5
4
  //#region src/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.ts
6
5
  declare class AwsCloudWatchMetric extends BaseNamespace {
7
6
  client: CloudWatchClient;
@@ -1,6 +1,6 @@
1
1
  import { InputDate } from "../../../date/date.cjs";
2
+ import "../../../date/index.cjs";
2
3
  import { StandardUnit } from "@aws-sdk/client-cloudwatch";
3
-
4
4
  //#region src/aws/cloudWatchMetric/server/logMetric.d.ts
5
5
  type LogMetric = {
6
6
  metricName: string;
@@ -1,6 +1,6 @@
1
1
  import { InputDate } from "../../../date/date.mjs";
2
+ import "../../../date/index.mjs";
2
3
  import { StandardUnit } from "@aws-sdk/client-cloudwatch";
3
-
4
4
  //#region src/aws/cloudWatchMetric/server/logMetric.d.ts
5
5
  type LogMetric = {
6
6
  metricName: string;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { EC2Client } from "@aws-sdk/client-ec2";
3
-
4
3
  //#region src/aws/ec2/server/AwsEc2.d.ts
5
4
  declare class AwsEc2 extends BaseNamespace {
6
5
  client: EC2Client;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { EC2Client } from "@aws-sdk/client-ec2";
3
-
4
3
  //#region src/aws/ec2/server/AwsEc2.d.ts
5
4
  declare class AwsEc2 extends BaseNamespace {
6
5
  client: EC2Client;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { DesiredStatus, ECSClient, LaunchType, NetworkConfiguration, SortOrder, TaskDefinitionStatus, TaskOverride } from "@aws-sdk/client-ecs";
3
-
4
3
  //#region src/aws/ecs/server/AwsEcs.d.ts
5
4
  type GetTaskDefinitionsProps = {
6
5
  familyPrefix?: string;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { DesiredStatus, ECSClient, LaunchType, NetworkConfiguration, SortOrder, TaskDefinitionStatus, TaskOverride } from "@aws-sdk/client-ecs";
3
-
4
3
  //#region src/aws/ecs/server/AwsEcs.d.ts
5
4
  type GetTaskDefinitionsProps = {
6
5
  familyPrefix?: string;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { GlueClient } from "@aws-sdk/client-glue";
3
-
4
3
  //#region src/aws/glue/server/AwsGlue.d.ts
5
4
  declare class AwsGlue extends BaseNamespace {
6
5
  client: GlueClient;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { GlueClient } from "@aws-sdk/client-glue";
3
-
4
3
  //#region src/aws/glue/server/AwsGlue.d.ts
5
4
  declare class AwsGlue extends BaseNamespace {
6
5
  client: GlueClient;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { LambdaClient } from "@aws-sdk/client-lambda";
3
-
4
3
  //#region src/aws/lambda/server/AwsLambda.d.ts
5
4
  type InvokeProps = {
6
5
  awaitResponse?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { LambdaClient } from "@aws-sdk/client-lambda";
3
-
4
3
  //#region src/aws/lambda/server/AwsLambda.d.ts
5
4
  type InvokeProps = {
6
5
  awaitResponse?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
2
  import { Modified, ReadFileResponse } from "./awsS3File.cjs";
3
+ import "./index.cjs";
3
4
  import { S3Client } from "@aws-sdk/client-s3";
4
-
5
5
  //#region src/aws/s3/server/AwsS3.d.ts
6
6
  type ReadBufferResponse = Modified & {
7
7
  buffer: any;
@@ -1,7 +1,7 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
2
  import { Modified, ReadFileResponse } from "./awsS3File.mjs";
3
+ import "./index.mjs";
3
4
  import { S3Client } from "@aws-sdk/client-s3";
4
-
5
5
  //#region src/aws/s3/server/AwsS3.d.ts
6
6
  type ReadBufferResponse = Modified & {
7
7
  buffer: any;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/aws/s3/server/payload.d.ts
4
3
  /**
5
4
  * https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-content-structure.html
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod/v4";
2
-
3
2
  //#region src/aws/s3/server/payload.d.ts
4
3
  /**
5
4
  * https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-content-structure.html
@@ -28,8 +28,10 @@ const getAwsConfig = async (props) => {
28
28
  if (props.oidcRoleArn && require_environment_environment.isVercel()) {
29
29
  const { awsCredentialsProvider } = await import("@vercel/oidc-aws-credentials-provider");
30
30
  credentials = await awsCredentialsProvider({ roleArn: props.oidcRoleArn })();
31
+ } else if (props.oidcRoleArn && require_environment_environment.isGoogleCloud()) {
32
+ const gcpToken = await getGcpOidcToken();
33
+ credentials = await assumeAwsRoleWithGcpToken(gcpToken, props);
31
34
  }
32
- if (props.oidcRoleArn && require_environment_environment.isGoogleCloud()) credentials = await assumeAwsRoleWithGcpToken(await getGcpOidcToken(), props);
33
35
  return { credentials };
34
36
  };
35
37
  //#endregion
@@ -27,8 +27,10 @@ const getAwsConfig = async (props) => {
27
27
  if (props.oidcRoleArn && isVercel()) {
28
28
  const { awsCredentialsProvider } = await import("@vercel/oidc-aws-credentials-provider");
29
29
  credentials = await awsCredentialsProvider({ roleArn: props.oidcRoleArn })();
30
+ } else if (props.oidcRoleArn && isGoogleCloud()) {
31
+ const gcpToken = await getGcpOidcToken();
32
+ credentials = await assumeAwsRoleWithGcpToken(gcpToken, props);
30
33
  }
31
- if (props.oidcRoleArn && isGoogleCloud()) credentials = await assumeAwsRoleWithGcpToken(await getGcpOidcToken(), props);
32
34
  return { credentials };
33
35
  };
34
36
  //#endregion
@@ -4,8 +4,8 @@ const require__class_BaseNamespace = require("../../../_class/BaseNamespace.cjs"
4
4
  var AwsSes = class extends require__class_BaseNamespace.BaseNamespace {
5
5
  init = async (config, region) => {
6
6
  if (!this.client) try {
7
- const { SESClient } = await import("@aws-sdk/client-ses");
8
- this.client = new SESClient({
7
+ const { SESv2Client } = await import("@aws-sdk/client-sesv2");
8
+ this.client = new SESv2Client({
9
9
  ...config,
10
10
  region: region ?? "eu-west-2"
11
11
  });
@@ -17,20 +17,13 @@ var AwsSes = class extends require__class_BaseNamespace.BaseNamespace {
17
17
  };
18
18
  send = async (input) => {
19
19
  let response;
20
- if (input?.Message?.Body?.Html?.Data) try {
21
- const { SendEmailCommand } = await import("@aws-sdk/client-ses");
20
+ try {
21
+ const { SendEmailCommand } = await import("@aws-sdk/client-sesv2");
22
22
  const command = new SendEmailCommand(input);
23
23
  response = await this.client.send(command);
24
24
  } catch (exception) {
25
25
  response = exception;
26
26
  }
27
- else try {
28
- const { SendRawEmailCommand } = await import("@aws-sdk/client-ses");
29
- const command = new SendRawEmailCommand(input);
30
- response = await this.client.send(command);
31
- } catch (exception) {
32
- response = exception;
33
- }
34
27
  return response;
35
28
  };
36
29
  };
@@ -1,12 +1,11 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
2
- import { SESClient, SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
3
-
2
+ import { SESv2Client, SendEmailCommandInput } from "@aws-sdk/client-sesv2";
4
3
  //#region src/aws/ses/server/AwsSes.d.ts
5
4
  declare class AwsSes extends BaseNamespace {
6
- client: SESClient;
5
+ client: SESv2Client;
7
6
  config: any;
8
7
  init: (config: any, region?: string) => Promise<this>;
9
- send: (input: SendEmailCommandInput | SendRawEmailCommandInput) => Promise<unknown>;
8
+ send: (input: SendEmailCommandInput) => Promise<unknown>;
10
9
  }
11
10
  //#endregion
12
11
  export { AwsSes };
@@ -1,12 +1,11 @@
1
1
  import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
2
- import { SESClient, SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
3
-
2
+ import { SESv2Client, SendEmailCommandInput } from "@aws-sdk/client-sesv2";
4
3
  //#region src/aws/ses/server/AwsSes.d.ts
5
4
  declare class AwsSes extends BaseNamespace {
6
- client: SESClient;
5
+ client: SESv2Client;
7
6
  config: any;
8
7
  init: (config: any, region?: string) => Promise<this>;
9
- send: (input: SendEmailCommandInput | SendRawEmailCommandInput) => Promise<unknown>;
8
+ send: (input: SendEmailCommandInput) => Promise<unknown>;
10
9
  }
11
10
  //#endregion
12
11
  export { AwsSes };
@@ -3,8 +3,8 @@ import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
3
3
  var AwsSes = class extends BaseNamespace {
4
4
  init = async (config, region) => {
5
5
  if (!this.client) try {
6
- const { SESClient } = await import("@aws-sdk/client-ses");
7
- this.client = new SESClient({
6
+ const { SESv2Client } = await import("@aws-sdk/client-sesv2");
7
+ this.client = new SESv2Client({
8
8
  ...config,
9
9
  region: region ?? "eu-west-2"
10
10
  });
@@ -16,20 +16,13 @@ var AwsSes = class extends BaseNamespace {
16
16
  };
17
17
  send = async (input) => {
18
18
  let response;
19
- if (input?.Message?.Body?.Html?.Data) try {
20
- const { SendEmailCommand } = await import("@aws-sdk/client-ses");
19
+ try {
20
+ const { SendEmailCommand } = await import("@aws-sdk/client-sesv2");
21
21
  const command = new SendEmailCommand(input);
22
22
  response = await this.client.send(command);
23
23
  } catch (exception) {
24
24
  response = exception;
25
25
  }
26
- else try {
27
- const { SendRawEmailCommand } = await import("@aws-sdk/client-ses");
28
- const command = new SendRawEmailCommand(input);
29
- response = await this.client.send(command);
30
- } catch (exception) {
31
- response = exception;
32
- }
33
26
  return response;
34
27
  };
35
28
  };
@@ -83,7 +83,7 @@ var SimpleEmail = class extends require__class_BaseClass.BaseClass {
83
83
  CcAddresses: this._filterRecipients("cc"),
84
84
  ToAddresses: this._filterRecipients("to")
85
85
  },
86
- Message: {
86
+ Content: { Simple: {
87
87
  Body: {
88
88
  Html: {
89
89
  Charset: "UTF-8",
@@ -98,17 +98,12 @@ var SimpleEmail = class extends require__class_BaseClass.BaseClass {
98
98
  Charset: "UTF-8",
99
99
  Data: this.subject ?? ""
100
100
  }
101
- },
102
- Source: this.from ?? ""
101
+ } },
102
+ FromEmailAddress: this.from ?? ""
103
103
  };
104
104
  };
105
105
  _getRawEmailParams = async () => {
106
106
  const boundary = `----=_NextPart_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
107
- const allRecipients = [
108
- ...this._filterRecipients("to"),
109
- ...this._filterRecipients("cc"),
110
- ...this._filterRecipients("bcc")
111
- ];
112
107
  let rawMessage = "";
113
108
  rawMessage += `From: ${this.from}\r\n`;
114
109
  if (this._filterRecipients("to").length > 0) rawMessage += `To: ${this._filterRecipients("to").join(", ")}\r\n`;
@@ -137,9 +132,13 @@ var SimpleEmail = class extends require__class_BaseClass.BaseClass {
137
132
  }
138
133
  rawMessage += `--${boundary}--\r\n`;
139
134
  return {
140
- Destinations: allRecipients,
141
- RawMessage: { Data: Buffer.from(rawMessage) },
142
- Source: this.from ?? ""
135
+ Destination: {
136
+ ToAddresses: this._filterRecipients("to"),
137
+ CcAddresses: this._filterRecipients("cc"),
138
+ BccAddresses: this._filterRecipients("bcc")
139
+ },
140
+ Content: { Raw: { Data: Buffer.from(rawMessage) } },
141
+ FromEmailAddress: this.from ?? ""
143
142
  };
144
143
  };
145
144
  _isTextFile = (contentType) => {
@@ -1,6 +1,5 @@
1
1
  import { BaseClass } from "../../../_class/BaseClass.cjs";
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;
@@ -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;