@8ms/helpers 2.4.8 → 2.4.9
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/.yarnrc.yml +1 -0
- package/dist/_class/BaseClass.cjs +29 -0
- package/dist/{index-1SE8er2n.d.mts → _class/BaseClass.d.cts} +1 -12
- package/dist/_class/BaseClass.d.mts +21 -0
- package/dist/_class/BaseClass.mjs +28 -0
- package/dist/_class/BaseNamespace.cjs +21 -0
- package/dist/_class/BaseNamespace.d.cts +12 -0
- package/dist/_class/BaseNamespace.d.mts +12 -0
- package/dist/_class/BaseNamespace.mjs +20 -0
- package/dist/_class/index.cjs +5 -0
- package/dist/_class/index.d.cts +3 -0
- package/dist/_class/index.d.mts +2 -1
- package/dist/_class/index.mjs +2 -57
- package/dist/_virtual/_rolldown/runtime.cjs +25 -0
- package/dist/_virtual/_rolldown/runtime.mjs +26 -0
- package/dist/adverity/adverity.cjs +66 -0
- package/dist/{index-CXrNMYVx.d.mts → adverity/adverity.d.cts} +1 -1
- package/dist/adverity/adverity.d.mts +116 -0
- package/dist/adverity/adverity.mjs +62 -0
- package/dist/adverity/index.cjs +5 -0
- package/dist/adverity/index.d.cts +2 -0
- package/dist/adverity/index.d.mts +1 -1
- package/dist/adverity/index.mjs +1 -61
- package/dist/adverity/server/getJobs.cjs +25 -0
- package/dist/adverity/server/getJobs.d.cts +17 -0
- package/dist/adverity/server/getJobs.d.mts +17 -0
- package/dist/adverity/server/getJobs.mjs +24 -0
- package/dist/adverity/server/index.cjs +3 -0
- package/dist/adverity/server/index.d.cts +2 -0
- package/dist/adverity/server/index.d.mts +1 -17
- package/dist/adverity/server/index.mjs +1 -21
- package/dist/api/ApiResponseClass.cjs +113 -0
- package/dist/{api-DoLMPDFM.d.mts → api/ApiResponseClass.d.cts} +2 -19
- package/dist/api/ApiResponseClass.d.mts +44 -0
- package/dist/api/ApiResponseClass.mjs +112 -0
- package/dist/api/api.cjs +22 -0
- package/dist/api/api.d.cts +21 -0
- package/dist/api/api.d.mts +21 -0
- package/dist/api/api.mjs +18 -0
- package/dist/api/deleteRequest.cjs +23 -0
- package/dist/api/deleteRequest.d.cts +10 -0
- package/dist/api/deleteRequest.d.mts +10 -0
- package/dist/api/deleteRequest.mjs +22 -0
- package/dist/api/functions.cjs +28 -0
- package/dist/api/functions.d.cts +11 -0
- package/dist/api/functions.d.mts +11 -0
- package/dist/api/functions.mjs +22 -0
- package/dist/api/get.cjs +22 -0
- package/dist/api/get.d.cts +9 -0
- package/dist/api/get.d.mts +9 -0
- package/dist/{get-fmxmkk1P.mjs → api/get.mjs} +2 -2
- package/dist/api/index.cjs +20 -0
- package/dist/api/index.d.cts +7 -0
- package/dist/api/index.d.mts +6 -2
- package/dist/api/index.mjs +6 -43
- package/dist/api/post.cjs +23 -0
- package/dist/api/post.d.cts +9 -0
- package/dist/api/post.d.mts +9 -0
- package/dist/{post-DLC6iSd9.mjs → api/post.mjs} +2 -2
- package/dist/array/array.cjs +13 -0
- package/dist/array/array.d.cts +11 -0
- package/dist/array/array.d.mts +11 -0
- package/dist/array/array.mjs +11 -0
- package/dist/array/index.cjs +4 -0
- package/dist/array/index.d.cts +2 -0
- package/dist/array/index.d.mts +1 -10
- package/dist/array/index.mjs +1 -10
- package/dist/atInternet/atInternet.cjs +18 -0
- package/dist/atInternet/atInternet.d.cts +20 -0
- package/dist/atInternet/atInternet.d.mts +20 -0
- package/dist/atInternet/atInternet.mjs +16 -0
- package/dist/atInternet/index.cjs +3 -0
- package/dist/atInternet/index.d.cts +2 -0
- package/dist/atInternet/index.d.mts +1 -19
- package/dist/atInternet/index.mjs +1 -15
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.cjs +69 -0
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.d.cts +33 -0
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.d.mts +33 -0
- package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.mjs +68 -0
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.cjs +14 -0
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.d.cts +7 -0
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.d.mts +7 -0
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.mjs +13 -0
- package/dist/aws/cloudWatchLog/server/index.cjs +7 -0
- package/dist/aws/cloudWatchLog/server/index.d.cts +4 -0
- package/dist/aws/cloudWatchLog/server/index.d.mts +3 -47
- package/dist/aws/cloudWatchLog/server/index.mjs +3 -93
- package/dist/aws/cloudWatchLog/server/logEvent.cjs +9 -0
- package/dist/aws/cloudWatchLog/server/logEvent.d.cts +14 -0
- package/dist/aws/cloudWatchLog/server/logEvent.d.mts +14 -0
- package/dist/aws/cloudWatchLog/server/logEvent.mjs +8 -0
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.cjs +41 -0
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.d.cts +20 -0
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.d.mts +20 -0
- package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.mjs +39 -0
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.cjs +14 -0
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.d.cts +7 -0
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.d.mts +7 -0
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.mjs +13 -0
- package/dist/aws/cloudWatchMetric/server/index.cjs +5 -0
- package/dist/aws/cloudWatchMetric/server/index.d.cts +4 -0
- package/dist/aws/cloudWatchMetric/server/index.d.mts +3 -34
- package/dist/aws/cloudWatchMetric/server/index.mjs +2 -49
- package/dist/aws/cloudWatchMetric/server/logMetric.cjs +0 -0
- package/dist/aws/cloudWatchMetric/server/logMetric.d.cts +16 -0
- package/dist/aws/cloudWatchMetric/server/logMetric.d.mts +16 -0
- package/dist/aws/cloudWatchMetric/server/logMetric.mjs +1 -0
- package/dist/aws/ec2/server/AwsEc2Namespace.cjs +39 -0
- package/dist/aws/ec2/server/AwsEc2Namespace.d.cts +15 -0
- package/dist/aws/ec2/server/AwsEc2Namespace.d.mts +15 -0
- package/dist/aws/ec2/server/AwsEc2Namespace.mjs +38 -0
- package/dist/aws/ec2/server/awsEc2.cjs +14 -0
- package/dist/aws/ec2/server/awsEc2.d.cts +7 -0
- package/dist/aws/ec2/server/awsEc2.d.mts +7 -0
- package/dist/aws/ec2/server/awsEc2.mjs +13 -0
- package/dist/aws/ec2/server/index.cjs +5 -0
- package/dist/aws/ec2/server/index.d.cts +3 -0
- package/dist/aws/ec2/server/index.d.mts +2 -17
- package/dist/aws/ec2/server/index.mjs +2 -44
- package/dist/aws/ecs/server/AwsEcsNamespace.cjs +89 -0
- package/dist/aws/ecs/server/AwsEcsNamespace.d.cts +56 -0
- package/dist/aws/ecs/server/AwsEcsNamespace.d.mts +56 -0
- package/dist/aws/ecs/server/AwsEcsNamespace.mjs +88 -0
- package/dist/aws/ecs/server/awsEcs.cjs +14 -0
- package/dist/aws/ecs/server/awsEcs.d.cts +7 -0
- package/dist/aws/ecs/server/awsEcs.d.mts +7 -0
- package/dist/aws/ecs/server/awsEcs.mjs +13 -0
- package/dist/aws/ecs/server/index.cjs +5 -0
- package/dist/aws/ecs/server/index.d.cts +3 -0
- package/dist/aws/ecs/server/index.d.mts +2 -58
- package/dist/aws/ecs/server/index.mjs +2 -109
- package/dist/aws/glue/server/AwsGlueNamespace.cjs +26 -0
- package/dist/aws/glue/server/AwsGlueNamespace.d.cts +16 -0
- package/dist/aws/glue/server/AwsGlueNamespace.d.mts +16 -0
- package/dist/aws/glue/server/AwsGlueNamespace.mjs +25 -0
- package/dist/aws/glue/server/awsGlue.cjs +14 -0
- package/dist/aws/glue/server/awsGlue.d.cts +7 -0
- package/dist/aws/glue/server/awsGlue.d.mts +7 -0
- package/dist/aws/glue/server/awsGlue.mjs +13 -0
- package/dist/aws/glue/server/index.cjs +5 -0
- package/dist/aws/glue/server/index.d.cts +3 -0
- package/dist/aws/glue/server/index.d.mts +2 -18
- package/dist/aws/glue/server/index.mjs +2 -32
- package/dist/aws/lambda/server/AwsLambdaNamespace.cjs +43 -0
- package/dist/aws/lambda/server/AwsLambdaNamespace.d.cts +24 -0
- package/dist/aws/lambda/server/AwsLambdaNamespace.d.mts +24 -0
- package/dist/aws/lambda/server/AwsLambdaNamespace.mjs +42 -0
- package/dist/aws/lambda/server/awsLambda.cjs +18 -0
- package/dist/aws/lambda/server/awsLambda.d.cts +8 -0
- package/dist/aws/lambda/server/awsLambda.d.mts +8 -0
- package/dist/aws/lambda/server/awsLambda.mjs +16 -0
- package/dist/aws/lambda/server/index.cjs +6 -0
- package/dist/aws/lambda/server/index.d.cts +3 -0
- package/dist/aws/lambda/server/index.d.mts +2 -27
- package/dist/aws/lambda/server/index.mjs +2 -54
- package/dist/aws/s3/server/AwsS3Namespace.cjs +297 -0
- package/dist/aws/s3/server/AwsS3Namespace.d.cts +69 -0
- package/dist/aws/s3/server/AwsS3Namespace.d.mts +69 -0
- package/dist/aws/s3/server/AwsS3Namespace.mjs +296 -0
- package/dist/aws/s3/server/awsS3.cjs +23 -0
- package/dist/aws/s3/server/awsS3.d.cts +16 -0
- package/dist/aws/s3/server/awsS3.d.mts +16 -0
- package/dist/aws/s3/server/awsS3.mjs +21 -0
- package/dist/aws/s3/server/index.cjs +8 -0
- package/dist/aws/s3/server/index.d.cts +4 -0
- package/dist/aws/s3/server/index.d.mts +3 -123
- package/dist/aws/s3/server/index.mjs +3 -350
- package/dist/aws/s3/server/payload.cjs +38 -0
- package/dist/aws/s3/server/payload.d.cts +46 -0
- package/dist/aws/s3/server/payload.d.mts +46 -0
- package/dist/aws/s3/server/payload.mjs +36 -0
- package/dist/aws/server/aws.cjs +23 -0
- package/dist/{index-D-8_Li4c.d.mts → aws/server/aws.d.cts} +3 -7
- package/dist/aws/server/aws.d.mts +13 -0
- package/dist/{server-CCX9gh5k.mjs → aws/server/aws.mjs} +4 -13
- package/dist/aws/server/index.cjs +5 -0
- package/dist/aws/server/index.d.cts +3 -0
- package/dist/aws/server/index.d.mts +2 -1
- package/dist/aws/server/index.mjs +2 -1
- package/dist/aws/server/isResponse200.cjs +13 -0
- package/dist/aws/server/isResponse200.d.cts +7 -0
- package/dist/aws/server/isResponse200.d.mts +7 -0
- package/dist/aws/server/isResponse200.mjs +12 -0
- package/dist/aws/ses/server/AwsSesNamespace.cjs +37 -0
- package/dist/aws/ses/server/AwsSesNamespace.d.cts +13 -0
- package/dist/aws/ses/server/AwsSesNamespace.d.mts +13 -0
- package/dist/aws/ses/server/AwsSesNamespace.mjs +36 -0
- package/dist/aws/ses/server/SimpleEmail.cjs +220 -0
- package/dist/aws/ses/server/SimpleEmail.d.cts +92 -0
- package/dist/aws/ses/server/SimpleEmail.d.mts +92 -0
- package/dist/aws/ses/server/SimpleEmail.mjs +219 -0
- package/dist/aws/ses/server/awsSes.cjs +16 -0
- package/dist/aws/ses/server/awsSes.d.cts +8 -0
- package/dist/aws/ses/server/awsSes.d.mts +8 -0
- package/dist/aws/ses/server/awsSes.mjs +14 -0
- package/dist/aws/ses/server/index.cjs +7 -0
- package/dist/aws/ses/server/index.d.cts +4 -0
- package/dist/aws/ses/server/index.d.mts +3 -104
- package/dist/aws/ses/server/index.mjs +3 -263
- package/dist/aws/sqs/server/AwsSqsNamespace.cjs +47 -0
- package/dist/aws/sqs/server/AwsSqsNamespace.d.cts +38 -0
- package/dist/aws/sqs/server/AwsSqsNamespace.d.mts +38 -0
- package/dist/aws/sqs/server/AwsSqsNamespace.mjs +46 -0
- package/dist/aws/sqs/server/awsSqs.cjs +14 -0
- package/dist/aws/sqs/server/awsSqs.d.cts +7 -0
- package/dist/aws/sqs/server/awsSqs.d.mts +7 -0
- package/dist/aws/sqs/server/awsSqs.mjs +13 -0
- package/dist/aws/sqs/server/index.cjs +5 -0
- package/dist/aws/sqs/server/index.d.cts +3 -0
- package/dist/aws/sqs/server/index.d.mts +2 -40
- package/dist/aws/sqs/server/index.mjs +2 -52
- package/dist/aws/ssm/server/AwsSsmNamespace.cjs +34 -0
- package/dist/aws/ssm/server/AwsSsmNamespace.d.cts +15 -0
- package/dist/aws/ssm/server/AwsSsmNamespace.d.mts +15 -0
- package/dist/aws/ssm/server/AwsSsmNamespace.mjs +33 -0
- package/dist/aws/ssm/server/awsSsm.cjs +14 -0
- package/dist/aws/ssm/server/awsSsm.d.cts +7 -0
- package/dist/aws/ssm/server/awsSsm.d.mts +7 -0
- package/dist/aws/ssm/server/awsSsm.mjs +13 -0
- package/dist/aws/ssm/server/index.cjs +5 -0
- package/dist/aws/ssm/server/index.d.cts +3 -0
- package/dist/aws/ssm/server/index.d.mts +2 -17
- package/dist/aws/ssm/server/index.mjs +2 -43
- package/dist/boolean/boolean.cjs +13 -0
- package/dist/boolean/boolean.d.cts +7 -0
- package/dist/boolean/boolean.d.mts +7 -0
- package/dist/boolean/boolean.mjs +12 -0
- package/dist/boolean/index.cjs +3 -0
- package/dist/boolean/index.d.cts +2 -0
- package/dist/boolean/index.d.mts +1 -6
- package/dist/boolean/index.mjs +1 -11
- package/dist/brightData/serpApi/server/brightDataSerpApi.cjs +13 -0
- package/dist/brightData/serpApi/server/brightDataSerpApi.d.cts +13 -0
- package/dist/brightData/serpApi/server/brightDataSerpApi.d.mts +13 -0
- package/dist/brightData/serpApi/server/brightDataSerpApi.mjs +12 -0
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.cjs +101 -0
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.d.cts +34 -0
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.d.mts +34 -0
- package/dist/brightData/serpApi/server/buildGoogleSerpUrl.mjs +100 -0
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.cjs +52 -0
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.d.cts +24 -0
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.d.mts +24 -0
- package/dist/brightData/serpApi/server/buildGoogleTrendsUrl.mjs +51 -0
- package/dist/brightData/serpApi/server/getAsyncRequestId.cjs +29 -0
- package/dist/brightData/serpApi/server/getAsyncRequestId.d.cts +11 -0
- package/dist/brightData/serpApi/server/getAsyncRequestId.d.mts +11 -0
- package/dist/brightData/serpApi/server/getAsyncRequestId.mjs +28 -0
- package/dist/brightData/serpApi/server/getAsyncResults.cjs +21 -0
- package/dist/brightData/serpApi/server/getAsyncResults.d.cts +11 -0
- package/dist/brightData/serpApi/server/getAsyncResults.d.mts +11 -0
- package/dist/brightData/serpApi/server/getAsyncResults.mjs +20 -0
- package/dist/brightData/serpApi/server/getRealtime.cjs +23 -0
- package/dist/brightData/serpApi/server/getRealtime.d.cts +9 -0
- package/dist/brightData/serpApi/server/getRealtime.d.mts +9 -0
- package/dist/brightData/serpApi/server/getRealtime.mjs +22 -0
- package/dist/brightData/serpApi/server/index.cjs +13 -0
- package/dist/brightData/serpApi/server/index.d.cts +7 -0
- package/dist/brightData/serpApi/server/index.d.mts +6 -92
- package/dist/brightData/serpApi/server/index.mjs +6 -223
- package/dist/brightData/server/brightData.cjs +19 -0
- package/dist/{index-DwYd5z_c.d.mts → brightData/server/brightData.d.cts} +1 -1
- package/dist/brightData/server/brightData.d.mts +18 -0
- package/dist/brightData/server/brightData.mjs +17 -0
- package/dist/brightData/server/index.cjs +4 -0
- package/dist/brightData/server/index.d.cts +2 -0
- package/dist/brightData/server/index.d.mts +1 -1
- package/dist/brightData/server/index.mjs +1 -16
- package/dist/brightData/webScraperIde/server/getBatch.cjs +19 -0
- package/dist/brightData/webScraperIde/server/getBatch.d.cts +11 -0
- package/dist/brightData/webScraperIde/server/getBatch.d.mts +11 -0
- package/dist/brightData/webScraperIde/server/getBatch.mjs +18 -0
- package/dist/brightData/webScraperIde/server/getRealtime.cjs +33 -0
- package/dist/brightData/webScraperIde/server/getRealtime.d.cts +11 -0
- package/dist/brightData/webScraperIde/server/getRealtime.d.mts +11 -0
- package/dist/brightData/webScraperIde/server/getRealtime.mjs +32 -0
- package/dist/brightData/webScraperIde/server/index.cjs +5 -0
- package/dist/brightData/webScraperIde/server/index.d.cts +3 -0
- package/dist/brightData/webScraperIde/server/index.d.mts +2 -18
- package/dist/brightData/webScraperIde/server/index.mjs +2 -47
- package/dist/cache/server/cache.cjs +32 -0
- package/dist/cache/server/cache.d.cts +10 -0
- package/dist/cache/server/cache.d.mts +10 -0
- package/dist/cache/server/cache.mjs +30 -0
- package/dist/cache/server/index.cjs +4 -0
- package/dist/cache/server/index.d.cts +2 -0
- package/dist/cache/server/index.d.mts +1 -9
- package/dist/cache/server/index.mjs +1 -29
- package/dist/crud/crud.cjs +10 -0
- package/dist/crud/crud.d.cts +10 -0
- package/dist/crud/crud.d.mts +10 -0
- package/dist/crud/crud.mjs +9 -0
- package/dist/crud/index.cjs +3 -0
- package/dist/crud/index.d.cts +2 -0
- package/dist/crud/index.d.mts +1 -9
- package/dist/crud/index.mjs +1 -8
- package/dist/crypto/server/getMd5.cjs +14 -0
- package/dist/crypto/server/getMd5.d.cts +7 -0
- package/dist/crypto/server/getMd5.d.mts +7 -0
- package/dist/crypto/server/getMd5.mjs +14 -0
- package/dist/crypto/server/getRandom.cjs +10 -0
- package/dist/crypto/server/getRandom.d.cts +7 -0
- package/dist/crypto/server/getRandom.d.mts +7 -0
- package/dist/crypto/server/getRandom.mjs +9 -0
- package/dist/crypto/server/getSha256.cjs +14 -0
- package/dist/crypto/server/getSha256.d.cts +7 -0
- package/dist/crypto/server/getSha256.d.mts +7 -0
- package/dist/crypto/server/getSha256.mjs +14 -0
- package/dist/crypto/server/index.cjs +7 -0
- package/dist/crypto/server/index.d.cts +4 -0
- package/dist/crypto/server/index.d.mts +3 -18
- package/dist/crypto/server/index.mjs +3 -30
- package/dist/date/calculation.cjs +272 -0
- package/dist/date/calculation.d.cts +106 -0
- package/dist/date/calculation.d.mts +106 -0
- package/dist/date/calculation.mjs +245 -0
- package/dist/date/date.cjs +27 -0
- package/dist/date/date.d.cts +40 -0
- package/dist/date/date.d.mts +40 -0
- package/dist/date/date.mjs +23 -0
- package/dist/date/financialYear.cjs +61 -0
- package/dist/date/financialYear.d.cts +23 -0
- package/dist/date/financialYear.d.mts +23 -0
- package/dist/date/financialYear.mjs +56 -0
- package/dist/date/format.cjs +177 -0
- package/dist/date/format.d.cts +89 -0
- package/dist/date/format.d.mts +89 -0
- package/dist/date/format.mjs +158 -0
- package/dist/date/index.cjs +57 -0
- package/dist/date/index.d.cts +5 -0
- package/dist/date/index.d.mts +4 -1
- package/dist/date/index.mjs +4 -474
- package/dist/drizzle/server/DrizzleNamespace.cjs +51 -0
- package/dist/drizzle/server/DrizzleNamespace.d.cts +10 -0
- package/dist/drizzle/server/DrizzleNamespace.d.mts +10 -0
- package/dist/drizzle/server/DrizzleNamespace.mjs +50 -0
- package/dist/drizzle/server/drizzle.cjs +22 -0
- package/dist/drizzle/server/drizzle.d.cts +15 -0
- package/dist/drizzle/server/drizzle.d.mts +15 -0
- package/dist/drizzle/server/drizzle.mjs +21 -0
- package/dist/drizzle/server/index.cjs +5 -0
- package/dist/drizzle/server/index.d.cts +3 -0
- package/dist/drizzle/server/index.d.mts +2 -21
- package/dist/drizzle/server/index.mjs +2 -65
- package/dist/environment/environment.cjs +69 -0
- package/dist/environment/environment.d.cts +37 -0
- package/dist/environment/environment.d.mts +37 -0
- package/dist/environment/environment.mjs +59 -0
- package/dist/environment/index.cjs +12 -0
- package/dist/environment/index.d.cts +2 -0
- package/dist/environment/index.d.mts +1 -36
- package/dist/environment/index.mjs +1 -58
- package/dist/eskimi/eskimi.cjs +93 -0
- package/dist/eskimi/eskimi.d.cts +52 -0
- package/dist/eskimi/eskimi.d.mts +52 -0
- package/dist/eskimi/eskimi.mjs +88 -0
- package/dist/eskimi/index.cjs +6 -0
- package/dist/eskimi/index.d.cts +2 -0
- package/dist/eskimi/index.d.mts +1 -51
- package/dist/eskimi/index.mjs +1 -87
- package/dist/eskimi/server/getAgeGroup.cjs +14 -0
- package/dist/eskimi/server/getAgeGroup.d.cts +7 -0
- package/dist/eskimi/server/getAgeGroup.d.mts +7 -0
- package/dist/eskimi/server/getAgeGroup.mjs +13 -0
- package/dist/eskimi/server/getData.cjs +14 -0
- package/dist/eskimi/server/getData.d.cts +7 -0
- package/dist/eskimi/server/getData.d.mts +7 -0
- package/dist/eskimi/server/getData.mjs +13 -0
- package/dist/eskimi/server/getDevice.cjs +14 -0
- package/dist/eskimi/server/getDevice.d.cts +7 -0
- package/dist/eskimi/server/getDevice.d.mts +7 -0
- package/dist/eskimi/server/getDevice.mjs +13 -0
- package/dist/eskimi/server/getGender.cjs +14 -0
- package/dist/eskimi/server/getGender.d.cts +7 -0
- package/dist/eskimi/server/getGender.d.mts +7 -0
- package/dist/eskimi/server/getGender.mjs +13 -0
- package/dist/eskimi/server/index.cjs +9 -0
- package/dist/eskimi/server/index.d.cts +5 -0
- package/dist/eskimi/server/index.d.mts +4 -24
- package/dist/eskimi/server/index.mjs +4 -43
- package/dist/file/getFileKey.cjs +21 -0
- package/dist/file/getFileKey.d.cts +7 -0
- package/dist/file/getFileKey.d.mts +7 -0
- package/dist/file/getFileKey.mjs +19 -0
- package/dist/file/index.cjs +3 -0
- package/dist/file/index.d.cts +2 -0
- package/dist/file/index.d.mts +1 -6
- package/dist/file/index.mjs +1 -17
- package/dist/file/server/createDirectory.cjs +16 -0
- package/dist/file/server/createDirectory.d.cts +8 -0
- package/dist/file/server/createDirectory.d.mts +8 -0
- package/dist/file/server/createDirectory.mjs +15 -0
- package/dist/file/server/index.cjs +3 -0
- package/dist/file/server/index.d.cts +2 -0
- package/dist/file/server/index.d.mts +1 -7
- package/dist/file/server/index.mjs +1 -14
- package/dist/geo/countries.cjs +1333 -0
- package/dist/geo/countries.d.cts +15 -0
- package/dist/geo/countries.d.mts +15 -0
- package/dist/geo/countries.mjs +1332 -0
- package/dist/geo/index.cjs +5 -0
- package/dist/geo/index.d.cts +3 -0
- package/dist/geo/index.d.mts +2 -25
- package/dist/geo/index.mjs +2 -1588
- package/dist/geo/languages.cjs +259 -0
- package/dist/geo/languages.d.cts +12 -0
- package/dist/geo/languages.d.mts +12 -0
- package/dist/geo/languages.mjs +258 -0
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.cjs +54 -0
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.cts +45 -0
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.mts +45 -0
- package/dist/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.mjs +49 -0
- package/dist/googleAds/keywordPlanner/server/index.cjs +6 -0
- package/dist/googleAds/keywordPlanner/server/index.d.cts +2 -0
- package/dist/googleAds/keywordPlanner/server/index.d.mts +1 -44
- package/dist/googleAds/keywordPlanner/server/index.mjs +1 -48
- package/dist/googleAds/server/GoogleAdsNamespace.cjs +33 -0
- package/dist/googleAds/server/GoogleAdsNamespace.d.cts +18 -0
- package/dist/googleAds/server/GoogleAdsNamespace.d.mts +18 -0
- package/dist/googleAds/server/GoogleAdsNamespace.mjs +32 -0
- package/dist/googleAds/server/googleAds.cjs +19 -0
- package/dist/googleAds/server/googleAds.d.cts +15 -0
- package/dist/googleAds/server/googleAds.d.mts +15 -0
- package/dist/googleAds/server/googleAds.mjs +18 -0
- package/dist/googleAds/server/index.cjs +5 -0
- package/dist/googleAds/server/index.d.cts +3 -0
- package/dist/googleAds/server/index.d.mts +2 -28
- package/dist/googleAds/server/index.mjs +2 -43
- package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.cjs +79 -0
- package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.cts +53 -0
- package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.mts +53 -0
- package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.mjs +78 -0
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.cjs +32 -0
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.d.cts +8 -0
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.d.mts +8 -0
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.mjs +30 -0
- package/dist/googleCloud/bigquery/server/index.cjs +8 -0
- package/dist/googleCloud/bigquery/server/index.d.cts +4 -0
- package/dist/googleCloud/bigquery/server/index.d.mts +4 -82
- package/dist/googleCloud/bigquery/server/index.mjs +3 -128
- package/dist/googleCloud/bigquery/server/loadData.cjs +10 -0
- package/dist/googleCloud/bigquery/server/loadData.d.cts +27 -0
- package/dist/googleCloud/bigquery/server/loadData.d.mts +27 -0
- package/dist/googleCloud/bigquery/server/loadData.mjs +9 -0
- package/dist/googleCloud/server/googleCloud.cjs +24 -0
- package/dist/{index-DVYYb5tw.d.mts → googleCloud/server/googleCloud.d.cts} +1 -1
- package/dist/googleCloud/server/googleCloud.d.mts +32 -0
- package/dist/googleCloud/server/googleCloud.mjs +23 -0
- package/dist/googleCloud/server/index.cjs +3 -0
- package/dist/googleCloud/server/index.d.cts +2 -0
- package/dist/googleCloud/server/index.d.mts +1 -1
- package/dist/googleCloud/server/index.mjs +1 -22
- package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.cjs +33 -0
- package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.cts +22 -0
- package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.mts +22 -0
- package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.mjs +32 -0
- package/dist/googleCloud/sheets/server/getAssociatedData.cjs +29 -0
- package/dist/googleCloud/sheets/server/getAssociatedData.d.cts +12 -0
- package/dist/googleCloud/sheets/server/getAssociatedData.d.mts +12 -0
- package/dist/googleCloud/sheets/server/getAssociatedData.mjs +28 -0
- package/dist/googleCloud/sheets/server/index.cjs +3 -0
- package/dist/googleCloud/sheets/server/index.d.cts +2 -0
- package/dist/googleCloud/sheets/server/index.d.mts +1 -21
- package/dist/googleCloud/sheets/server/index.mjs +1 -28
- package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.cjs +47 -0
- package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.d.cts +27 -0
- package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.d.mts +27 -0
- package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.mjs +46 -0
- package/dist/googleCloud/storage/server/googleCloudStorage.cjs +28 -0
- package/dist/googleCloud/storage/server/googleCloudStorage.d.cts +7 -0
- package/dist/googleCloud/storage/server/googleCloudStorage.d.mts +7 -0
- package/dist/googleCloud/storage/server/googleCloudStorage.mjs +27 -0
- package/dist/googleCloud/storage/server/index.cjs +5 -0
- package/dist/googleCloud/storage/server/index.d.cts +3 -0
- package/dist/googleCloud/storage/server/index.d.mts +2 -30
- package/dist/googleCloud/storage/server/index.mjs +2 -75
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.cjs +28 -0
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.d.cts +15 -0
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.d.mts +15 -0
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.mjs +27 -0
- package/dist/googlePageSpeed/server/googlePageSpeed.cjs +33 -0
- package/dist/googlePageSpeed/server/googlePageSpeed.d.cts +23 -0
- package/dist/googlePageSpeed/server/googlePageSpeed.d.mts +23 -0
- package/dist/googlePageSpeed/server/googlePageSpeed.mjs +30 -0
- package/dist/googlePageSpeed/server/index.cjs +7 -0
- package/dist/googlePageSpeed/server/index.d.cts +3 -0
- package/dist/googlePageSpeed/server/index.d.mts +2 -33
- package/dist/googlePageSpeed/server/index.mjs +2 -48
- package/dist/googleSearchIncidents/server/googleSearchIncidents.cjs +56 -0
- package/dist/googleSearchIncidents/server/googleSearchIncidents.d.cts +73 -0
- package/dist/googleSearchIncidents/server/googleSearchIncidents.d.mts +73 -0
- package/dist/googleSearchIncidents/server/googleSearchIncidents.mjs +52 -0
- package/dist/googleSearchIncidents/server/index.cjs +5 -0
- package/dist/googleSearchIncidents/server/index.d.cts +2 -0
- package/dist/googleSearchIncidents/server/index.d.mts +1 -72
- package/dist/googleSearchIncidents/server/index.mjs +1 -51
- package/dist/greenDomain/server/greenDomain.cjs +31 -0
- package/dist/greenDomain/server/greenDomain.d.cts +25 -0
- package/dist/greenDomain/server/greenDomain.d.mts +25 -0
- package/dist/greenDomain/server/greenDomain.mjs +28 -0
- package/dist/greenDomain/server/index.cjs +4 -0
- package/dist/greenDomain/server/index.d.cts +2 -0
- package/dist/greenDomain/server/index.d.mts +1 -24
- package/dist/greenDomain/server/index.mjs +1 -27
- package/dist/inngest/index.cjs +3 -0
- package/dist/inngest/index.d.cts +2 -0
- package/dist/inngest/index.d.mts +1 -9
- package/dist/inngest/index.mjs +1 -8
- package/dist/inngest/inngest.cjs +10 -0
- package/dist/inngest/inngest.d.cts +10 -0
- package/dist/inngest/inngest.d.mts +10 -0
- package/dist/inngest/inngest.mjs +9 -0
- package/dist/json/getJsonNewline.cjs +8 -0
- package/dist/json/getJsonNewline.d.cts +4 -0
- package/dist/json/getJsonNewline.d.mts +4 -0
- package/dist/json/getJsonNewline.mjs +7 -0
- package/dist/json/index.cjs +5 -0
- package/dist/json/index.d.cts +3 -0
- package/dist/json/index.d.mts +2 -6
- package/dist/json/index.mjs +2 -23
- package/dist/json/isJson.cjs +19 -0
- package/dist/json/isJson.d.cts +4 -0
- package/dist/json/isJson.d.mts +4 -0
- package/dist/json/isJson.mjs +18 -0
- package/dist/littleWarden/server/LittleWardenNamespace.cjs +26 -0
- package/dist/littleWarden/server/LittleWardenNamespace.d.cts +15 -0
- package/dist/littleWarden/server/LittleWardenNamespace.d.mts +15 -0
- package/dist/littleWarden/server/LittleWardenNamespace.mjs +25 -0
- package/dist/littleWarden/server/getUrlStatus.cjs +11 -0
- package/dist/littleWarden/server/getUrlStatus.d.cts +7 -0
- package/dist/littleWarden/server/getUrlStatus.d.mts +7 -0
- package/dist/littleWarden/server/getUrlStatus.mjs +10 -0
- package/dist/littleWarden/server/index.cjs +11 -0
- package/dist/littleWarden/server/index.d.cts +4 -0
- package/dist/littleWarden/server/index.d.mts +3 -55
- package/dist/littleWarden/server/index.mjs +3 -73
- package/dist/littleWarden/server/littleWarden.cjs +54 -0
- package/dist/littleWarden/server/littleWarden.d.cts +40 -0
- package/dist/littleWarden/server/littleWarden.d.mts +40 -0
- package/dist/littleWarden/server/littleWarden.mjs +48 -0
- package/dist/lodash/chunk.cjs +9 -0
- package/dist/lodash/chunk.d.cts +4 -0
- package/dist/lodash/chunk.d.mts +4 -0
- package/dist/lodash/chunk.mjs +8 -0
- package/dist/lodash/findKey.cjs +31 -0
- package/dist/lodash/findKey.d.cts +4 -0
- package/dist/lodash/findKey.d.mts +4 -0
- package/dist/lodash/findKey.mjs +30 -0
- package/dist/lodash/flatten.cjs +5 -0
- package/dist/lodash/flatten.d.cts +4 -0
- package/dist/lodash/flatten.d.mts +4 -0
- package/dist/lodash/flatten.mjs +4 -0
- package/dist/lodash/index.cjs +31 -0
- package/dist/lodash/index.d.cts +16 -0
- package/dist/lodash/index.d.mts +15 -47
- package/dist/lodash/index.mjs +15 -191
- package/dist/lodash/isDate.cjs +7 -0
- package/dist/lodash/isDate.d.cts +4 -0
- package/dist/lodash/isDate.d.mts +4 -0
- package/dist/lodash/isDate.mjs +6 -0
- package/dist/lodash/isEmpty.cjs +12 -0
- package/dist/lodash/isEmpty.d.cts +4 -0
- package/dist/lodash/isEmpty.d.mts +4 -0
- package/dist/lodash/isEmpty.mjs +11 -0
- package/dist/lodash/isEqual.cjs +33 -0
- package/dist/lodash/isEqual.d.cts +4 -0
- package/dist/lodash/isEqual.d.mts +4 -0
- package/dist/lodash/isEqual.mjs +32 -0
- package/dist/lodash/isFunction.cjs +5 -0
- package/dist/lodash/isFunction.d.cts +4 -0
- package/dist/lodash/isFunction.d.mts +4 -0
- package/dist/lodash/isFunction.mjs +4 -0
- package/dist/lodash/isObject.cjs +8 -0
- package/dist/lodash/isObject.d.cts +4 -0
- package/dist/lodash/isObject.d.mts +4 -0
- package/dist/lodash/isObject.mjs +7 -0
- package/dist/lodash/merge.cjs +21 -0
- package/dist/lodash/merge.d.cts +4 -0
- package/dist/lodash/merge.d.mts +4 -0
- package/dist/lodash/merge.mjs +20 -0
- package/dist/lodash/orderBy.cjs +26 -0
- package/dist/lodash/orderBy.d.cts +6 -0
- package/dist/lodash/orderBy.d.mts +6 -0
- package/dist/lodash/orderBy.mjs +25 -0
- package/dist/lodash/set.cjs +18 -0
- package/dist/lodash/set.d.cts +4 -0
- package/dist/lodash/set.d.mts +4 -0
- package/dist/lodash/set.mjs +17 -0
- package/dist/lodash/trim.cjs +10 -0
- package/dist/lodash/trim.d.cts +4 -0
- package/dist/lodash/trim.d.mts +4 -0
- package/dist/lodash/trim.mjs +9 -0
- package/dist/lodash/unescape.cjs +14 -0
- package/dist/lodash/unescape.d.cts +4 -0
- package/dist/lodash/unescape.d.mts +4 -0
- package/dist/lodash/unescape.mjs +13 -0
- package/dist/lodash/uniq.cjs +5 -0
- package/dist/lodash/uniq.d.cts +4 -0
- package/dist/lodash/uniq.d.mts +4 -0
- package/dist/lodash/uniq.mjs +4 -0
- package/dist/lodash/uniqBy.cjs +17 -0
- package/dist/lodash/uniqBy.d.cts +4 -0
- package/dist/lodash/uniqBy.d.mts +4 -0
- package/dist/lodash/uniqBy.mjs +16 -0
- package/dist/lumar/api/server/buildRequest.cjs +59 -0
- package/dist/lumar/api/server/buildRequest.d.cts +16 -0
- package/dist/lumar/api/server/buildRequest.d.mts +16 -0
- package/dist/lumar/api/server/buildRequest.mjs +58 -0
- package/dist/lumar/api/server/getData.cjs +8 -0
- package/dist/lumar/api/server/getData.d.cts +5 -0
- package/dist/lumar/api/server/getData.d.mts +5 -0
- package/dist/lumar/api/server/getData.mjs +7 -0
- package/dist/lumar/api/server/index.cjs +11 -0
- package/dist/lumar/api/server/index.d.cts +5 -0
- package/dist/lumar/api/server/index.d.mts +4 -64
- package/dist/lumar/api/server/index.mjs +4 -105
- package/dist/lumar/api/server/initClient.cjs +20 -0
- package/dist/lumar/api/server/initClient.d.cts +9 -0
- package/dist/lumar/api/server/initClient.d.mts +9 -0
- package/dist/lumar/api/server/initClient.mjs +19 -0
- package/dist/lumar/api/server/lumarApi.cjs +30 -0
- package/dist/lumar/api/server/lumarApi.d.cts +39 -0
- package/dist/lumar/api/server/lumarApi.d.mts +39 -0
- package/dist/lumar/api/server/lumarApi.mjs +27 -0
- package/dist/lumar/graphql/server/columns.cjs +32 -0
- package/dist/lumar/graphql/server/columns.d.cts +32 -0
- package/dist/lumar/graphql/server/columns.d.mts +32 -0
- package/dist/lumar/graphql/server/columns.mjs +31 -0
- package/dist/lumar/graphql/server/getData.cjs +15 -0
- package/dist/lumar/graphql/server/getData.d.cts +5 -0
- package/dist/lumar/graphql/server/getData.d.mts +5 -0
- package/dist/lumar/graphql/server/getData.mjs +14 -0
- package/dist/lumar/graphql/server/index.cjs +14 -0
- package/dist/lumar/graphql/server/index.d.cts +8 -0
- package/dist/lumar/graphql/server/index.d.mts +7 -306
- package/dist/lumar/graphql/server/index.mjs +6 -164
- package/dist/lumar/graphql/server/initClient.cjs +26 -0
- package/dist/lumar/graphql/server/initClient.d.cts +8 -0
- package/dist/lumar/graphql/server/initClient.d.mts +8 -0
- package/dist/lumar/graphql/server/initClient.mjs +25 -0
- package/dist/lumar/graphql/server/lumarGraphql.cjs +33 -0
- package/dist/lumar/graphql/server/lumarGraphql.d.cts +30 -0
- package/dist/lumar/graphql/server/lumarGraphql.d.mts +30 -0
- package/dist/lumar/graphql/server/lumarGraphql.mjs +30 -0
- package/dist/lumar/graphql/server/queries/crawl.cjs +0 -0
- package/dist/lumar/graphql/server/queries/crawl.d.cts +8 -0
- package/dist/lumar/graphql/server/queries/crawl.d.mts +8 -0
- package/dist/lumar/graphql/server/queries/crawl.mjs +1 -0
- package/dist/lumar/graphql/server/queries/getCrawls.cjs +33 -0
- package/dist/lumar/graphql/server/queries/getCrawls.d.cts +22 -0
- package/dist/lumar/graphql/server/queries/getCrawls.d.mts +23 -0
- package/dist/lumar/graphql/server/queries/getCrawls.mjs +33 -0
- package/dist/lumar/graphql/server/queries/getReportDifferences.cjs +38 -0
- package/dist/lumar/graphql/server/queries/getReportDifferences.d.cts +29 -0
- package/dist/lumar/graphql/server/queries/getReportDifferences.d.mts +30 -0
- package/dist/lumar/graphql/server/queries/getReportDifferences.mjs +38 -0
- package/dist/lumar/graphql/server/queries/getRows.cjs +57 -0
- package/dist/lumar/graphql/server/queries/getRows.d.cts +49 -0
- package/dist/lumar/graphql/server/queries/getRows.d.mts +50 -0
- package/dist/lumar/graphql/server/queries/getRows.mjs +57 -0
- package/dist/lumar/graphql/server/queries/getTotals.cjs +40 -0
- package/dist/lumar/graphql/server/queries/getTotals.d.cts +32 -0
- package/dist/lumar/graphql/server/queries/getTotals.d.mts +33 -0
- package/dist/lumar/graphql/server/queries/getTotals.mjs +40 -0
- package/dist/lumar/graphql/server/queries/row.cjs +0 -0
- package/dist/lumar/graphql/server/queries/row.d.cts +159 -0
- package/dist/lumar/graphql/server/queries/row.d.mts +159 -0
- package/dist/lumar/graphql/server/queries/row.mjs +1 -0
- package/dist/lumar/graphql/server/reportTemplates.cjs +71 -0
- package/dist/lumar/graphql/server/reportTemplates.d.cts +71 -0
- package/dist/lumar/graphql/server/reportTemplates.d.mts +71 -0
- package/dist/lumar/graphql/server/reportTemplates.mjs +70 -0
- package/dist/myTarget/server/index.cjs +3 -0
- package/dist/myTarget/server/index.d.cts +2 -0
- package/dist/myTarget/server/index.d.mts +1 -8
- package/dist/myTarget/server/index.mjs +1 -12
- package/dist/myTarget/server/myTarget.cjs +14 -0
- package/dist/myTarget/server/myTarget.d.cts +9 -0
- package/dist/myTarget/server/myTarget.d.mts +9 -0
- package/dist/myTarget/server/myTarget.mjs +13 -0
- package/dist/nextAuth/index.cjs +5 -0
- package/dist/nextAuth/index.d.cts +3 -0
- package/dist/nextAuth/index.d.mts +2 -11
- package/dist/nextAuth/index.mjs +2 -12
- package/dist/nextAuth/isSessionReady.cjs +7 -0
- package/dist/nextAuth/isSessionReady.d.cts +4 -0
- package/dist/nextAuth/isSessionReady.d.mts +4 -0
- package/dist/nextAuth/isSessionReady.mjs +6 -0
- package/dist/nextAuth/nextAuth.cjs +11 -0
- package/dist/nextAuth/nextAuth.d.cts +11 -0
- package/dist/nextAuth/nextAuth.d.mts +11 -0
- package/dist/nextAuth/nextAuth.mjs +9 -0
- package/dist/nextJs/client/LazyLoad.cjs +12 -0
- package/dist/nextJs/client/LazyLoad.d.cts +10 -0
- package/dist/nextJs/client/LazyLoad.d.mts +10 -0
- package/dist/nextJs/client/LazyLoad.mjs +10 -0
- package/dist/nextJs/client/index.cjs +3 -0
- package/dist/nextJs/client/index.d.cts +2 -0
- package/dist/nextJs/client/index.d.mts +1 -9
- package/dist/nextJs/client/index.mjs +1 -9
- package/dist/nextJs/index.cjs +4 -0
- package/dist/nextJs/index.d.cts +2 -0
- package/dist/nextJs/index.d.mts +1 -18
- package/dist/nextJs/index.mjs +1 -10
- package/dist/nextJs/nextJs.cjs +13 -0
- package/dist/nextJs/nextJs.d.cts +19 -0
- package/dist/nextJs/nextJs.d.mts +19 -0
- package/dist/nextJs/nextJs.mjs +11 -0
- package/dist/nextJs/tests/getIp.cjs +9 -0
- package/dist/nextJs/tests/getIp.d.cts +1 -0
- package/dist/nextJs/tests/getIp.d.mts +1 -0
- package/dist/nextJs/tests/getIp.mjs +10 -0
- package/dist/node_modules/data-uri-to-buffer/dist/index.cjs +37 -0
- package/dist/node_modules/data-uri-to-buffer/dist/index.mjs +37 -0
- package/dist/node_modules/fetch-blob/file.cjs +31 -0
- package/dist/node_modules/fetch-blob/file.mjs +31 -0
- package/dist/node_modules/fetch-blob/from.cjs +8 -0
- package/dist/node_modules/fetch-blob/from.mjs +9 -0
- package/dist/node_modules/fetch-blob/index.cjs +171 -0
- package/dist/node_modules/fetch-blob/index.mjs +172 -0
- package/dist/node_modules/fetch-blob/streams.cjs +45 -0
- package/dist/node_modules/fetch-blob/streams.mjs +41 -0
- package/dist/node_modules/formdata-polyfill/esm.min.cjs +83 -0
- package/dist/node_modules/formdata-polyfill/esm.min.mjs +82 -0
- package/dist/node_modules/node-domexception/index.cjs +18 -0
- package/dist/node_modules/node-domexception/index.mjs +15 -0
- package/dist/node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3499 -0
- package/dist/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs +3496 -0
- package/dist/number/formatCompact.cjs +16 -0
- package/dist/number/formatCompact.d.cts +7 -0
- package/dist/number/formatCompact.d.mts +7 -0
- package/dist/number/formatCompact.mjs +15 -0
- package/dist/number/formatCurrency.cjs +20 -0
- package/dist/number/formatCurrency.d.cts +8 -0
- package/dist/number/formatCurrency.d.mts +8 -0
- package/dist/number/formatCurrency.mjs +19 -0
- package/dist/number/formatStandard.cjs +16 -0
- package/dist/number/formatStandard.d.cts +7 -0
- package/dist/number/formatStandard.d.mts +7 -0
- package/dist/number/formatStandard.mjs +15 -0
- package/dist/number/getDecimal.cjs +12 -0
- package/dist/number/getDecimal.d.cts +7 -0
- package/dist/number/getDecimal.d.mts +7 -0
- package/dist/number/getDecimal.mjs +11 -0
- package/dist/number/getNumber.cjs +29 -0
- package/dist/number/getNumber.d.cts +7 -0
- package/dist/number/getNumber.d.mts +7 -0
- package/dist/{getDecimal-B9S_nqSJ.mjs → number/getNumber.mjs} +2 -11
- package/dist/number/getPercent.cjs +15 -0
- package/dist/number/getPercent.d.cts +4 -0
- package/dist/number/getPercent.d.mts +4 -0
- package/dist/number/getPercent.mjs +14 -0
- package/dist/number/getPercentIncrease.cjs +14 -0
- package/dist/number/getPercentIncrease.d.cts +7 -0
- package/dist/number/getPercentIncrease.d.mts +7 -0
- package/dist/number/getPercentIncrease.mjs +13 -0
- package/dist/number/getSafeDivide.cjs +16 -0
- package/dist/number/getSafeDivide.d.cts +13 -0
- package/dist/number/getSafeDivide.d.mts +13 -0
- package/dist/number/getSafeDivide.mjs +15 -0
- package/dist/number/index.cjs +17 -0
- package/dist/number/index.d.cts +9 -0
- package/dist/number/index.d.mts +8 -52
- package/dist/number/index.mjs +8 -80
- package/dist/object/index.cjs +3 -0
- package/dist/object/index.d.cts +2 -0
- package/dist/object/index.d.mts +1 -7
- package/dist/object/index.mjs +1 -20
- package/dist/object/replaceKeys.cjs +22 -0
- package/dist/object/replaceKeys.d.cts +8 -0
- package/dist/object/replaceKeys.d.mts +8 -0
- package/dist/object/replaceKeys.mjs +21 -0
- package/dist/onePassword/server/OnePasswordNamespace.cjs +40 -0
- package/dist/onePassword/server/OnePasswordNamespace.d.cts +17 -0
- package/dist/onePassword/server/OnePasswordNamespace.d.mts +17 -0
- package/dist/onePassword/server/OnePasswordNamespace.mjs +39 -0
- package/dist/onePassword/server/getIdsFromUrl.cjs +15 -0
- package/dist/onePassword/server/getIdsFromUrl.d.cts +11 -0
- package/dist/onePassword/server/getIdsFromUrl.d.mts +11 -0
- package/dist/onePassword/server/getIdsFromUrl.mjs +14 -0
- package/dist/onePassword/server/index.cjs +7 -0
- package/dist/onePassword/server/index.d.cts +4 -0
- package/dist/onePassword/server/index.d.mts +4 -34
- package/dist/onePassword/server/index.mjs +3 -59
- package/dist/onePassword/server/onePassword.cjs +14 -0
- package/dist/onePassword/server/onePassword.d.cts +11 -0
- package/dist/onePassword/server/onePassword.d.mts +11 -0
- package/dist/onePassword/server/onePassword.mjs +13 -0
- package/dist/openAi/server/OpenAiNamespace.cjs +28 -0
- package/dist/openAi/server/OpenAiNamespace.d.cts +15 -0
- package/dist/openAi/server/OpenAiNamespace.d.mts +15 -0
- package/dist/openAi/server/OpenAiNamespace.mjs +27 -0
- package/dist/openAi/server/index.cjs +5 -0
- package/dist/openAi/server/index.d.cts +3 -0
- package/dist/openAi/server/index.d.mts +3 -20
- package/dist/openAi/server/index.mjs +2 -41
- package/dist/openAi/server/openAi.cjs +19 -0
- package/dist/openAi/server/openAi.d.cts +9 -0
- package/dist/openAi/server/openAi.d.mts +9 -0
- package/dist/openAi/server/openAi.mjs +18 -0
- package/dist/prisma/getDecimal.cjs +14 -0
- package/dist/prisma/getDecimal.d.cts +7 -0
- package/dist/prisma/getDecimal.d.mts +7 -0
- package/dist/prisma/getDecimal.mjs +13 -0
- package/dist/prisma/index.cjs +3 -0
- package/dist/prisma/index.d.cts +2 -0
- package/dist/prisma/index.d.mts +1 -6
- package/dist/prisma/index.mjs +1 -12
- package/dist/prisma/server/PrismaNamespace.cjs +47 -0
- package/dist/prisma/server/PrismaNamespace.d.cts +11 -0
- package/dist/prisma/server/PrismaNamespace.d.mts +11 -0
- package/dist/prisma/server/PrismaNamespace.mjs +46 -0
- package/dist/prisma/server/index.cjs +5 -0
- package/dist/prisma/server/index.d.cts +3 -0
- package/dist/prisma/server/index.d.mts +2 -30
- package/dist/prisma/server/index.mjs +2 -60
- package/dist/prisma/server/prisma.cjs +21 -0
- package/dist/prisma/server/prisma.d.cts +24 -0
- package/dist/prisma/server/prisma.d.mts +24 -0
- package/dist/prisma/server/prisma.mjs +20 -0
- package/dist/snapchat/server/SnapchatNamespace.cjs +22 -0
- package/dist/snapchat/server/SnapchatNamespace.d.cts +18 -0
- package/dist/snapchat/server/SnapchatNamespace.d.mts +18 -0
- package/dist/snapchat/server/SnapchatNamespace.mjs +20 -0
- package/dist/snapchat/server/index.cjs +5 -0
- package/dist/snapchat/server/index.d.cts +3 -0
- package/dist/snapchat/server/index.d.mts +2 -24
- package/dist/snapchat/server/index.mjs +2 -34
- package/dist/snapchat/server/snapchat.cjs +19 -0
- package/dist/snapchat/server/snapchat.d.cts +11 -0
- package/dist/snapchat/server/snapchat.d.mts +11 -0
- package/dist/snapchat/server/snapchat.mjs +18 -0
- package/dist/sorting/byNumberAscending.cjs +15 -0
- package/dist/sorting/byNumberAscending.d.cts +7 -0
- package/dist/sorting/byNumberAscending.d.mts +7 -0
- package/dist/sorting/byNumberAscending.mjs +14 -0
- package/dist/sorting/byNumberDescending.cjs +15 -0
- package/dist/sorting/byNumberDescending.d.cts +7 -0
- package/dist/sorting/byNumberDescending.d.mts +7 -0
- package/dist/sorting/byNumberDescending.mjs +14 -0
- package/dist/sorting/byStringAscending.cjs +12 -0
- package/dist/sorting/byStringAscending.d.cts +7 -0
- package/dist/sorting/byStringAscending.d.mts +7 -0
- package/dist/sorting/byStringAscending.mjs +11 -0
- package/dist/sorting/byStringDescending.cjs +11 -0
- package/dist/sorting/byStringDescending.d.cts +7 -0
- package/dist/sorting/byStringDescending.d.mts +7 -0
- package/dist/sorting/byStringDescending.mjs +10 -0
- package/dist/sorting/index.cjs +9 -0
- package/dist/sorting/index.d.cts +5 -0
- package/dist/sorting/index.d.mts +4 -24
- package/dist/sorting/index.mjs +4 -45
- package/dist/sorting/sorting.cjs +9 -0
- package/dist/sorting/sorting.d.cts +5 -0
- package/dist/sorting/sorting.d.mts +5 -0
- package/dist/sorting/sorting.mjs +5 -0
- package/dist/stream/server/index.cjs +3 -0
- package/dist/stream/server/index.d.cts +2 -0
- package/dist/stream/server/index.d.mts +1 -14
- package/dist/stream/server/index.mjs +1 -45
- package/dist/stream/server/sort.cjs +46 -0
- package/dist/stream/server/sort.d.cts +15 -0
- package/dist/stream/server/sort.d.mts +15 -0
- package/dist/stream/server/sort.mjs +46 -0
- package/dist/string/getCapitalised.cjs +17 -0
- package/dist/string/getCapitalised.d.cts +8 -0
- package/dist/string/getCapitalised.d.mts +8 -0
- package/dist/string/getCapitalised.mjs +16 -0
- package/dist/string/getClean.cjs +29 -0
- package/dist/string/getClean.d.cts +20 -0
- package/dist/string/getClean.d.mts +20 -0
- package/dist/string/getClean.mjs +28 -0
- package/dist/string/getFolder.cjs +11 -0
- package/dist/string/getFolder.d.cts +7 -0
- package/dist/string/getFolder.d.mts +7 -0
- package/dist/string/getFolder.mjs +10 -0
- package/dist/string/getProperCase.cjs +23 -0
- package/dist/string/getProperCase.d.cts +13 -0
- package/dist/string/getProperCase.d.mts +13 -0
- package/dist/string/getProperCase.mjs +22 -0
- package/dist/string/getString.cjs +19 -0
- package/dist/string/getString.d.cts +7 -0
- package/dist/string/getString.d.mts +7 -0
- package/dist/string/getString.mjs +18 -0
- package/dist/string/getStringFromStream.cjs +16 -0
- package/dist/string/getStringFromStream.d.cts +8 -0
- package/dist/string/getStringFromStream.d.mts +8 -0
- package/dist/string/getStringFromStream.mjs +15 -0
- package/dist/string/getUnescaped.cjs +19 -0
- package/dist/string/getUnescaped.d.cts +9 -0
- package/dist/string/getUnescaped.d.mts +9 -0
- package/dist/string/getUnescaped.mjs +18 -0
- package/dist/string/getWithoutAccents.cjs +11 -0
- package/dist/string/getWithoutAccents.d.cts +8 -0
- package/dist/string/getWithoutAccents.d.mts +8 -0
- package/dist/string/getWithoutAccents.mjs +10 -0
- package/dist/string/getWithoutHtmlTags.cjs +11 -0
- package/dist/string/getWithoutHtmlTags.d.cts +8 -0
- package/dist/string/getWithoutHtmlTags.d.mts +8 -0
- package/dist/string/getWithoutHtmlTags.mjs +10 -0
- package/dist/string/getWithoutPunctuation.cjs +11 -0
- package/dist/string/getWithoutPunctuation.d.cts +8 -0
- package/dist/string/getWithoutPunctuation.d.mts +8 -0
- package/dist/string/getWithoutPunctuation.mjs +10 -0
- package/dist/string/getWithoutUnderscores.cjs +10 -0
- package/dist/string/getWithoutUnderscores.d.cts +7 -0
- package/dist/string/getWithoutUnderscores.d.mts +7 -0
- package/dist/string/getWithoutUnderscores.mjs +9 -0
- package/dist/string/getWithoutWhitespaces.cjs +11 -0
- package/dist/string/getWithoutWhitespaces.d.cts +8 -0
- package/dist/string/getWithoutWhitespaces.d.mts +8 -0
- package/dist/string/getWithoutWhitespaces.mjs +10 -0
- package/dist/string/index.cjs +28 -0
- package/dist/string/index.d.cts +14 -0
- package/dist/string/index.d.mts +13 -106
- package/dist/string/index.mjs +13 -172
- package/dist/string/reservedWords.cjs +25 -0
- package/dist/string/reservedWords.d.cts +8 -0
- package/dist/string/reservedWords.d.mts +8 -0
- package/dist/string/reservedWords.mjs +23 -0
- package/dist/swr/client/index.cjs +8 -0
- package/dist/swr/client/index.d.cts +2 -0
- package/dist/swr/client/index.d.mts +1 -46
- package/dist/swr/client/index.mjs +1 -38
- package/dist/swr/client/swr.cjs +45 -0
- package/dist/swr/client/swr.d.cts +47 -0
- package/dist/swr/client/swr.d.mts +47 -0
- package/dist/swr/client/swr.mjs +39 -0
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.cjs +31 -0
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.d.cts +34 -0
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.d.mts +34 -0
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.mjs +30 -0
- package/dist/upTimeRobot/server/index.cjs +10 -0
- package/dist/upTimeRobot/server/index.d.cts +3 -0
- package/dist/upTimeRobot/server/index.d.mts +2 -71
- package/dist/upTimeRobot/server/index.mjs +2 -77
- package/dist/upTimeRobot/server/upTimeRobot.cjs +57 -0
- package/dist/upTimeRobot/server/upTimeRobot.d.cts +42 -0
- package/dist/upTimeRobot/server/upTimeRobot.d.mts +42 -0
- package/dist/upTimeRobot/server/upTimeRobot.mjs +51 -0
- package/dist/url/index.cjs +6 -0
- package/dist/url/index.d.cts +2 -0
- package/dist/url/index.d.mts +1 -18
- package/dist/url/index.mjs +1 -37
- package/dist/url/server/index.cjs +3 -0
- package/dist/url/server/index.d.cts +2 -0
- package/dist/url/server/index.d.mts +1 -8
- package/dist/url/server/index.mjs +1 -29
- package/dist/url/server/writeUrlContents.cjs +33 -0
- package/dist/url/server/writeUrlContents.d.cts +9 -0
- package/dist/url/server/writeUrlContents.d.mts +9 -0
- package/dist/url/server/writeUrlContents.mjs +31 -0
- package/dist/url/url.cjs +42 -0
- package/dist/url/url.d.cts +19 -0
- package/dist/url/url.d.mts +19 -0
- package/dist/url/url.mjs +38 -0
- package/dist/util/defaultTo.cjs +21 -0
- package/dist/util/defaultTo.d.cts +7 -0
- package/dist/util/defaultTo.d.mts +7 -0
- package/dist/util/defaultTo.mjs +20 -0
- package/dist/util/getClean.cjs +16 -0
- package/dist/util/getClean.d.cts +13 -0
- package/dist/util/getClean.d.mts +13 -0
- package/dist/util/getClean.mjs +15 -0
- package/dist/util/getError.cjs +10 -0
- package/dist/util/getError.d.cts +4 -0
- package/dist/util/getError.d.mts +4 -0
- package/dist/util/getError.mjs +9 -0
- package/dist/util/getWithoutHash.cjs +15 -0
- package/dist/util/getWithoutHash.d.cts +7 -0
- package/dist/util/getWithoutHash.d.mts +7 -0
- package/dist/util/getWithoutHash.mjs +14 -0
- package/dist/util/getWithoutParameter.cjs +15 -0
- package/dist/util/getWithoutParameter.d.cts +7 -0
- package/dist/util/getWithoutParameter.d.mts +7 -0
- package/dist/util/getWithoutParameter.mjs +14 -0
- package/dist/util/index.cjs +17 -0
- package/dist/util/index.d.cts +9 -0
- package/dist/util/index.d.mts +8 -49
- package/dist/util/index.mjs +8 -97
- package/dist/util/isUndefined.cjs +12 -0
- package/dist/util/isUndefined.d.cts +7 -0
- package/dist/util/isUndefined.d.mts +7 -0
- package/dist/util/isUndefined.mjs +11 -0
- package/dist/util/promiseChunks.cjs +23 -0
- package/dist/util/promiseChunks.d.cts +8 -0
- package/dist/util/promiseChunks.d.mts +8 -0
- package/dist/util/promiseChunks.mjs +22 -0
- package/dist/util/server/getBrotliCompressed.cjs +18 -0
- package/dist/util/server/getBrotliCompressed.d.cts +9 -0
- package/dist/util/server/getBrotliCompressed.d.mts +9 -0
- package/dist/util/server/getBrotliCompressed.mjs +15 -0
- package/dist/util/server/getBrotliDecompressed.cjs +19 -0
- package/dist/util/server/getBrotliDecompressed.d.cts +9 -0
- package/dist/util/server/getBrotliDecompressed.d.mts +9 -0
- package/dist/util/server/getBrotliDecompressed.mjs +16 -0
- package/dist/util/server/getGzipCompressed.cjs +18 -0
- package/dist/util/server/getGzipCompressed.d.cts +9 -0
- package/dist/util/server/getGzipCompressed.d.mts +9 -0
- package/dist/util/server/getGzipCompressed.mjs +15 -0
- package/dist/util/server/getGzipDecompressed.cjs +19 -0
- package/dist/util/server/getGzipDecompressed.d.cts +9 -0
- package/dist/util/server/getGzipDecompressed.d.mts +9 -0
- package/dist/util/server/getGzipDecompressed.mjs +16 -0
- package/dist/util/server/index.cjs +9 -0
- package/dist/util/server/index.d.cts +5 -0
- package/dist/util/server/index.d.mts +4 -26
- package/dist/util/server/index.mjs +4 -55
- package/dist/util/sleep.cjs +7 -0
- package/dist/util/sleep.d.cts +4 -0
- package/dist/util/sleep.d.mts +4 -0
- package/dist/util/sleep.mjs +6 -0
- package/dist/webWorker/index.cjs +3 -0
- package/dist/webWorker/index.d.cts +2 -0
- package/dist/webWorker/index.d.mts +1 -10
- package/dist/webWorker/index.mjs +1 -9
- package/dist/webWorker/webWorker.cjs +11 -0
- package/dist/webWorker/webWorker.d.cts +11 -0
- package/dist/webWorker/webWorker.d.mts +11 -0
- package/dist/webWorker/webWorker.mjs +10 -0
- package/dist/xml/server/getXml.cjs +15 -0
- package/dist/xml/server/getXml.d.cts +4 -0
- package/dist/xml/server/getXml.d.mts +4 -0
- package/dist/xml/server/getXml.mjs +14 -0
- package/dist/xml/server/index.cjs +3 -0
- package/dist/xml/server/index.d.cts +2 -0
- package/dist/xml/server/index.d.mts +1 -3
- package/dist/xml/server/index.mjs +1 -13
- package/package.json +1013 -70
- package/tsdown.config.ts +15 -0
- package/dist/api-BJgcoGmU.mjs +0 -127
- package/dist/chunk-y_GBKt04.mjs +0 -5
- package/dist/index-BAU-daxD.d.mts +0 -246
- package/dist/index-BlUxbvhl.d.mts +0 -30
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { BaseClass } from "../../../_class/BaseClass.mjs";
|
|
2
|
+
//#region src/aws/ses/server/SimpleEmail.ts
|
|
3
|
+
/**
|
|
4
|
+
* Class to build and send an AWS SES email.
|
|
5
|
+
*/
|
|
6
|
+
var SimpleEmail = class extends BaseClass {
|
|
7
|
+
constructor({ bcc, cc, from, html, subject, to, attachments }) {
|
|
8
|
+
super();
|
|
9
|
+
this.to = [];
|
|
10
|
+
this.cc = [];
|
|
11
|
+
this.bcc = [];
|
|
12
|
+
this.attachments = [];
|
|
13
|
+
this.setFrom = (from) => {
|
|
14
|
+
return this._setValue("from", from);
|
|
15
|
+
};
|
|
16
|
+
this.setHtml = (html) => {
|
|
17
|
+
return this._setValue("html", html);
|
|
18
|
+
};
|
|
19
|
+
this.setSubject = (subject) => {
|
|
20
|
+
return this._setValue("subject", subject);
|
|
21
|
+
};
|
|
22
|
+
this.setAttachments = (attachments) => {
|
|
23
|
+
return this._setValue("attachments", attachments);
|
|
24
|
+
};
|
|
25
|
+
this.addAttachment = (attachment) => {
|
|
26
|
+
this.attachments.push(attachment);
|
|
27
|
+
return this;
|
|
28
|
+
};
|
|
29
|
+
this.addAttachmentFromdata = (filename, data, contentType) => {
|
|
30
|
+
return this.addAttachment({
|
|
31
|
+
filename,
|
|
32
|
+
data,
|
|
33
|
+
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
this.addAttachmentFromUrl = (filename, url, contentType) => {
|
|
37
|
+
return this.addAttachment({
|
|
38
|
+
filename,
|
|
39
|
+
url,
|
|
40
|
+
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
this.clearAttachments = () => {
|
|
44
|
+
this.attachments = [];
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
this.pushBcc = (recipient) => {
|
|
48
|
+
return this._push("bcc", recipient);
|
|
49
|
+
};
|
|
50
|
+
this.pushCc = (recipient) => {
|
|
51
|
+
return this._push("cc", recipient);
|
|
52
|
+
};
|
|
53
|
+
this.pushTo = (recipient) => {
|
|
54
|
+
return this._push("to", recipient);
|
|
55
|
+
};
|
|
56
|
+
this.setBcc = (recipient) => {
|
|
57
|
+
return this._setArray("bcc", recipient);
|
|
58
|
+
};
|
|
59
|
+
this.setCc = (recipient) => {
|
|
60
|
+
return this._setArray("cc", recipient);
|
|
61
|
+
};
|
|
62
|
+
this.setTo = (recipient) => {
|
|
63
|
+
return this._setArray("to", recipient);
|
|
64
|
+
};
|
|
65
|
+
this.getSendParam = async () => {
|
|
66
|
+
if (this.attachments.length > 0) return await this._getRawEmailParams();
|
|
67
|
+
return {
|
|
68
|
+
Destination: {
|
|
69
|
+
BccAddresses: this._filterRecipients("bcc"),
|
|
70
|
+
CcAddresses: this._filterRecipients("cc"),
|
|
71
|
+
ToAddresses: this._filterRecipients("to")
|
|
72
|
+
},
|
|
73
|
+
Message: {
|
|
74
|
+
Body: {
|
|
75
|
+
Html: {
|
|
76
|
+
Charset: "UTF-8",
|
|
77
|
+
Data: this.html
|
|
78
|
+
},
|
|
79
|
+
Text: {
|
|
80
|
+
Charset: "UTF-8",
|
|
81
|
+
Data: this.html
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
Subject: {
|
|
85
|
+
Charset: "UTF-8",
|
|
86
|
+
Data: this.subject
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
Source: this.from
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
this._getRawEmailParams = async () => {
|
|
93
|
+
const boundary = `----=_NextPart_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
94
|
+
const allRecipients = [
|
|
95
|
+
...this._filterRecipients("to"),
|
|
96
|
+
...this._filterRecipients("cc"),
|
|
97
|
+
...this._filterRecipients("bcc")
|
|
98
|
+
];
|
|
99
|
+
let rawMessage = "";
|
|
100
|
+
rawMessage += `From: ${this.from}\r\n`;
|
|
101
|
+
if (this._filterRecipients("to").length > 0) rawMessage += `To: ${this._filterRecipients("to").join(", ")}\r\n`;
|
|
102
|
+
if (this._filterRecipients("cc").length > 0) rawMessage += `Cc: ${this._filterRecipients("cc").join(", ")}\r\n`;
|
|
103
|
+
rawMessage += `Subject: ${this.subject}\r\n`;
|
|
104
|
+
rawMessage += `MIME-Version: 1.0\r\n`;
|
|
105
|
+
rawMessage += `Content-Type: multipart/mixed; boundary="${boundary}"\r\n\r\n`;
|
|
106
|
+
rawMessage += `--${boundary}\r\n`;
|
|
107
|
+
rawMessage += `Content-Type: text/html; charset=UTF-8\r\n`;
|
|
108
|
+
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
109
|
+
rawMessage += `${this.html}\r\n\r\n`;
|
|
110
|
+
for (const attachment of this.attachments) {
|
|
111
|
+
const isTextFile = this._isTextFile(attachment.contentType || this._getContentTypeFromFilename(attachment.filename));
|
|
112
|
+
rawMessage += `--${boundary}\r\n`;
|
|
113
|
+
rawMessage += `Content-Type: ${attachment.contentType || "application/octet-stream"}\r\n`;
|
|
114
|
+
rawMessage += `Content-Disposition: attachment; filename="${attachment.filename}"\r\n`;
|
|
115
|
+
if (isTextFile) {
|
|
116
|
+
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
117
|
+
const textData = await this._getAttachmentTextData(attachment);
|
|
118
|
+
rawMessage += `${textData}\r\n\r\n`;
|
|
119
|
+
} else {
|
|
120
|
+
rawMessage += `Content-Transfer-Encoding: base64\r\n\r\n`;
|
|
121
|
+
const attachmentData = await this._getAttachmentData(attachment);
|
|
122
|
+
rawMessage += `${attachmentData}\r\n\r\n`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
rawMessage += `--${boundary}--\r\n`;
|
|
126
|
+
return {
|
|
127
|
+
Destinations: allRecipients,
|
|
128
|
+
RawMessage: { Data: rawMessage },
|
|
129
|
+
Source: this.from
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
this._isTextFile = (contentType) => {
|
|
133
|
+
return [
|
|
134
|
+
"text/csv",
|
|
135
|
+
"text/plain",
|
|
136
|
+
"text/html",
|
|
137
|
+
"application/json",
|
|
138
|
+
"application/xml",
|
|
139
|
+
"text/xml"
|
|
140
|
+
].some((type) => contentType.startsWith(type));
|
|
141
|
+
};
|
|
142
|
+
this._getAttachmentTextData = async (attachment) => {
|
|
143
|
+
if (attachment.data) {
|
|
144
|
+
const base64Data = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
145
|
+
if (this._isBase64(base64Data)) return Buffer.from(base64Data, "base64").toString("utf-8");
|
|
146
|
+
return attachment.data;
|
|
147
|
+
}
|
|
148
|
+
if (attachment.url) return await (await (await import("../../../node_modules/node-fetch/src/index.mjs").then((mod) => mod.default))(attachment.url)).text();
|
|
149
|
+
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
150
|
+
};
|
|
151
|
+
this._getAttachmentData = async (attachment) => {
|
|
152
|
+
if (attachment.data) {
|
|
153
|
+
const cleanData = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
154
|
+
if (this._isBase64(cleanData)) return cleanData;
|
|
155
|
+
return Buffer.from(attachment.data, "utf-8").toString("base64");
|
|
156
|
+
}
|
|
157
|
+
if (attachment.url) return (await (await (await import("../../../node_modules/node-fetch/src/index.mjs").then((mod) => mod.default))(attachment.url)).buffer()).toString("base64");
|
|
158
|
+
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
159
|
+
};
|
|
160
|
+
this._isBase64 = (str) => {
|
|
161
|
+
try {
|
|
162
|
+
return Buffer.from(str, "base64").toString("base64") === str;
|
|
163
|
+
} catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
this._getContentTypeFromFilename = (filename) => {
|
|
168
|
+
return {
|
|
169
|
+
"jpg": "image/jpeg",
|
|
170
|
+
"jpeg": "image/jpeg",
|
|
171
|
+
"png": "image/png",
|
|
172
|
+
"gif": "image/gif",
|
|
173
|
+
"svg": "image/svg+xml",
|
|
174
|
+
"webp": "image/webp",
|
|
175
|
+
"bmp": "image/bmp",
|
|
176
|
+
"ico": "image/x-icon",
|
|
177
|
+
"pdf": "application/pdf",
|
|
178
|
+
"doc": "application/msword",
|
|
179
|
+
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
180
|
+
"xls": "application/vnd.ms-excel",
|
|
181
|
+
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
182
|
+
"ppt": "application/vnd.ms-powerpoint",
|
|
183
|
+
"pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
184
|
+
"csv": "text/csv",
|
|
185
|
+
"tsv": "text/tab-separated-values",
|
|
186
|
+
"json": "application/json",
|
|
187
|
+
"xml": "application/xml",
|
|
188
|
+
"txt": "text/plain",
|
|
189
|
+
"zip": "application/zip",
|
|
190
|
+
"rar": "application/x-rar-compressed",
|
|
191
|
+
"7z": "application/x-7z-compressed",
|
|
192
|
+
"tar": "application/x-tar",
|
|
193
|
+
"gz": "application/gzip",
|
|
194
|
+
"mp3": "audio/mpeg",
|
|
195
|
+
"wav": "audio/wav",
|
|
196
|
+
"mp4": "video/mp4",
|
|
197
|
+
"avi": "video/x-msvideo",
|
|
198
|
+
"mov": "video/quicktime"
|
|
199
|
+
}[filename.split(".").pop()?.toLowerCase() || ""] || "application/octet-stream";
|
|
200
|
+
};
|
|
201
|
+
this._filterRecipients = (field) => {
|
|
202
|
+
let response = this[field].filter((recipient) => recipient && null !== recipient);
|
|
203
|
+
response = response.map((recipient) => recipient.toLowerCase().trim());
|
|
204
|
+
response = response.filter((recipient) => "" !== recipient);
|
|
205
|
+
response = [...new Set(response)];
|
|
206
|
+
return response;
|
|
207
|
+
};
|
|
208
|
+
if (bcc) this.setBcc(bcc);
|
|
209
|
+
if (cc) this.setCc(cc);
|
|
210
|
+
if (from) this.setFrom(from);
|
|
211
|
+
if (html) this.setHtml(html);
|
|
212
|
+
if (subject) this.setSubject(subject);
|
|
213
|
+
if (to) this.setTo(to);
|
|
214
|
+
if (attachments) this.setAttachments(attachments);
|
|
215
|
+
return this;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
//#endregion
|
|
219
|
+
export { SimpleEmail };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_aws_server_aws = require("../../server/aws.cjs");
|
|
3
|
+
require("../../server/index.cjs");
|
|
4
|
+
const require_aws_ses_server_AwsSesNamespace = require("./AwsSesNamespace.cjs");
|
|
5
|
+
const require_aws_ses_server_SimpleEmail = require("./SimpleEmail.cjs");
|
|
6
|
+
//#region src/aws/ses/server/awsSes.ts
|
|
7
|
+
const awsSesNamespaces = /* @__PURE__ */ new Map();
|
|
8
|
+
const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
9
|
+
if (awsSesNamespaces.has(key)) return awsSesNamespaces.get(key);
|
|
10
|
+
const namespace = new require_aws_ses_server_AwsSesNamespace.AwsSesNamespace(key, await require_aws_server_aws.getConfig(key, config, vaultId, itemId));
|
|
11
|
+
awsSesNamespaces.set(key, namespace);
|
|
12
|
+
return namespace;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.SimpleEmail = require_aws_ses_server_SimpleEmail.SimpleEmail;
|
|
16
|
+
exports.awsSesClient = awsSesClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AwsConfig } from "../../server/aws.cjs";
|
|
2
|
+
import { AwsSesNamespace } from "./AwsSesNamespace.cjs";
|
|
3
|
+
import { SimpleEmail } from "./SimpleEmail.cjs";
|
|
4
|
+
|
|
5
|
+
//#region src/aws/ses/server/awsSes.d.ts
|
|
6
|
+
declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { SimpleEmail, awsSesClient };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AwsConfig } from "../../server/aws.mjs";
|
|
2
|
+
import { AwsSesNamespace } from "./AwsSesNamespace.mjs";
|
|
3
|
+
import { SimpleEmail } from "./SimpleEmail.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/aws/ses/server/awsSes.d.ts
|
|
6
|
+
declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { SimpleEmail, awsSesClient };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getConfig } from "../../server/aws.mjs";
|
|
2
|
+
import "../../server/index.mjs";
|
|
3
|
+
import { AwsSesNamespace } from "./AwsSesNamespace.mjs";
|
|
4
|
+
import { SimpleEmail } from "./SimpleEmail.mjs";
|
|
5
|
+
//#region src/aws/ses/server/awsSes.ts
|
|
6
|
+
const awsSesNamespaces = /* @__PURE__ */ new Map();
|
|
7
|
+
const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
8
|
+
if (awsSesNamespaces.has(key)) return awsSesNamespaces.get(key);
|
|
9
|
+
const namespace = new AwsSesNamespace(key, await getConfig(key, config, vaultId, itemId));
|
|
10
|
+
awsSesNamespaces.set(key, namespace);
|
|
11
|
+
return namespace;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SimpleEmail, awsSesClient };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_aws_ses_server_AwsSesNamespace = require("./AwsSesNamespace.cjs");
|
|
3
|
+
const require_aws_ses_server_SimpleEmail = require("./SimpleEmail.cjs");
|
|
4
|
+
const require_aws_ses_server_awsSes = require("./awsSes.cjs");
|
|
5
|
+
exports.AwsSesNamespace = require_aws_ses_server_AwsSesNamespace.AwsSesNamespace;
|
|
6
|
+
exports.SimpleEmail = require_aws_ses_server_SimpleEmail.SimpleEmail;
|
|
7
|
+
exports.awsSesClient = require_aws_ses_server_awsSes.awsSesClient;
|
|
@@ -1,105 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region src/aws/ses/server/AwsSesNamespace.d.ts
|
|
6
|
-
declare class AwsSesNamespace extends BaseNamespace {
|
|
7
|
-
client: SESClient;
|
|
8
|
-
config: AwsConfig;
|
|
9
|
-
ensureInit: () => Promise<void>;
|
|
10
|
-
send: (input: SendEmailCommandInput | SendRawEmailCommandInput) => Promise<unknown>;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/aws/ses/server/SimpleEmail.d.ts
|
|
14
|
-
type AttachmentSource = {
|
|
15
|
-
filename: string;
|
|
16
|
-
contentType?: string;
|
|
17
|
-
data?: string;
|
|
18
|
-
url?: string;
|
|
19
|
-
};
|
|
20
|
-
type ConstructorProps = {
|
|
21
|
-
bcc?: string[];
|
|
22
|
-
cc?: string[];
|
|
23
|
-
from?: string;
|
|
24
|
-
html?: string;
|
|
25
|
-
subject?: string;
|
|
26
|
-
to?: string | string[];
|
|
27
|
-
attachments?: AttachmentSource[];
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Class to build and send an AWS SES email.
|
|
31
|
-
*/
|
|
32
|
-
declare class SimpleEmail extends BaseClass {
|
|
33
|
-
from?: string;
|
|
34
|
-
to: string[];
|
|
35
|
-
cc: string[];
|
|
36
|
-
bcc: string[];
|
|
37
|
-
html?: string;
|
|
38
|
-
subject?: string;
|
|
39
|
-
attachments: AttachmentSource[];
|
|
40
|
-
constructor({
|
|
41
|
-
bcc,
|
|
42
|
-
cc,
|
|
43
|
-
from,
|
|
44
|
-
html,
|
|
45
|
-
subject,
|
|
46
|
-
to,
|
|
47
|
-
attachments
|
|
48
|
-
}: ConstructorProps);
|
|
49
|
-
setFrom: (from: string) => this;
|
|
50
|
-
setHtml: (html: string) => this;
|
|
51
|
-
setSubject: (subject: string) => this;
|
|
52
|
-
setAttachments: (attachments: AttachmentSource[]) => this;
|
|
53
|
-
addAttachment: (attachment: AttachmentSource) => this;
|
|
54
|
-
addAttachmentFromdata: (filename: string, data: string, contentType?: string) => this;
|
|
55
|
-
addAttachmentFromUrl: (filename: string, url: string, contentType?: string) => this;
|
|
56
|
-
clearAttachments: () => this;
|
|
57
|
-
pushBcc: (recipient: string | string[]) => this;
|
|
58
|
-
pushCc: (recipient: string | string[]) => this;
|
|
59
|
-
pushTo: (recipient: string | string[]) => this;
|
|
60
|
-
setBcc: (recipient: string | string[]) => this;
|
|
61
|
-
setCc: (recipient: string | string[]) => this;
|
|
62
|
-
setTo: (recipient: string | string[]) => this;
|
|
63
|
-
getSendParam: () => Promise<{
|
|
64
|
-
Destinations: string[];
|
|
65
|
-
RawMessage: {
|
|
66
|
-
Data: string;
|
|
67
|
-
};
|
|
68
|
-
Source: string | undefined;
|
|
69
|
-
} | {
|
|
70
|
-
Destination: {
|
|
71
|
-
BccAddresses: string[];
|
|
72
|
-
CcAddresses: string[];
|
|
73
|
-
ToAddresses: string[];
|
|
74
|
-
};
|
|
75
|
-
Message: {
|
|
76
|
-
Body: {
|
|
77
|
-
Html: {
|
|
78
|
-
Charset: string;
|
|
79
|
-
Data: string | undefined;
|
|
80
|
-
};
|
|
81
|
-
Text: {
|
|
82
|
-
Charset: string;
|
|
83
|
-
Data: string | undefined;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
Subject: {
|
|
87
|
-
Charset: string;
|
|
88
|
-
Data: string | undefined;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
Source: string | undefined;
|
|
92
|
-
}>;
|
|
93
|
-
private _getRawEmailParams;
|
|
94
|
-
private _isTextFile;
|
|
95
|
-
private _getAttachmentTextData;
|
|
96
|
-
private _getAttachmentData;
|
|
97
|
-
private _isBase64;
|
|
98
|
-
private _getContentTypeFromFilename;
|
|
99
|
-
private _filterRecipients;
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/aws/ses/server/awsSes.d.ts
|
|
103
|
-
declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
|
|
104
|
-
//#endregion
|
|
1
|
+
import { AwsSesNamespace } from "./AwsSesNamespace.mjs";
|
|
2
|
+
import { SimpleEmail } from "./SimpleEmail.mjs";
|
|
3
|
+
import { awsSesClient } from "./awsSes.mjs";
|
|
105
4
|
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|
|
@@ -1,264 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var AwsSesNamespace = class extends BaseNamespace {
|
|
5
|
-
ensureInit = async () => {
|
|
6
|
-
if (!this.client) try {
|
|
7
|
-
const { SESClient } = await import("@aws-sdk/client-ses");
|
|
8
|
-
this.client = new SESClient(this.config);
|
|
9
|
-
} catch (e) {
|
|
10
|
-
throw new Error("AWS SES Client not installed");
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
send = async (input) => {
|
|
14
|
-
await this.ensureInit();
|
|
15
|
-
let response;
|
|
16
|
-
if (input?.Message?.Body?.Html?.Data) try {
|
|
17
|
-
const { SendEmailCommand } = await import("@aws-sdk/client-ses");
|
|
18
|
-
const command = new SendEmailCommand(input);
|
|
19
|
-
response = await this.client.send(command);
|
|
20
|
-
} catch (exception) {
|
|
21
|
-
response = exception;
|
|
22
|
-
}
|
|
23
|
-
else try {
|
|
24
|
-
const { SendRawEmailCommand } = await import("@aws-sdk/client-ses");
|
|
25
|
-
const command = new SendRawEmailCommand(input);
|
|
26
|
-
response = await this.client.send(command);
|
|
27
|
-
} catch (exception) {
|
|
28
|
-
response = exception;
|
|
29
|
-
}
|
|
30
|
-
return response;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/aws/ses/server/SimpleEmail.ts
|
|
35
|
-
/**
|
|
36
|
-
* Class to build and send an AWS SES email.
|
|
37
|
-
*/
|
|
38
|
-
var SimpleEmail = class extends BaseClass {
|
|
39
|
-
from;
|
|
40
|
-
to = [];
|
|
41
|
-
cc = [];
|
|
42
|
-
bcc = [];
|
|
43
|
-
html;
|
|
44
|
-
subject;
|
|
45
|
-
attachments = [];
|
|
46
|
-
constructor({ bcc, cc, from, html, subject, to, attachments }) {
|
|
47
|
-
super();
|
|
48
|
-
if (bcc) this.setBcc(bcc);
|
|
49
|
-
if (cc) this.setCc(cc);
|
|
50
|
-
if (from) this.setFrom(from);
|
|
51
|
-
if (html) this.setHtml(html);
|
|
52
|
-
if (subject) this.setSubject(subject);
|
|
53
|
-
if (to) this.setTo(to);
|
|
54
|
-
if (attachments) this.setAttachments(attachments);
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
setFrom = (from) => {
|
|
58
|
-
return this._setValue("from", from);
|
|
59
|
-
};
|
|
60
|
-
setHtml = (html) => {
|
|
61
|
-
return this._setValue("html", html);
|
|
62
|
-
};
|
|
63
|
-
setSubject = (subject) => {
|
|
64
|
-
return this._setValue("subject", subject);
|
|
65
|
-
};
|
|
66
|
-
setAttachments = (attachments) => {
|
|
67
|
-
return this._setValue("attachments", attachments);
|
|
68
|
-
};
|
|
69
|
-
addAttachment = (attachment) => {
|
|
70
|
-
this.attachments.push(attachment);
|
|
71
|
-
return this;
|
|
72
|
-
};
|
|
73
|
-
addAttachmentFromdata = (filename, data, contentType) => {
|
|
74
|
-
return this.addAttachment({
|
|
75
|
-
filename,
|
|
76
|
-
data,
|
|
77
|
-
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
addAttachmentFromUrl = (filename, url, contentType) => {
|
|
81
|
-
return this.addAttachment({
|
|
82
|
-
filename,
|
|
83
|
-
url,
|
|
84
|
-
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
clearAttachments = () => {
|
|
88
|
-
this.attachments = [];
|
|
89
|
-
return this;
|
|
90
|
-
};
|
|
91
|
-
pushBcc = (recipient) => {
|
|
92
|
-
return this._push("bcc", recipient);
|
|
93
|
-
};
|
|
94
|
-
pushCc = (recipient) => {
|
|
95
|
-
return this._push("cc", recipient);
|
|
96
|
-
};
|
|
97
|
-
pushTo = (recipient) => {
|
|
98
|
-
return this._push("to", recipient);
|
|
99
|
-
};
|
|
100
|
-
setBcc = (recipient) => {
|
|
101
|
-
return this._setArray("bcc", recipient);
|
|
102
|
-
};
|
|
103
|
-
setCc = (recipient) => {
|
|
104
|
-
return this._setArray("cc", recipient);
|
|
105
|
-
};
|
|
106
|
-
setTo = (recipient) => {
|
|
107
|
-
return this._setArray("to", recipient);
|
|
108
|
-
};
|
|
109
|
-
getSendParam = async () => {
|
|
110
|
-
if (this.attachments.length > 0) return await this._getRawEmailParams();
|
|
111
|
-
return {
|
|
112
|
-
Destination: {
|
|
113
|
-
BccAddresses: this._filterRecipients("bcc"),
|
|
114
|
-
CcAddresses: this._filterRecipients("cc"),
|
|
115
|
-
ToAddresses: this._filterRecipients("to")
|
|
116
|
-
},
|
|
117
|
-
Message: {
|
|
118
|
-
Body: {
|
|
119
|
-
Html: {
|
|
120
|
-
Charset: "UTF-8",
|
|
121
|
-
Data: this.html
|
|
122
|
-
},
|
|
123
|
-
Text: {
|
|
124
|
-
Charset: "UTF-8",
|
|
125
|
-
Data: this.html
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
Subject: {
|
|
129
|
-
Charset: "UTF-8",
|
|
130
|
-
Data: this.subject
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
Source: this.from
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
_getRawEmailParams = async () => {
|
|
137
|
-
const boundary = `----=_NextPart_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
138
|
-
const allRecipients = [
|
|
139
|
-
...this._filterRecipients("to"),
|
|
140
|
-
...this._filterRecipients("cc"),
|
|
141
|
-
...this._filterRecipients("bcc")
|
|
142
|
-
];
|
|
143
|
-
let rawMessage = "";
|
|
144
|
-
rawMessage += `From: ${this.from}\r\n`;
|
|
145
|
-
if (this._filterRecipients("to").length > 0) rawMessage += `To: ${this._filterRecipients("to").join(", ")}\r\n`;
|
|
146
|
-
if (this._filterRecipients("cc").length > 0) rawMessage += `Cc: ${this._filterRecipients("cc").join(", ")}\r\n`;
|
|
147
|
-
rawMessage += `Subject: ${this.subject}\r\n`;
|
|
148
|
-
rawMessage += `MIME-Version: 1.0\r\n`;
|
|
149
|
-
rawMessage += `Content-Type: multipart/mixed; boundary="${boundary}"\r\n\r\n`;
|
|
150
|
-
rawMessage += `--${boundary}\r\n`;
|
|
151
|
-
rawMessage += `Content-Type: text/html; charset=UTF-8\r\n`;
|
|
152
|
-
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
153
|
-
rawMessage += `${this.html}\r\n\r\n`;
|
|
154
|
-
for (const attachment of this.attachments) {
|
|
155
|
-
const isTextFile = this._isTextFile(attachment.contentType || this._getContentTypeFromFilename(attachment.filename));
|
|
156
|
-
rawMessage += `--${boundary}\r\n`;
|
|
157
|
-
rawMessage += `Content-Type: ${attachment.contentType || "application/octet-stream"}\r\n`;
|
|
158
|
-
rawMessage += `Content-Disposition: attachment; filename="${attachment.filename}"\r\n`;
|
|
159
|
-
if (isTextFile) {
|
|
160
|
-
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
161
|
-
const textData = await this._getAttachmentTextData(attachment);
|
|
162
|
-
rawMessage += `${textData}\r\n\r\n`;
|
|
163
|
-
} else {
|
|
164
|
-
rawMessage += `Content-Transfer-Encoding: base64\r\n\r\n`;
|
|
165
|
-
const attachmentData = await this._getAttachmentData(attachment);
|
|
166
|
-
rawMessage += `${attachmentData}\r\n\r\n`;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
rawMessage += `--${boundary}--\r\n`;
|
|
170
|
-
return {
|
|
171
|
-
Destinations: allRecipients,
|
|
172
|
-
RawMessage: { Data: rawMessage },
|
|
173
|
-
Source: this.from
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
_isTextFile = (contentType) => {
|
|
177
|
-
return [
|
|
178
|
-
"text/csv",
|
|
179
|
-
"text/plain",
|
|
180
|
-
"text/html",
|
|
181
|
-
"application/json",
|
|
182
|
-
"application/xml",
|
|
183
|
-
"text/xml"
|
|
184
|
-
].some((type) => contentType.startsWith(type));
|
|
185
|
-
};
|
|
186
|
-
_getAttachmentTextData = async (attachment) => {
|
|
187
|
-
if (attachment.data) {
|
|
188
|
-
const base64Data = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
189
|
-
if (this._isBase64(base64Data)) return Buffer.from(base64Data, "base64").toString("utf-8");
|
|
190
|
-
return attachment.data;
|
|
191
|
-
}
|
|
192
|
-
if (attachment.url) return await (await (await import("node-fetch").then((mod) => mod.default))(attachment.url)).text();
|
|
193
|
-
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
194
|
-
};
|
|
195
|
-
_getAttachmentData = async (attachment) => {
|
|
196
|
-
if (attachment.data) {
|
|
197
|
-
const cleanData = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
198
|
-
if (this._isBase64(cleanData)) return cleanData;
|
|
199
|
-
return Buffer.from(attachment.data, "utf-8").toString("base64");
|
|
200
|
-
}
|
|
201
|
-
if (attachment.url) return (await (await (await import("node-fetch").then((mod) => mod.default))(attachment.url)).buffer()).toString("base64");
|
|
202
|
-
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
203
|
-
};
|
|
204
|
-
_isBase64 = (str) => {
|
|
205
|
-
try {
|
|
206
|
-
return Buffer.from(str, "base64").toString("base64") === str;
|
|
207
|
-
} catch {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
_getContentTypeFromFilename = (filename) => {
|
|
212
|
-
const extension = filename.split(".").pop()?.toLowerCase();
|
|
213
|
-
return {
|
|
214
|
-
"jpg": "image/jpeg",
|
|
215
|
-
"jpeg": "image/jpeg",
|
|
216
|
-
"png": "image/png",
|
|
217
|
-
"gif": "image/gif",
|
|
218
|
-
"svg": "image/svg+xml",
|
|
219
|
-
"webp": "image/webp",
|
|
220
|
-
"bmp": "image/bmp",
|
|
221
|
-
"ico": "image/x-icon",
|
|
222
|
-
"pdf": "application/pdf",
|
|
223
|
-
"doc": "application/msword",
|
|
224
|
-
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
225
|
-
"xls": "application/vnd.ms-excel",
|
|
226
|
-
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
227
|
-
"ppt": "application/vnd.ms-powerpoint",
|
|
228
|
-
"pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
229
|
-
"csv": "text/csv",
|
|
230
|
-
"tsv": "text/tab-separated-values",
|
|
231
|
-
"json": "application/json",
|
|
232
|
-
"xml": "application/xml",
|
|
233
|
-
"txt": "text/plain",
|
|
234
|
-
"zip": "application/zip",
|
|
235
|
-
"rar": "application/x-rar-compressed",
|
|
236
|
-
"7z": "application/x-7z-compressed",
|
|
237
|
-
"tar": "application/x-tar",
|
|
238
|
-
"gz": "application/gzip",
|
|
239
|
-
"mp3": "audio/mpeg",
|
|
240
|
-
"wav": "audio/wav",
|
|
241
|
-
"mp4": "video/mp4",
|
|
242
|
-
"avi": "video/x-msvideo",
|
|
243
|
-
"mov": "video/quicktime"
|
|
244
|
-
}[extension || ""] || "application/octet-stream";
|
|
245
|
-
};
|
|
246
|
-
_filterRecipients = (field) => {
|
|
247
|
-
let response = this[field].filter((recipient) => recipient && null !== recipient);
|
|
248
|
-
response = response.map((recipient) => recipient.toLowerCase().trim());
|
|
249
|
-
response = response.filter((recipient) => "" !== recipient);
|
|
250
|
-
response = [...new Set(response)];
|
|
251
|
-
return response;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region src/aws/ses/server/awsSes.ts
|
|
256
|
-
const awsSesNamespaces = /* @__PURE__ */ new Map();
|
|
257
|
-
const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
258
|
-
if (awsSesNamespaces.has(key)) return awsSesNamespaces.get(key);
|
|
259
|
-
const namespace = new AwsSesNamespace(key, await getConfig(key, config, vaultId, itemId));
|
|
260
|
-
awsSesNamespaces.set(key, namespace);
|
|
261
|
-
return namespace;
|
|
262
|
-
};
|
|
263
|
-
//#endregion
|
|
1
|
+
import { AwsSesNamespace } from "./AwsSesNamespace.mjs";
|
|
2
|
+
import { SimpleEmail } from "./SimpleEmail.mjs";
|
|
3
|
+
import { awsSesClient } from "./awsSes.mjs";
|
|
264
4
|
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|