@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.
- package/dist/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/adverity/adverity.d.cts +0 -1
- package/dist/adverity/adverity.d.mts +0 -1
- package/dist/adverity/server/getJobs.d.cts +2 -0
- package/dist/adverity/server/getJobs.d.mts +2 -0
- package/dist/api/ApiResponseClass.d.cts +1 -6
- package/dist/api/ApiResponseClass.d.mts +1 -6
- package/dist/api/api.d.cts +0 -1
- package/dist/api/api.d.mts +0 -1
- package/dist/api/deleteRequest.d.cts +0 -1
- package/dist/api/deleteRequest.d.mts +0 -1
- package/dist/api/functions.d.cts +0 -1
- package/dist/api/functions.d.mts +0 -1
- package/dist/api/get.d.cts +0 -1
- package/dist/api/get.d.mts +0 -1
- package/dist/api/post.d.cts +0 -1
- package/dist/api/post.d.mts +0 -1
- package/dist/atInternet/atInternet.d.cts +0 -1
- package/dist/atInternet/atInternet.d.mts +0 -1
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.cts +0 -1
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLog.d.mts +0 -1
- package/dist/aws/cloudWatchLog/server/logEvent.d.cts +1 -0
- package/dist/aws/cloudWatchLog/server/logEvent.d.mts +1 -0
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.cts +0 -1
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetric.d.mts +0 -1
- package/dist/aws/cloudWatchMetric/server/logMetric.d.cts +1 -1
- package/dist/aws/cloudWatchMetric/server/logMetric.d.mts +1 -1
- package/dist/aws/ec2/server/AwsEc2.d.cts +0 -1
- package/dist/aws/ec2/server/AwsEc2.d.mts +0 -1
- package/dist/aws/ecs/server/AwsEcs.d.cts +0 -1
- package/dist/aws/ecs/server/AwsEcs.d.mts +0 -1
- package/dist/aws/glue/server/AwsGlue.cjs +2 -1
- package/dist/aws/glue/server/AwsGlue.d.cts +0 -1
- package/dist/aws/glue/server/AwsGlue.d.mts +0 -1
- package/dist/aws/glue/server/AwsGlue.mjs +2 -1
- package/dist/aws/lambda/server/AwsLambda.cjs +10 -8
- package/dist/aws/lambda/server/AwsLambda.d.cts +0 -1
- package/dist/aws/lambda/server/AwsLambda.d.mts +0 -1
- package/dist/aws/lambda/server/AwsLambda.mjs +10 -8
- package/dist/aws/s3/server/AwsS3.cjs +3 -2
- package/dist/aws/s3/server/AwsS3.d.cts +1 -1
- package/dist/aws/s3/server/AwsS3.d.mts +1 -1
- package/dist/aws/s3/server/AwsS3.mjs +3 -2
- package/dist/aws/s3/server/payload.d.cts +0 -1
- package/dist/aws/s3/server/payload.d.mts +0 -1
- package/dist/aws/ses/server/AwsSes.cjs +4 -11
- package/dist/aws/ses/server/AwsSes.d.cts +3 -4
- package/dist/aws/ses/server/AwsSes.d.mts +3 -4
- package/dist/aws/ses/server/AwsSes.mjs +4 -11
- package/dist/aws/ses/server/SimpleEmail.cjs +10 -11
- package/dist/aws/ses/server/SimpleEmail.d.cts +3 -12
- package/dist/aws/ses/server/SimpleEmail.d.mts +3 -12
- package/dist/aws/ses/server/SimpleEmail.mjs +10 -11
- package/dist/aws/sqs/server/AwsSqs.d.cts +0 -1
- package/dist/aws/sqs/server/AwsSqs.d.mts +0 -1
- package/dist/aws/ssm/server/AwsSsm.cjs +5 -4
- package/dist/aws/ssm/server/AwsSsm.d.cts +0 -1
- package/dist/aws/ssm/server/AwsSsm.d.mts +0 -1
- package/dist/aws/ssm/server/AwsSsm.mjs +5 -4
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.cjs +0 -2
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.mjs +0 -2
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.cjs +0 -1
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.mjs +0 -1
- package/dist/brightData/serpApi/server/getAsyncRequestId.d.cts +1 -0
- package/dist/brightData/serpApi/server/getAsyncRequestId.d.mts +1 -0
- package/dist/brightData/serpApi/server/getAsyncResults.cjs +7 -4
- package/dist/brightData/serpApi/server/getAsyncResults.d.cts +1 -1
- package/dist/brightData/serpApi/server/getAsyncResults.d.mts +1 -1
- package/dist/brightData/serpApi/server/getAsyncResults.mjs +7 -4
- package/dist/brightData/serpApi/server/getRealtime.d.cts +0 -1
- package/dist/brightData/serpApi/server/getRealtime.d.mts +0 -1
- package/dist/brightData/webScraperIde/server/getBatch.d.cts +0 -1
- package/dist/brightData/webScraperIde/server/getBatch.d.mts +0 -1
- package/dist/brightData/webScraperIde/server/getRealtime.cjs +10 -6
- package/dist/brightData/webScraperIde/server/getRealtime.d.cts +0 -1
- package/dist/brightData/webScraperIde/server/getRealtime.d.mts +0 -1
- package/dist/brightData/webScraperIde/server/getRealtime.mjs +10 -6
- package/dist/date/calculation.cjs +27 -24
- package/dist/date/calculation.d.cts +0 -1
- package/dist/date/calculation.d.mts +0 -1
- package/dist/date/calculation.mjs +27 -24
- package/dist/date/date.d.cts +0 -1
- package/dist/date/date.d.mts +0 -1
- package/dist/date/financialYear.d.cts +0 -1
- package/dist/date/financialYear.d.mts +0 -1
- package/dist/date/format.d.cts +0 -1
- package/dist/date/format.d.mts +0 -1
- package/dist/drizzle/server/Drizzle.d.cts +0 -1
- package/dist/drizzle/server/Drizzle.d.mts +0 -1
- package/dist/emsApi/awsTs/get.cjs +2 -1
- package/dist/emsApi/awsTs/get.d.cts +1 -0
- package/dist/emsApi/awsTs/get.d.mts +1 -0
- package/dist/emsApi/awsTs/get.mjs +2 -1
- package/dist/emsApi/awsTs/post.cjs +2 -1
- package/dist/emsApi/awsTs/post.d.cts +1 -0
- package/dist/emsApi/awsTs/post.d.mts +1 -0
- package/dist/emsApi/awsTs/post.mjs +2 -1
- package/dist/emsApi/vercel/get.cjs +2 -1
- package/dist/emsApi/vercel/get.d.cts +1 -0
- package/dist/emsApi/vercel/get.d.mts +1 -0
- package/dist/emsApi/vercel/get.mjs +2 -1
- package/dist/emsApi/vercel/post.cjs +2 -1
- package/dist/emsApi/vercel/post.d.cts +1 -0
- package/dist/emsApi/vercel/post.d.mts +1 -0
- package/dist/emsApi/vercel/post.mjs +2 -1
- package/dist/eskimi/eskimi.d.cts +0 -1
- package/dist/eskimi/eskimi.d.mts +0 -1
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.cts +0 -1
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.mts +0 -1
- package/dist/googleAds/server/GoogleAds.d.cts +0 -1
- package/dist/googleAds/server/GoogleAds.d.mts +0 -1
- package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.cts +0 -1
- package/dist/googleCloud/bigquery/server/GoogleCloudBigquery.d.mts +0 -1
- package/dist/googleCloud/bigquery/server/loadData.d.cts +1 -7
- package/dist/googleCloud/bigquery/server/loadData.d.mts +1 -7
- package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.cts +1 -2
- package/dist/googleCloud/sheets/server/GoogleCloudSheets.d.mts +1 -2
- package/dist/googleCloud/storage/server/GoogleCloudStorage.d.cts +0 -1
- package/dist/googleCloud/storage/server/GoogleCloudStorage.d.mts +0 -1
- package/dist/googlePageSpeed/server/GooglePageSpeed.cjs +2 -1
- package/dist/googlePageSpeed/server/GooglePageSpeed.d.cts +0 -1
- package/dist/googlePageSpeed/server/GooglePageSpeed.d.mts +0 -1
- package/dist/googlePageSpeed/server/GooglePageSpeed.mjs +2 -1
- package/dist/googleSearchIncidents/server/googleSearchIncidents.d.cts +0 -1
- package/dist/googleSearchIncidents/server/googleSearchIncidents.d.mts +0 -1
- package/dist/greenDomain/server/greenDomain.cjs +2 -1
- package/dist/greenDomain/server/greenDomain.d.cts +0 -1
- package/dist/greenDomain/server/greenDomain.d.mts +0 -1
- package/dist/greenDomain/server/greenDomain.mjs +2 -1
- package/dist/littleWarden/server/LittleWarden.cjs +2 -1
- package/dist/littleWarden/server/LittleWarden.d.cts +0 -1
- package/dist/littleWarden/server/LittleWarden.d.mts +0 -1
- package/dist/littleWarden/server/LittleWarden.mjs +2 -1
- package/dist/littleWarden/server/littleWardenAttrs.d.cts +3 -10
- package/dist/littleWarden/server/littleWardenAttrs.d.mts +3 -10
- package/dist/lumar/api/server/buildRequest.cjs +0 -1
- package/dist/lumar/api/server/buildRequest.d.cts +1 -0
- package/dist/lumar/api/server/buildRequest.d.mts +1 -0
- package/dist/lumar/api/server/buildRequest.mjs +0 -1
- package/dist/lumar/api/server/getData.d.cts +1 -0
- package/dist/lumar/api/server/getData.d.mts +1 -0
- package/dist/lumar/graphql/server/getData.d.cts +1 -0
- package/dist/lumar/graphql/server/getData.d.mts +1 -0
- package/dist/lumar/graphql/server/queries/getCrawls.d.cts +1 -4
- package/dist/lumar/graphql/server/queries/getCrawls.d.mts +1 -4
- package/dist/lumar/graphql/server/queries/getReportDifferences.d.cts +1 -5
- package/dist/lumar/graphql/server/queries/getReportDifferences.d.mts +1 -5
- package/dist/lumar/graphql/server/queries/getRows.d.cts +1 -11
- package/dist/lumar/graphql/server/queries/getRows.d.mts +1 -11
- package/dist/lumar/graphql/server/queries/getTotals.d.cts +1 -7
- package/dist/lumar/graphql/server/queries/getTotals.d.mts +1 -7
- package/dist/myTarget/server/myTarget.d.cts +0 -1
- package/dist/myTarget/server/myTarget.d.mts +0 -1
- package/dist/nextAuth/nextAuth.d.cts +0 -1
- package/dist/nextAuth/nextAuth.d.mts +0 -1
- package/dist/nextJs/client/LazyLoad.d.cts +0 -1
- package/dist/nextJs/client/LazyLoad.d.mts +0 -1
- package/dist/onePassword/server/OnePassword.d.cts +0 -1
- package/dist/onePassword/server/OnePassword.d.mts +0 -1
- package/dist/openAi/server/OpenAi.d.cts +0 -1
- package/dist/openAi/server/OpenAi.d.mts +0 -1
- package/dist/prisma/server/Prisma.d.cts +0 -1
- package/dist/prisma/server/Prisma.d.mts +0 -1
- package/dist/snapchat/server/Snapchat.cjs +3 -2
- package/dist/snapchat/server/Snapchat.d.cts +0 -1
- package/dist/snapchat/server/Snapchat.d.mts +0 -1
- package/dist/snapchat/server/Snapchat.mjs +3 -2
- package/dist/stream/server/sort.d.cts +0 -1
- package/dist/stream/server/sort.d.mts +0 -1
- package/dist/swr/client/swr.d.cts +1 -0
- package/dist/swr/client/swr.d.mts +1 -0
- package/dist/upTimeRobot/server/UpTimeRobot.d.cts +0 -1
- package/dist/upTimeRobot/server/UpTimeRobot.d.mts +0 -1
- package/dist/util/defaultTo.cjs +6 -3
- package/dist/util/defaultTo.mjs +6 -3
- package/dist/util/server/getBrotliCompressed.d.cts +0 -1
- package/dist/util/server/getBrotliCompressed.d.mts +0 -1
- package/dist/util/server/getBrotliDecompressed.d.cts +0 -1
- package/dist/util/server/getBrotliDecompressed.d.mts +0 -1
- package/dist/util/server/getGzipCompressed.d.cts +0 -1
- package/dist/util/server/getGzipCompressed.d.mts +0 -1
- package/dist/util/server/getGzipDecompressed.d.cts +0 -1
- package/dist/util/server/getGzipDecompressed.d.mts +0 -1
- package/dist/xlsx/cell.cjs +102 -0
- package/dist/xlsx/cell.d.cts +38 -0
- package/dist/xlsx/cell.d.mts +38 -0
- package/dist/xlsx/cell.mjs +97 -0
- package/dist/xlsx/column.cjs +37 -0
- package/dist/xlsx/column.d.cts +23 -0
- package/dist/xlsx/column.d.mts +23 -0
- package/dist/xlsx/column.mjs +35 -0
- package/dist/xlsx/createXlsx.cjs +138 -0
- package/dist/xlsx/createXlsx.d.cts +18 -0
- package/dist/xlsx/createXlsx.d.mts +18 -0
- package/dist/xlsx/createXlsx.mjs +136 -0
- package/dist/xlsx/index.cjs +18 -0
- package/dist/xlsx/index.d.cts +6 -0
- package/dist/xlsx/index.d.mts +6 -0
- package/dist/xlsx/index.mjs +6 -0
- package/dist/xlsx/modifyXlsx.cjs +125 -0
- package/dist/xlsx/modifyXlsx.d.cts +24 -0
- package/dist/xlsx/modifyXlsx.d.mts +24 -0
- package/dist/xlsx/modifyXlsx.mjs +124 -0
- package/dist/xlsx/sheet.cjs +36 -0
- package/dist/xlsx/sheet.d.cts +29 -0
- package/dist/xlsx/sheet.d.mts +29 -0
- package/dist/xlsx/sheet.mjs +34 -0
- package/package.json +103 -57
|
@@ -15,7 +15,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
@@ -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;
|
package/dist/api/api.d.cts
CHANGED
package/dist/api/api.d.mts
CHANGED
package/dist/api/functions.d.cts
CHANGED
package/dist/api/functions.d.mts
CHANGED
package/dist/api/get.d.cts
CHANGED
package/dist/api/get.d.mts
CHANGED
package/dist/api/post.d.cts
CHANGED
package/dist/api/post.d.mts
CHANGED
|
@@ -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,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,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;
|
|
@@ -23,7 +23,8 @@ var AwsGlue = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
23
23
|
invoke = async (crawler) => {
|
|
24
24
|
const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
|
|
25
25
|
const command = new StartCrawlerCommand({ Name: crawler });
|
|
26
|
-
|
|
26
|
+
const apiResponse = await this.client.send(command);
|
|
27
|
+
return require_aws_server_isResponse200.isResponse200(apiResponse);
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
//#endregion
|
|
@@ -22,7 +22,8 @@ var AwsGlue = class extends BaseNamespace {
|
|
|
22
22
|
invoke = async (crawler) => {
|
|
23
23
|
const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
|
|
24
24
|
const command = new StartCrawlerCommand({ Name: crawler });
|
|
25
|
-
|
|
25
|
+
const apiResponse = await this.client.send(command);
|
|
26
|
+
return isResponse200(apiResponse);
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
//#endregion
|
|
@@ -34,14 +34,16 @@ var AwsLambda = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
34
34
|
if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
|
|
35
35
|
const command = new InvokeCommand(params);
|
|
36
36
|
const apiResponse = await this.client.send(command);
|
|
37
|
-
if (require_aws_server_isResponse200.isResponse200(apiResponse))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
if (require_aws_server_isResponse200.isResponse200(apiResponse)) {
|
|
38
|
+
if (props.awaitResponse && void 0 !== apiResponse.Payload) {
|
|
39
|
+
response = new TextDecoder("ascii").decode(apiResponse.Payload);
|
|
40
|
+
if (true === props.isJson) {
|
|
41
|
+
response = JSON.parse(response);
|
|
42
|
+
if ("string" === typeof response) response = JSON.parse(response);
|
|
43
|
+
if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new require_api_ApiResponseClass.ApiResponseClass().fromJson(response);
|
|
44
|
+
}
|
|
45
|
+
} else response = true;
|
|
46
|
+
}
|
|
45
47
|
return response;
|
|
46
48
|
};
|
|
47
49
|
};
|
|
@@ -33,14 +33,16 @@ var AwsLambda = class extends BaseNamespace {
|
|
|
33
33
|
if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
|
|
34
34
|
const command = new InvokeCommand(params);
|
|
35
35
|
const apiResponse = await this.client.send(command);
|
|
36
|
-
if (isResponse200(apiResponse))
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
if (isResponse200(apiResponse)) {
|
|
37
|
+
if (props.awaitResponse && void 0 !== apiResponse.Payload) {
|
|
38
|
+
response = new TextDecoder("ascii").decode(apiResponse.Payload);
|
|
39
|
+
if (true === props.isJson) {
|
|
40
|
+
response = JSON.parse(response);
|
|
41
|
+
if ("string" === typeof response) response = JSON.parse(response);
|
|
42
|
+
if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new ApiResponseClass().fromJson(response);
|
|
43
|
+
}
|
|
44
|
+
} else response = true;
|
|
45
|
+
}
|
|
44
46
|
return response;
|
|
45
47
|
};
|
|
46
48
|
};
|
|
@@ -180,10 +180,11 @@ var AwsS3 = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
180
180
|
let response = false;
|
|
181
181
|
try {
|
|
182
182
|
const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
|
|
183
|
-
|
|
183
|
+
const apiResponse = await this.client.send(new HeadObjectCommand({
|
|
184
184
|
Bucket: bucket,
|
|
185
185
|
Key: key
|
|
186
|
-
}))
|
|
186
|
+
}));
|
|
187
|
+
response = require_aws_server_isResponse200.isResponse200(apiResponse);
|
|
187
188
|
} catch (exception) {
|
|
188
189
|
response = false;
|
|
189
190
|
}
|
|
@@ -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;
|
|
@@ -177,10 +177,11 @@ var AwsS3 = class extends BaseNamespace {
|
|
|
177
177
|
let response = false;
|
|
178
178
|
try {
|
|
179
179
|
const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
|
|
180
|
-
|
|
180
|
+
const apiResponse = await this.client.send(new HeadObjectCommand({
|
|
181
181
|
Bucket: bucket,
|
|
182
182
|
Key: key
|
|
183
|
-
}))
|
|
183
|
+
}));
|
|
184
|
+
response = isResponse200(apiResponse);
|
|
184
185
|
} catch (exception) {
|
|
185
186
|
response = false;
|
|
186
187
|
}
|
|
@@ -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 {
|
|
8
|
-
this.client = new
|
|
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
|
-
|
|
21
|
-
const { SendEmailCommand } = await import("@aws-sdk/client-
|
|
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 {
|
|
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:
|
|
5
|
+
client: SESv2Client;
|
|
7
6
|
config: any;
|
|
8
7
|
init: (config: any, region?: string) => Promise<this>;
|
|
9
|
-
send: (input: SendEmailCommandInput
|
|
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 {
|
|
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:
|
|
5
|
+
client: SESv2Client;
|
|
7
6
|
config: any;
|
|
8
7
|
init: (config: any, region?: string) => Promise<this>;
|
|
9
|
-
send: (input: SendEmailCommandInput
|
|
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 {
|
|
7
|
-
this.client = new
|
|
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
|
-
|
|
20
|
-
const { SendEmailCommand } = await import("@aws-sdk/client-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
|
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
|
|
45
|
+
getSendParam: () => Promise<SendEmailCommandInput>;
|
|
55
46
|
private _getRawEmailParams;
|
|
56
47
|
private _isTextFile;
|
|
57
48
|
private _getAttachmentTextData;
|