@8ms/helpers 2.3.5 → 2.3.7
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/.github/workflows/deploy_npmjs.yml +0 -3
- package/.yarn/install-state.gz +0 -0
- package/dist/_class/index.d.mts +2 -0
- package/dist/_class/index.mjs +62 -0
- package/dist/adverity/index.d.mts +2 -0
- package/dist/adverity/index.mjs +64 -0
- package/{adverity/server/getJobs.d.ts → dist/adverity/server/index.d.mts} +11 -8
- package/dist/adverity/server/index.mjs +25 -0
- package/dist/api/index.d.mts +2 -0
- package/dist/api/index.mjs +3 -0
- package/dist/api-DGKJDAfb.mjs +139 -0
- package/dist/array/index.d.mts +11 -0
- package/dist/array/index.mjs +14 -0
- package/dist/atInternet/index.d.mts +20 -0
- package/dist/atInternet/index.mjs +18 -0
- package/dist/aws/ec2/server/index.d.mts +18 -0
- package/dist/aws/ec2/server/index.mjs +48 -0
- package/dist/aws/ecs/server/index.d.mts +59 -0
- package/dist/aws/ecs/server/index.mjs +113 -0
- package/dist/aws/glue/server/index.d.mts +19 -0
- package/dist/aws/glue/server/index.mjs +36 -0
- package/dist/aws/lambda/server/index.d.mts +28 -0
- package/dist/aws/lambda/server/index.mjs +57 -0
- package/dist/aws/s3/server/index.d.mts +124 -0
- package/dist/aws/s3/server/index.mjs +361 -0
- package/dist/aws/server/index.d.mts +2 -0
- package/dist/aws/server/index.mjs +3 -0
- package/dist/aws/ses/server/index.d.mts +105 -0
- package/dist/aws/ses/server/index.mjs +269 -0
- package/dist/aws/sqs/server/index.d.mts +41 -0
- package/dist/aws/sqs/server/index.mjs +56 -0
- package/dist/aws/ssm/server/index.d.mts +18 -0
- package/dist/aws/ssm/server/index.mjs +47 -0
- package/dist/axios/index.d.mts +22 -0
- package/dist/axios/index.mjs +50 -0
- package/dist/boolean/index.d.mts +7 -0
- package/dist/boolean/index.mjs +15 -0
- package/dist/brightData/serpApi/server/index.d.mts +93 -0
- package/dist/brightData/serpApi/server/index.mjs +229 -0
- package/dist/brightData/server/index.d.mts +2 -0
- package/dist/brightData/server/index.mjs +18 -0
- package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
- package/dist/brightData/webScraperIde/server/index.mjs +50 -0
- package/dist/cache/server/index.d.mts +10 -0
- package/dist/cache/server/index.mjs +31 -0
- package/dist/chunk-CgI6uo-e.mjs +32 -0
- package/dist/crud/index.d.mts +10 -0
- package/dist/crud/index.mjs +10 -0
- package/dist/crypto/index.d.mts +28 -0
- package/dist/crypto/index.mjs +47 -0
- package/dist/date/index.d.mts +2 -0
- package/dist/date/index.mjs +471 -0
- package/dist/environment/index.d.mts +37 -0
- package/dist/environment/index.mjs +60 -0
- package/dist/eskimi/index.d.mts +52 -0
- package/dist/eskimi/index.mjs +90 -0
- package/dist/eskimi/server/index.d.mts +25 -0
- package/dist/eskimi/server/index.mjs +50 -0
- package/dist/file/index.d.mts +7 -0
- package/dist/file/index.mjs +20 -0
- package/dist/file/server/index.d.mts +8 -0
- package/dist/file/server/index.mjs +16 -0
- package/dist/from-9s4TjsYv.mjs +3878 -0
- package/dist/geo/index.d.mts +26 -0
- package/dist/geo/index.mjs +1591 -0
- package/dist/getDecimal-CafxtLhH.mjs +40 -0
- package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
- package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
- package/dist/googleAds/server/index.d.mts +27 -0
- package/dist/googleAds/server/index.mjs +48 -0
- package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
- package/dist/googleCloud/bigquery/server/index.mjs +127 -0
- package/dist/googleCloud/server/index.d.mts +2 -0
- package/dist/googleCloud/server/index.mjs +24 -0
- package/dist/googleCloud/sheets/server/index.d.mts +22 -0
- package/dist/googleCloud/sheets/server/index.mjs +31 -0
- package/dist/googleCloud/storage/server/index.d.mts +31 -0
- package/dist/googleCloud/storage/server/index.mjs +79 -0
- package/dist/googlePageSpeed/server/index.d.mts +34 -0
- package/dist/googlePageSpeed/server/index.mjs +53 -0
- package/dist/googleSearchIncidents/server/index.d.mts +73 -0
- package/dist/googleSearchIncidents/server/index.mjs +55 -0
- package/dist/greenDomain/server/index.d.mts +25 -0
- package/dist/greenDomain/server/index.mjs +31 -0
- package/dist/index-B20FTOvk.d.mts +67 -0
- package/dist/index-B4K9Z1U-.d.mts +17 -0
- package/dist/index-CFaAdPAh.d.mts +32 -0
- package/dist/index-CIG08fpw.d.mts +32 -0
- package/dist/index-CMfxuwL1.d.mts +246 -0
- package/dist/index-DEm1Wodf.d.mts +116 -0
- package/dist/index-sfVt7tI_.d.mts +18 -0
- package/dist/inngest/index.d.mts +10 -0
- package/dist/inngest/index.mjs +10 -0
- package/dist/json/index.d.mts +7 -0
- package/dist/json/index.mjs +27 -0
- package/dist/littleWarden/server/index.d.mts +56 -0
- package/dist/littleWarden/server/index.mjs +79 -0
- package/dist/lumar/api/server/index.d.mts +66 -0
- package/dist/lumar/api/server/index.mjs +111 -0
- package/dist/lumar/graphql/server/index.d.mts +308 -0
- package/dist/lumar/graphql/server/index.mjs +172 -0
- package/dist/multipart-parser-BC14QSvI.mjs +290 -0
- package/dist/myTarget/server/index.d.mts +9 -0
- package/dist/myTarget/server/index.mjs +16 -0
- package/dist/nextAuth/index.d.mts +12 -0
- package/dist/nextAuth/index.mjs +15 -0
- package/dist/nextJs/client/index.d.mts +10 -0
- package/dist/nextJs/client/index.mjs +12 -0
- package/dist/nextJs/index.d.mts +19 -0
- package/dist/nextJs/index.mjs +12 -0
- package/dist/number/index.d.mts +54 -0
- package/dist/number/index.mjs +75 -0
- package/{object/replaceKeys.d.ts → dist/object/index.d.mts} +4 -1
- package/dist/object/index.mjs +22 -0
- package/dist/onePassword/server/index.d.mts +24 -0
- package/dist/onePassword/server/index.mjs +50 -0
- package/dist/openAi/server/index.d.mts +20 -0
- package/dist/openAi/server/index.mjs +46 -0
- package/dist/prisma/index.d.mts +7 -0
- package/dist/prisma/index.mjs +16 -0
- package/dist/prisma/server/index.d.mts +31 -0
- package/dist/prisma/server/index.mjs +72 -0
- package/dist/server-Bwy4JI8Z.mjs +33 -0
- package/dist/snapchat/server/index.d.mts +25 -0
- package/dist/snapchat/server/index.mjs +39 -0
- package/dist/sorting/index.d.mts +25 -0
- package/dist/sorting/index.mjs +50 -0
- package/dist/src-BeXFXTgz.mjs +1272 -0
- package/dist/stream/server/index.d.mts +15 -0
- package/dist/stream/server/index.mjs +48 -0
- package/dist/string/index.d.mts +107 -0
- package/dist/string/index.mjs +191 -0
- package/dist/swr/client/index.d.mts +46 -0
- package/dist/swr/client/index.mjs +40 -0
- package/dist/upTimeRobot/server/index.d.mts +72 -0
- package/dist/upTimeRobot/server/index.mjs +83 -0
- package/dist/url/index.d.mts +29 -0
- package/dist/url/index.mjs +52 -0
- package/dist/url/server/index.d.mts +9 -0
- package/dist/url/server/index.mjs +35 -0
- package/dist/util/index.d.mts +47 -0
- package/dist/util/index.mjs +99 -0
- package/dist/util/server/index.d.mts +27 -0
- package/dist/util/server/index.mjs +61 -0
- package/dist/webWorker/index.d.mts +11 -0
- package/dist/webWorker/index.mjs +11 -0
- package/dist/xml/server/index.d.mts +4 -0
- package/dist/xml/server/index.mjs +17 -0
- package/package.json +71 -1066
- package/tsdown.config.ts +10 -0
- package/.github/generate-exports.js +0 -111
- package/_class/BaseClass.d.ts +0 -18
- package/_class/BaseClass.js +0 -44
- package/_class/BaseNamespace.d.ts +0 -9
- package/_class/BaseNamespace.js +0 -24
- package/_class/index.d.ts +0 -2
- package/_class/index.js +0 -2
- package/adverity/adverity.d.ts +0 -112
- package/adverity/adverity.js +0 -58
- package/adverity/index.d.ts +0 -1
- package/adverity/index.js +0 -1
- package/adverity/server/getJobs.js +0 -26
- package/adverity/server/index.d.ts +0 -1
- package/adverity/server/index.js +0 -1
- package/api/ApiResponseClass.d.ts +0 -35
- package/api/ApiResponseClass.js +0 -93
- package/api/api.d.ts +0 -17
- package/api/api.js +0 -15
- package/api/functions.d.ts +0 -7
- package/api/functions.js +0 -19
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -3
- package/array/array.d.ts +0 -8
- package/array/array.js +0 -9
- package/array/index.d.ts +0 -1
- package/array/index.js +0 -1
- package/atInternet/atInternet.d.ts +0 -16
- package/atInternet/atInternet.js +0 -15
- package/atInternet/index.d.ts +0 -1
- package/atInternet/index.js +0 -1
- package/aws/ec2/server/AwsEc2Namespace.d.ts +0 -10
- package/aws/ec2/server/AwsEc2Namespace.js +0 -37
- package/aws/ec2/server/awsEc2.d.ts +0 -3
- package/aws/ec2/server/awsEc2.js +0 -12
- package/aws/ec2/server/index.d.ts +0 -2
- package/aws/ec2/server/index.js +0 -2
- package/aws/ecs/server/AwsEcsNamespace.d.ts +0 -53
- package/aws/ecs/server/AwsEcsNamespace.js +0 -118
- package/aws/ecs/server/awsEcs.d.ts +0 -3
- package/aws/ecs/server/awsEcs.js +0 -12
- package/aws/ecs/server/index.d.ts +0 -2
- package/aws/ecs/server/index.js +0 -2
- package/aws/glue/server/AwsGlueNamespace.d.ts +0 -12
- package/aws/glue/server/AwsGlueNamespace.js +0 -29
- package/aws/glue/server/awsGlue.d.ts +0 -3
- package/aws/glue/server/awsGlue.js +0 -12
- package/aws/glue/server/index.d.ts +0 -2
- package/aws/glue/server/index.js +0 -2
- package/aws/lambda/server/AwsLambdaNamespace.d.ts +0 -21
- package/aws/lambda/server/AwsLambdaNamespace.js +0 -69
- package/aws/lambda/server/awsLambda.d.ts +0 -4
- package/aws/lambda/server/awsLambda.js +0 -16
- package/aws/lambda/server/index.d.ts +0 -2
- package/aws/lambda/server/index.js +0 -2
- package/aws/s3/server/AwsS3Namespace.d.ts +0 -65
- package/aws/s3/server/AwsS3Namespace.js +0 -364
- package/aws/s3/server/awsS3.d.ts +0 -13
- package/aws/s3/server/awsS3.js +0 -20
- package/aws/s3/server/index.d.ts +0 -3
- package/aws/s3/server/index.js +0 -3
- package/aws/s3/server/payload.d.ts +0 -42
- package/aws/s3/server/payload.js +0 -43
- package/aws/server/aws.d.ts +0 -9
- package/aws/server/aws.js +0 -29
- package/aws/server/index.d.ts +0 -2
- package/aws/server/index.js +0 -2
- package/aws/server/isResponse200.d.ts +0 -4
- package/aws/server/isResponse200.js +0 -12
- package/aws/ses/server/AwsSesNamespace.d.ts +0 -9
- package/aws/ses/server/AwsSesNamespace.js +0 -41
- package/aws/ses/server/SimpleEmail.d.ts +0 -81
- package/aws/ses/server/SimpleEmail.js +0 -296
- package/aws/ses/server/awsSes.d.ts +0 -4
- package/aws/ses/server/awsSes.js +0 -13
- package/aws/ses/server/index.d.ts +0 -3
- package/aws/ses/server/index.js +0 -3
- package/aws/sqs/server/AwsSqsNamespace.d.ts +0 -34
- package/aws/sqs/server/AwsSqsNamespace.js +0 -55
- package/aws/sqs/server/awsSqs.d.ts +0 -3
- package/aws/sqs/server/awsSqs.js +0 -12
- package/aws/sqs/server/index.d.ts +0 -2
- package/aws/sqs/server/index.js +0 -2
- package/aws/ssm/server/AwsSsmNamespace.d.ts +0 -11
- package/aws/ssm/server/AwsSsmNamespace.js +0 -52
- package/aws/ssm/server/awsSsm.d.ts +0 -3
- package/aws/ssm/server/awsSsm.js +0 -12
- package/aws/ssm/server/index.d.ts +0 -2
- package/aws/ssm/server/index.js +0 -2
- package/axios/deleteRequest.d.ts +0 -6
- package/axios/deleteRequest.js +0 -26
- package/axios/get.d.ts +0 -5
- package/axios/get.js +0 -24
- package/axios/index.d.ts +0 -3
- package/axios/index.js +0 -3
- package/axios/post.d.ts +0 -5
- package/axios/post.js +0 -25
- package/boolean/boolean.d.ts +0 -4
- package/boolean/boolean.js +0 -16
- package/boolean/index.d.ts +0 -1
- package/boolean/index.js +0 -1
- package/brightData/serpApi/server/brightDataSerpApi.d.ts +0 -10
- package/brightData/serpApi/server/brightDataSerpApi.js +0 -9
- package/brightData/serpApi/server/buildGoogleSerpUrl.d.ts +0 -32
- package/brightData/serpApi/server/buildGoogleSerpUrl.js +0 -112
- package/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts +0 -22
- package/brightData/serpApi/server/buildGoogleTrendsUrl.js +0 -57
- package/brightData/serpApi/server/getAsyncRequestId.d.ts +0 -8
- package/brightData/serpApi/server/getAsyncRequestId.js +0 -32
- package/brightData/serpApi/server/getAsyncResults.d.ts +0 -7
- package/brightData/serpApi/server/getAsyncResults.js +0 -31
- package/brightData/serpApi/server/getRealtime.d.ts +0 -5
- package/brightData/serpApi/server/getRealtime.js +0 -26
- package/brightData/serpApi/server/index.d.ts +0 -6
- package/brightData/serpApi/server/index.js +0 -6
- package/brightData/server/brightData.d.ts +0 -15
- package/brightData/server/brightData.js +0 -15
- package/brightData/server/index.d.ts +0 -1
- package/brightData/server/index.js +0 -1
- package/brightData/webScraperIde/server/getBatch.d.ts +0 -7
- package/brightData/webScraperIde/server/getBatch.js +0 -24
- package/brightData/webScraperIde/server/getRealtime.d.ts +0 -7
- package/brightData/webScraperIde/server/getRealtime.js +0 -45
- package/brightData/webScraperIde/server/index.d.ts +0 -2
- package/brightData/webScraperIde/server/index.js +0 -2
- package/cache/server/cache.d.ts +0 -7
- package/cache/server/cache.js +0 -43
- package/cache/server/index.d.ts +0 -1
- package/cache/server/index.js +0 -1
- package/cache/server/test/cache.test.d.ts +0 -1
- package/cache/server/test/cache.test.js +0 -8
- package/crud/crud.d.ts +0 -7
- package/crud/crud.js +0 -6
- package/crud/index.d.ts +0 -1
- package/crud/index.js +0 -1
- package/crypto/getDecrypt.d.ts +0 -5
- package/crypto/getDecrypt.js +0 -10
- package/crypto/getEncrypt.d.ts +0 -5
- package/crypto/getEncrypt.js +0 -10
- package/crypto/getRandom.d.ts +0 -4
- package/crypto/getRandom.js +0 -8
- package/crypto/getSha256.d.ts +0 -5
- package/crypto/getSha256.js +0 -11
- package/crypto/index.d.ts +0 -4
- package/crypto/index.js +0 -4
- package/date/calculation.d.ts +0 -102
- package/date/calculation.js +0 -272
- package/date/date.d.ts +0 -36
- package/date/date.js +0 -20
- package/date/financialYear.d.ts +0 -19
- package/date/financialYear.js +0 -78
- package/date/format.d.ts +0 -85
- package/date/format.js +0 -160
- package/date/index.d.ts +0 -4
- package/date/index.js +0 -4
- package/environment/environment.d.ts +0 -34
- package/environment/environment.js +0 -79
- package/environment/index.d.ts +0 -1
- package/environment/index.js +0 -1
- package/eskimi/eskimi.d.ts +0 -49
- package/eskimi/eskimi.js +0 -93
- package/eskimi/index.d.ts +0 -1
- package/eskimi/index.js +0 -1
- package/eskimi/server/getAgeGroup.d.ts +0 -4
- package/eskimi/server/getAgeGroup.js +0 -11
- package/eskimi/server/getData.d.ts +0 -4
- package/eskimi/server/getData.js +0 -13
- package/eskimi/server/getDevice.d.ts +0 -4
- package/eskimi/server/getDevice.js +0 -11
- package/eskimi/server/getGender.d.ts +0 -4
- package/eskimi/server/getGender.js +0 -11
- package/eskimi/server/index.d.ts +0 -4
- package/eskimi/server/index.js +0 -4
- package/file/getFileKey.d.ts +0 -4
- package/file/getFileKey.js +0 -23
- package/file/index.d.ts +0 -1
- package/file/index.js +0 -1
- package/file/server/createDirectory.d.ts +0 -5
- package/file/server/createDirectory.js +0 -13
- package/file/server/index.d.ts +0 -1
- package/file/server/index.js +0 -1
- package/geo/countries.d.ts +0 -12
- package/geo/countries.js +0 -219
- package/geo/index.d.ts +0 -2
- package/geo/index.js +0 -2
- package/geo/languages.d.ts +0 -9
- package/geo/languages.js +0 -55
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +0 -41
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +0 -55
- package/googleAds/keywordPlanner/server/index.d.ts +0 -1
- package/googleAds/keywordPlanner/server/index.js +0 -1
- package/googleAds/server/GoogleAdsNamespace.d.ts +0 -11
- package/googleAds/server/GoogleAdsNamespace.js +0 -30
- package/googleAds/server/googleAds.d.ts +0 -11
- package/googleAds/server/googleAds.js +0 -26
- package/googleAds/server/index.d.ts +0 -2
- package/googleAds/server/index.js +0 -2
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts +0 -50
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js +0 -115
- package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +0 -5
- package/googleCloud/bigquery/server/googleCloudBigquery.js +0 -41
- package/googleCloud/bigquery/server/index.d.ts +0 -3
- package/googleCloud/bigquery/server/index.js +0 -3
- package/googleCloud/bigquery/server/loadData.d.ts +0 -19
- package/googleCloud/bigquery/server/loadData.js +0 -14
- package/googleCloud/server/googleCloud.d.ts +0 -29
- package/googleCloud/server/googleCloud.js +0 -25
- package/googleCloud/server/index.d.ts +0 -1
- package/googleCloud/server/index.js +0 -1
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts +0 -18
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.js +0 -37
- package/googleCloud/sheets/server/getAssociatedData.d.ts +0 -10
- package/googleCloud/sheets/server/getAssociatedData.js +0 -39
- package/googleCloud/sheets/server/index.d.ts +0 -1
- package/googleCloud/sheets/server/index.js +0 -1
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.d.ts +0 -22
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.js +0 -66
- package/googleCloud/storage/server/googleCloudStorage.d.ts +0 -3
- package/googleCloud/storage/server/googleCloudStorage.js +0 -37
- package/googleCloud/storage/server/index.d.ts +0 -2
- package/googleCloud/storage/server/index.js +0 -2
- package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +0 -11
- package/googlePageSpeed/server/GooglePageSpeedNamespace.js +0 -27
- package/googlePageSpeed/server/googlePageSpeed.d.ts +0 -19
- package/googlePageSpeed/server/googlePageSpeed.js +0 -38
- package/googlePageSpeed/server/index.d.ts +0 -2
- package/googlePageSpeed/server/index.js +0 -2
- package/googleSearchIncidents/server/googleSearchIncidents.d.ts +0 -69
- package/googleSearchIncidents/server/googleSearchIncidents.js +0 -42
- package/googleSearchIncidents/server/index.d.ts +0 -1
- package/googleSearchIncidents/server/index.js +0 -1
- package/greenDomain/server/greenDomain.d.ts +0 -21
- package/greenDomain/server/greenDomain.js +0 -37
- package/greenDomain/server/index.d.ts +0 -1
- package/greenDomain/server/index.js +0 -1
- package/inngest/index.d.ts +0 -1
- package/inngest/index.js +0 -1
- package/inngest/inngest.d.ts +0 -7
- package/inngest/inngest.js +0 -6
- package/json/getJsonNewline.d.ts +0 -1
- package/json/getJsonNewline.js +0 -9
- package/json/index.d.ts +0 -2
- package/json/index.js +0 -2
- package/json/isJson.d.ts +0 -1
- package/json/isJson.js +0 -22
- package/littleWarden/server/LittleWardenNamespace.d.ts +0 -11
- package/littleWarden/server/LittleWardenNamespace.js +0 -30
- package/littleWarden/server/getUrlStatus.d.ts +0 -4
- package/littleWarden/server/getUrlStatus.js +0 -12
- package/littleWarden/server/index.d.ts +0 -2
- package/littleWarden/server/index.js +0 -2
- package/littleWarden/server/littleWarden.d.ts +0 -30
- package/littleWarden/server/littleWarden.js +0 -65
- package/lumar/api/server/buildRequest.d.ts +0 -13
- package/lumar/api/server/buildRequest.js +0 -76
- package/lumar/api/server/getData.d.ts +0 -1
- package/lumar/api/server/getData.js +0 -9
- package/lumar/api/server/index.d.ts +0 -4
- package/lumar/api/server/index.js +0 -4
- package/lumar/api/server/initClient.d.ts +0 -6
- package/lumar/api/server/initClient.js +0 -22
- package/lumar/api/server/lumarApi.d.ts +0 -36
- package/lumar/api/server/lumarApi.js +0 -24
- package/lumar/graphql/server/columns.d.ts +0 -29
- package/lumar/graphql/server/columns.js +0 -28
- package/lumar/graphql/server/getData.d.ts +0 -1
- package/lumar/graphql/server/getData.js +0 -15
- package/lumar/graphql/server/index.d.ts +0 -11
- package/lumar/graphql/server/index.js +0 -11
- package/lumar/graphql/server/initClient.d.ts +0 -5
- package/lumar/graphql/server/initClient.js +0 -21
- package/lumar/graphql/server/lumarGraphql.d.ts +0 -27
- package/lumar/graphql/server/lumarGraphql.js +0 -27
- package/lumar/graphql/server/queries/crawl.d.ts +0 -5
- package/lumar/graphql/server/queries/crawl.js +0 -1
- package/lumar/graphql/server/queries/getCrawls.d.ts +0 -18
- package/lumar/graphql/server/queries/getCrawls.js +0 -31
- package/lumar/graphql/server/queries/getReportDifferences.d.ts +0 -24
- package/lumar/graphql/server/queries/getReportDifferences.js +0 -35
- package/lumar/graphql/server/queries/getRows.d.ts +0 -38
- package/lumar/graphql/server/queries/getRows.js +0 -55
- package/lumar/graphql/server/queries/getTotals.d.ts +0 -25
- package/lumar/graphql/server/queries/getTotals.js +0 -38
- package/lumar/graphql/server/queries/row.d.ts +0 -157
- package/lumar/graphql/server/queries/row.js +0 -1
- package/lumar/graphql/server/reportTemplates.d.ts +0 -68
- package/lumar/graphql/server/reportTemplates.js +0 -67
- package/myTarget/server/index.d.ts +0 -1
- package/myTarget/server/index.js +0 -1
- package/myTarget/server/myTarget.d.ts +0 -5
- package/myTarget/server/myTarget.js +0 -13
- package/nextAuth/index.d.ts +0 -2
- package/nextAuth/index.js +0 -2
- package/nextAuth/isSessionReady.d.ts +0 -1
- package/nextAuth/isSessionReady.js +0 -3
- package/nextAuth/nextAuth.d.ts +0 -7
- package/nextAuth/nextAuth.js +0 -6
- package/nextJs/client/LazyLoad.d.ts +0 -8
- package/nextJs/client/LazyLoad.js +0 -7
- package/nextJs/client/index.d.ts +0 -1
- package/nextJs/client/index.js +0 -1
- package/nextJs/index.d.ts +0 -1
- package/nextJs/index.js +0 -1
- package/nextJs/nextJs.d.ts +0 -12
- package/nextJs/nextJs.js +0 -8
- package/number/format.d.ts +0 -12
- package/number/format.js +0 -16
- package/number/formatCurrency.d.ts +0 -5
- package/number/formatCurrency.js +0 -17
- package/number/getDecimal.d.ts +0 -4
- package/number/getDecimal.js +0 -8
- package/number/getNumber.d.ts +0 -4
- package/number/getNumber.js +0 -44
- package/number/getPercent.d.ts +0 -1
- package/number/getPercent.js +0 -11
- package/number/getPercentIncrease.d.ts +0 -4
- package/number/getPercentIncrease.js +0 -12
- package/number/getSafeDivide.d.ts +0 -11
- package/number/getSafeDivide.js +0 -16
- package/number/index.d.ts +0 -7
- package/number/index.js +0 -7
- package/object/index.d.ts +0 -1
- package/object/index.js +0 -1
- package/object/replaceKeys.js +0 -21
- package/onePassword/server/OnePasswordNamespace.d.ts +0 -12
- package/onePassword/server/OnePasswordNamespace.js +0 -39
- package/onePassword/server/index.d.ts +0 -2
- package/onePassword/server/index.js +0 -2
- package/onePassword/server/onePassword.d.ts +0 -8
- package/onePassword/server/onePassword.js +0 -21
- package/openAi/server/OpenAiNamespace.d.ts +0 -11
- package/openAi/server/OpenAiNamespace.js +0 -35
- package/openAi/server/index.d.ts +0 -2
- package/openAi/server/index.js +0 -2
- package/openAi/server/openAi.d.ts +0 -6
- package/openAi/server/openAi.js +0 -26
- package/prisma/getDecimal.d.ts +0 -4
- package/prisma/getDecimal.js +0 -16
- package/prisma/index.d.ts +0 -1
- package/prisma/index.js +0 -1
- package/prisma/server/PrismaNamespace.d.ts +0 -7
- package/prisma/server/PrismaNamespace.js +0 -62
- package/prisma/server/index.d.ts +0 -2
- package/prisma/server/index.js +0 -2
- package/prisma/server/prisma.d.ts +0 -20
- package/prisma/server/prisma.js +0 -26
- package/snapchat/server/SnapchatNamespace.d.ts +0 -15
- package/snapchat/server/SnapchatNamespace.js +0 -22
- package/snapchat/server/index.d.ts +0 -2
- package/snapchat/server/index.js +0 -2
- package/snapchat/server/snapchat.d.ts +0 -7
- package/snapchat/server/snapchat.js +0 -26
- package/sorting/byNumberAscending.d.ts +0 -4
- package/sorting/byNumberAscending.js +0 -15
- package/sorting/byNumberDescending.d.ts +0 -4
- package/sorting/byNumberDescending.js +0 -18
- package/sorting/byStringAscending.d.ts +0 -4
- package/sorting/byStringAscending.js +0 -12
- package/sorting/byStringDescending.d.ts +0 -4
- package/sorting/byStringDescending.js +0 -12
- package/sorting/index.d.ts +0 -1
- package/sorting/index.js +0 -1
- package/sorting/sorting.d.ts +0 -4
- package/sorting/sorting.js +0 -4
- package/stream/server/index.d.ts +0 -1
- package/stream/server/index.js +0 -1
- package/stream/server/sort.d.ts +0 -13
- package/stream/server/sort.js +0 -47
- package/string/getCapitalised.d.ts +0 -5
- package/string/getCapitalised.js +0 -21
- package/string/getClean.d.ts +0 -18
- package/string/getClean.js +0 -47
- package/string/getFolder.d.ts +0 -4
- package/string/getFolder.js +0 -8
- package/string/getProperCase.d.ts +0 -11
- package/string/getProperCase.js +0 -43
- package/string/getString.d.ts +0 -4
- package/string/getString.js +0 -27
- package/string/getStringFromStream.d.ts +0 -5
- package/string/getStringFromStream.js +0 -13
- package/string/getUnescaped.d.ts +0 -6
- package/string/getUnescaped.js +0 -19
- package/string/getWithoutAccents.d.ts +0 -5
- package/string/getWithoutAccents.js +0 -9
- package/string/getWithoutHtmlTags.d.ts +0 -5
- package/string/getWithoutHtmlTags.js +0 -8
- package/string/getWithoutPunctuation.d.ts +0 -5
- package/string/getWithoutPunctuation.js +0 -9
- package/string/getWithoutUnderscores.d.ts +0 -4
- package/string/getWithoutUnderscores.js +0 -7
- package/string/getWithoutWhitespaces.d.ts +0 -5
- package/string/getWithoutWhitespaces.js +0 -9
- package/string/index.d.ts +0 -13
- package/string/index.js +0 -13
- package/string/reservedWords.d.ts +0 -5
- package/string/reservedWords.js +0 -22
- package/swr/client/index.d.ts +0 -1
- package/swr/client/index.js +0 -1
- package/swr/client/swr.d.ts +0 -42
- package/swr/client/swr.js +0 -50
- package/upTimeRobot/server/UpTimeRobotNamespace.d.ts +0 -31
- package/upTimeRobot/server/UpTimeRobotNamespace.js +0 -40
- package/upTimeRobot/server/index.d.ts +0 -2
- package/upTimeRobot/server/index.js +0 -2
- package/upTimeRobot/server/upTimeRobot.d.ts +0 -38
- package/upTimeRobot/server/upTimeRobot.js +0 -59
- package/url/index.d.ts +0 -1
- package/url/index.js +0 -1
- package/url/server/index.d.ts +0 -1
- package/url/server/index.js +0 -1
- package/url/server/writeUrlContents.d.ts +0 -6
- package/url/server/writeUrlContents.js +0 -35
- package/url/url.d.ts +0 -26
- package/url/url.js +0 -59
- package/util/defaultTo.d.ts +0 -4
- package/util/defaultTo.js +0 -37
- package/util/getClean.d.ts +0 -11
- package/util/getClean.js +0 -19
- package/util/getError.d.ts +0 -1
- package/util/getError.js +0 -10
- package/util/getWithoutHash.d.ts +0 -4
- package/util/getWithoutHash.js +0 -14
- package/util/getWithoutParameter.d.ts +0 -4
- package/util/getWithoutParameter.js +0 -14
- package/util/index.d.ts +0 -7
- package/util/index.js +0 -7
- package/util/isUndefined.d.ts +0 -4
- package/util/isUndefined.js +0 -9
- package/util/promiseChunks.d.ts +0 -5
- package/util/promiseChunks.js +0 -21
- package/util/server/getBrotliCompressed.d.ts +0 -5
- package/util/server/getBrotliCompressed.js +0 -16
- package/util/server/getBrotliDecompressed.d.ts +0 -5
- package/util/server/getBrotliDecompressed.js +0 -17
- package/util/server/getGzipCompressed.d.ts +0 -5
- package/util/server/getGzipCompressed.js +0 -16
- package/util/server/getGzipDecompressed.d.ts +0 -5
- package/util/server/getGzipDecompressed.js +0 -17
- package/util/server/index.d.ts +0 -4
- package/util/server/index.js +0 -4
- package/util/sleep.d.ts +0 -1
- package/util/sleep.js +0 -3
- package/webWorker/index.d.ts +0 -1
- package/webWorker/index.js +0 -1
- package/webWorker/webWorker.d.ts +0 -8
- package/webWorker/webWorker.js +0 -7
- package/xml/server/getXml.d.ts +0 -1
- package/xml/server/getXml.js +0 -14
- package/xml/server/index.d.ts +0 -1
- package/xml/server/index.js +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { n as BaseClass, t as BaseNamespace } from "../../../index-CFaAdPAh.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-B4K9Z1U-.mjs";
|
|
3
|
+
import { SESClient, SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
|
|
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<any>;
|
|
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;
|
|
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;
|
|
80
|
+
};
|
|
81
|
+
Text: {
|
|
82
|
+
Charset: string;
|
|
83
|
+
Data: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
Subject: {
|
|
87
|
+
Charset: string;
|
|
88
|
+
Data: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
Source: string;
|
|
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
|
|
105
|
+
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { BaseClass, BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
|
+
import uniq from "lodash/uniq";
|
|
4
|
+
|
|
5
|
+
//#region src/aws/ses/server/AwsSesNamespace.ts
|
|
6
|
+
var AwsSesNamespace = class extends BaseNamespace {
|
|
7
|
+
ensureInit = async () => {
|
|
8
|
+
if (!this.client) try {
|
|
9
|
+
const { SESClient } = await import("@aws-sdk/client-ses");
|
|
10
|
+
this.client = new SESClient(this.config);
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw new Error("AWS SES Client not installed");
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
send = async (input) => {
|
|
16
|
+
await this.ensureInit();
|
|
17
|
+
let response;
|
|
18
|
+
if (input?.Message?.Body?.Html?.Data) try {
|
|
19
|
+
const { SendEmailCommand } = await import("@aws-sdk/client-ses");
|
|
20
|
+
const command = new SendEmailCommand(input);
|
|
21
|
+
response = await this.client.send(command);
|
|
22
|
+
} catch (exception) {
|
|
23
|
+
response = exception;
|
|
24
|
+
}
|
|
25
|
+
else try {
|
|
26
|
+
const { SendRawEmailCommand } = await import("@aws-sdk/client-ses");
|
|
27
|
+
const command = new SendRawEmailCommand(input);
|
|
28
|
+
response = await this.client.send(command);
|
|
29
|
+
} catch (exception) {
|
|
30
|
+
response = exception;
|
|
31
|
+
}
|
|
32
|
+
return response;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/aws/ses/server/SimpleEmail.ts
|
|
38
|
+
/**
|
|
39
|
+
* Class to build and send an AWS SES email.
|
|
40
|
+
*/
|
|
41
|
+
var SimpleEmail = class extends BaseClass {
|
|
42
|
+
from;
|
|
43
|
+
to = [];
|
|
44
|
+
cc = [];
|
|
45
|
+
bcc = [];
|
|
46
|
+
html;
|
|
47
|
+
subject;
|
|
48
|
+
attachments = [];
|
|
49
|
+
constructor({ bcc, cc, from, html, subject, to, attachments }) {
|
|
50
|
+
super();
|
|
51
|
+
if (bcc) this.setBcc(bcc);
|
|
52
|
+
if (cc) this.setCc(cc);
|
|
53
|
+
if (from) this.setFrom(from);
|
|
54
|
+
if (html) this.setHtml(html);
|
|
55
|
+
if (subject) this.setSubject(subject);
|
|
56
|
+
if (to) this.setTo(to);
|
|
57
|
+
if (attachments) this.setAttachments(attachments);
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
setFrom = (from) => {
|
|
61
|
+
return this._setValue("from", from);
|
|
62
|
+
};
|
|
63
|
+
setHtml = (html) => {
|
|
64
|
+
return this._setValue("html", html);
|
|
65
|
+
};
|
|
66
|
+
setSubject = (subject) => {
|
|
67
|
+
return this._setValue("subject", subject);
|
|
68
|
+
};
|
|
69
|
+
setAttachments = (attachments) => {
|
|
70
|
+
return this._setValue("attachments", attachments);
|
|
71
|
+
};
|
|
72
|
+
addAttachment = (attachment) => {
|
|
73
|
+
this.attachments.push(attachment);
|
|
74
|
+
return this;
|
|
75
|
+
};
|
|
76
|
+
addAttachmentFromdata = (filename, data, contentType) => {
|
|
77
|
+
return this.addAttachment({
|
|
78
|
+
filename,
|
|
79
|
+
data,
|
|
80
|
+
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
addAttachmentFromUrl = (filename, url, contentType) => {
|
|
84
|
+
return this.addAttachment({
|
|
85
|
+
filename,
|
|
86
|
+
url,
|
|
87
|
+
contentType: contentType || this._getContentTypeFromFilename(filename)
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
clearAttachments = () => {
|
|
91
|
+
this.attachments = [];
|
|
92
|
+
return this;
|
|
93
|
+
};
|
|
94
|
+
pushBcc = (recipient) => {
|
|
95
|
+
return this._push("bcc", recipient);
|
|
96
|
+
};
|
|
97
|
+
pushCc = (recipient) => {
|
|
98
|
+
return this._push("cc", recipient);
|
|
99
|
+
};
|
|
100
|
+
pushTo = (recipient) => {
|
|
101
|
+
return this._push("to", recipient);
|
|
102
|
+
};
|
|
103
|
+
setBcc = (recipient) => {
|
|
104
|
+
return this._setArray("bcc", recipient);
|
|
105
|
+
};
|
|
106
|
+
setCc = (recipient) => {
|
|
107
|
+
return this._setArray("cc", recipient);
|
|
108
|
+
};
|
|
109
|
+
setTo = (recipient) => {
|
|
110
|
+
return this._setArray("to", recipient);
|
|
111
|
+
};
|
|
112
|
+
getSendParam = async () => {
|
|
113
|
+
if (this.attachments.length > 0) return await this._getRawEmailParams();
|
|
114
|
+
return {
|
|
115
|
+
Destination: {
|
|
116
|
+
BccAddresses: this._filterRecipients("bcc"),
|
|
117
|
+
CcAddresses: this._filterRecipients("cc"),
|
|
118
|
+
ToAddresses: this._filterRecipients("to")
|
|
119
|
+
},
|
|
120
|
+
Message: {
|
|
121
|
+
Body: {
|
|
122
|
+
Html: {
|
|
123
|
+
Charset: "UTF-8",
|
|
124
|
+
Data: this.html
|
|
125
|
+
},
|
|
126
|
+
Text: {
|
|
127
|
+
Charset: "UTF-8",
|
|
128
|
+
Data: this.html
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
Subject: {
|
|
132
|
+
Charset: "UTF-8",
|
|
133
|
+
Data: this.subject
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
Source: this.from
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
_getRawEmailParams = async () => {
|
|
140
|
+
const boundary = `----=_NextPart_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
141
|
+
const allRecipients = [
|
|
142
|
+
...this._filterRecipients("to"),
|
|
143
|
+
...this._filterRecipients("cc"),
|
|
144
|
+
...this._filterRecipients("bcc")
|
|
145
|
+
];
|
|
146
|
+
let rawMessage = "";
|
|
147
|
+
rawMessage += `From: ${this.from}\r\n`;
|
|
148
|
+
if (this._filterRecipients("to").length > 0) rawMessage += `To: ${this._filterRecipients("to").join(", ")}\r\n`;
|
|
149
|
+
if (this._filterRecipients("cc").length > 0) rawMessage += `Cc: ${this._filterRecipients("cc").join(", ")}\r\n`;
|
|
150
|
+
rawMessage += `Subject: ${this.subject}\r\n`;
|
|
151
|
+
rawMessage += `MIME-Version: 1.0\r\n`;
|
|
152
|
+
rawMessage += `Content-Type: multipart/mixed; boundary="${boundary}"\r\n\r\n`;
|
|
153
|
+
rawMessage += `--${boundary}\r\n`;
|
|
154
|
+
rawMessage += `Content-Type: text/html; charset=UTF-8\r\n`;
|
|
155
|
+
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
156
|
+
rawMessage += `${this.html}\r\n\r\n`;
|
|
157
|
+
for (const attachment of this.attachments) {
|
|
158
|
+
const isTextFile = this._isTextFile(attachment.contentType || this._getContentTypeFromFilename(attachment.filename));
|
|
159
|
+
rawMessage += `--${boundary}\r\n`;
|
|
160
|
+
rawMessage += `Content-Type: ${attachment.contentType || "application/octet-stream"}\r\n`;
|
|
161
|
+
rawMessage += `Content-Disposition: attachment; filename="${attachment.filename}"\r\n`;
|
|
162
|
+
if (isTextFile) {
|
|
163
|
+
rawMessage += `Content-Transfer-Encoding: 7bit\r\n\r\n`;
|
|
164
|
+
const textData = await this._getAttachmentTextData(attachment);
|
|
165
|
+
rawMessage += `${textData}\r\n\r\n`;
|
|
166
|
+
} else {
|
|
167
|
+
rawMessage += `Content-Transfer-Encoding: base64\r\n\r\n`;
|
|
168
|
+
const attachmentData = await this._getAttachmentData(attachment);
|
|
169
|
+
rawMessage += `${attachmentData}\r\n\r\n`;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
rawMessage += `--${boundary}--\r\n`;
|
|
173
|
+
return {
|
|
174
|
+
Destinations: allRecipients,
|
|
175
|
+
RawMessage: { Data: rawMessage },
|
|
176
|
+
Source: this.from
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
_isTextFile = (contentType) => {
|
|
180
|
+
return [
|
|
181
|
+
"text/csv",
|
|
182
|
+
"text/plain",
|
|
183
|
+
"text/html",
|
|
184
|
+
"application/json",
|
|
185
|
+
"application/xml",
|
|
186
|
+
"text/xml"
|
|
187
|
+
].some((type) => contentType.startsWith(type));
|
|
188
|
+
};
|
|
189
|
+
_getAttachmentTextData = async (attachment) => {
|
|
190
|
+
if (attachment.data) {
|
|
191
|
+
const base64Data = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
192
|
+
if (this._isBase64(base64Data)) return Buffer.from(base64Data, "base64").toString("utf-8");
|
|
193
|
+
return attachment.data;
|
|
194
|
+
}
|
|
195
|
+
if (attachment.url) return await (await (await import("../../../src-BeXFXTgz.mjs").then((mod) => mod.default))(attachment.url)).text();
|
|
196
|
+
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
197
|
+
};
|
|
198
|
+
_getAttachmentData = async (attachment) => {
|
|
199
|
+
if (attachment.data) {
|
|
200
|
+
const cleanData = attachment.data.replace(/^data:[^;]+;base64,/, "");
|
|
201
|
+
if (this._isBase64(cleanData)) return cleanData;
|
|
202
|
+
return Buffer.from(attachment.data, "utf-8").toString("base64");
|
|
203
|
+
}
|
|
204
|
+
if (attachment.url) return (await (await (await import("../../../src-BeXFXTgz.mjs").then((mod) => mod.default))(attachment.url)).buffer()).toString("base64");
|
|
205
|
+
throw new Error(`No valid data source provided for attachment: ${attachment.filename}`);
|
|
206
|
+
};
|
|
207
|
+
_isBase64 = (str) => {
|
|
208
|
+
try {
|
|
209
|
+
return Buffer.from(str, "base64").toString("base64") === str;
|
|
210
|
+
} catch {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
_getContentTypeFromFilename = (filename) => {
|
|
215
|
+
const extension = filename.split(".").pop()?.toLowerCase();
|
|
216
|
+
return {
|
|
217
|
+
"jpg": "image/jpeg",
|
|
218
|
+
"jpeg": "image/jpeg",
|
|
219
|
+
"png": "image/png",
|
|
220
|
+
"gif": "image/gif",
|
|
221
|
+
"svg": "image/svg+xml",
|
|
222
|
+
"webp": "image/webp",
|
|
223
|
+
"bmp": "image/bmp",
|
|
224
|
+
"ico": "image/x-icon",
|
|
225
|
+
"pdf": "application/pdf",
|
|
226
|
+
"doc": "application/msword",
|
|
227
|
+
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
228
|
+
"xls": "application/vnd.ms-excel",
|
|
229
|
+
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
230
|
+
"ppt": "application/vnd.ms-powerpoint",
|
|
231
|
+
"pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
232
|
+
"csv": "text/csv",
|
|
233
|
+
"tsv": "text/tab-separated-values",
|
|
234
|
+
"json": "application/json",
|
|
235
|
+
"xml": "application/xml",
|
|
236
|
+
"txt": "text/plain",
|
|
237
|
+
"zip": "application/zip",
|
|
238
|
+
"rar": "application/x-rar-compressed",
|
|
239
|
+
"7z": "application/x-7z-compressed",
|
|
240
|
+
"tar": "application/x-tar",
|
|
241
|
+
"gz": "application/gzip",
|
|
242
|
+
"mp3": "audio/mpeg",
|
|
243
|
+
"wav": "audio/wav",
|
|
244
|
+
"mp4": "video/mp4",
|
|
245
|
+
"avi": "video/x-msvideo",
|
|
246
|
+
"mov": "video/quicktime"
|
|
247
|
+
}[extension || ""] || "application/octet-stream";
|
|
248
|
+
};
|
|
249
|
+
_filterRecipients = (field) => {
|
|
250
|
+
let response = this[field].filter((recipient) => recipient && null !== recipient);
|
|
251
|
+
response = response.map((recipient) => recipient.toLowerCase().trim());
|
|
252
|
+
response = response.filter((recipient) => "" !== recipient);
|
|
253
|
+
response = uniq(response);
|
|
254
|
+
return response;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/aws/ses/server/awsSes.ts
|
|
260
|
+
const awsSesNamespaces = /* @__PURE__ */ new Map();
|
|
261
|
+
const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
262
|
+
if (awsSesNamespaces.has(key)) return awsSesNamespaces.get(key);
|
|
263
|
+
const namespace = new AwsSesNamespace(key, await getConfig(key, config, vaultId, itemId));
|
|
264
|
+
awsSesNamespaces.set(key, namespace);
|
|
265
|
+
return namespace;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
//#endregion
|
|
269
|
+
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-CFaAdPAh.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-B4K9Z1U-.mjs";
|
|
3
|
+
import * as _aws_sdk_client_sqs0 from "@aws-sdk/client-sqs";
|
|
4
|
+
import { SQSClient } from "@aws-sdk/client-sqs";
|
|
5
|
+
|
|
6
|
+
//#region src/aws/sqs/server/AwsSqsNamespace.d.ts
|
|
7
|
+
type SqsEventRecord = {
|
|
8
|
+
messageId: string;
|
|
9
|
+
receiptHandle: string;
|
|
10
|
+
body: any;
|
|
11
|
+
attributes: object;
|
|
12
|
+
messageAttributes: object;
|
|
13
|
+
md5OfMessageAttributes: string;
|
|
14
|
+
md5OfBody: string;
|
|
15
|
+
eventSource: string;
|
|
16
|
+
eventSourceARN: string;
|
|
17
|
+
awsRegion: string;
|
|
18
|
+
};
|
|
19
|
+
type SqsEvent = {
|
|
20
|
+
Records: SqsEventRecord[];
|
|
21
|
+
};
|
|
22
|
+
type AddToQueue = {
|
|
23
|
+
data: any;
|
|
24
|
+
dedupeId: string;
|
|
25
|
+
groupId?: string;
|
|
26
|
+
queueId?: string;
|
|
27
|
+
queueUrl: string;
|
|
28
|
+
};
|
|
29
|
+
declare class AwsSqsNamespace extends BaseNamespace {
|
|
30
|
+
client: SQSClient;
|
|
31
|
+
config: AwsConfig;
|
|
32
|
+
ensureInit: () => Promise<void>;
|
|
33
|
+
addToQueue: (props: AddToQueue) => Promise<_aws_sdk_client_sqs0.SendMessageCommandOutput>;
|
|
34
|
+
deleteFromQueue: (queueUrl: string, recipientHandle: string) => Promise<_aws_sdk_client_sqs0.DeleteMessageCommandOutput>;
|
|
35
|
+
isEventSqs: (event: SqsEvent) => Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/aws/sqs/server/awsSqs.d.ts
|
|
39
|
+
declare const awsSqsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSqsNamespace>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AwsSqsNamespace, awsSqsClient };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/aws/sqs/server/AwsSqsNamespace.ts
|
|
5
|
+
var AwsSqsNamespace = class extends BaseNamespace {
|
|
6
|
+
ensureInit = async () => {
|
|
7
|
+
if (!this.client) try {
|
|
8
|
+
const { SQSClient } = await import("@aws-sdk/client-sqs");
|
|
9
|
+
this.client = new SQSClient(this.config);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw new Error("AWS SQS Client not installed");
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
addToQueue = async (props) => {
|
|
15
|
+
await this.ensureInit();
|
|
16
|
+
const { SendMessageCommand } = await import("@aws-sdk/client-sqs");
|
|
17
|
+
let params = {
|
|
18
|
+
MessageBody: JSON.stringify({
|
|
19
|
+
queueId: props.queueId,
|
|
20
|
+
data: props.data
|
|
21
|
+
}),
|
|
22
|
+
QueueUrl: props.queueUrl
|
|
23
|
+
};
|
|
24
|
+
if (void 0 !== props?.dedupeId) params["MessageDeduplicationId"] = props.dedupeId;
|
|
25
|
+
if (void 0 !== props?.groupId) params["MessageGroupId"] = props.dedupeId;
|
|
26
|
+
return await this.client.send(new SendMessageCommand(params));
|
|
27
|
+
};
|
|
28
|
+
deleteFromQueue = async (queueUrl, recipientHandle) => {
|
|
29
|
+
await this.ensureInit();
|
|
30
|
+
const { DeleteMessageCommand } = await import("@aws-sdk/client-sqs");
|
|
31
|
+
const params = {
|
|
32
|
+
QueueUrl: queueUrl,
|
|
33
|
+
ReceiptHandle: recipientHandle
|
|
34
|
+
};
|
|
35
|
+
return await this.client.send(new DeleteMessageCommand(params));
|
|
36
|
+
};
|
|
37
|
+
isEventSqs = async (event) => {
|
|
38
|
+
await this.ensureInit();
|
|
39
|
+
let response = false;
|
|
40
|
+
if (void 0 !== event["Records"]) for (let i = 0; i < event["Records"].length; i++);
|
|
41
|
+
return response;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/aws/sqs/server/awsSqs.ts
|
|
47
|
+
const awsSqsNamespaces = /* @__PURE__ */ new Map();
|
|
48
|
+
const awsSqsClient = async (key = "default", config, vaultId, itemId) => {
|
|
49
|
+
if (awsSqsNamespaces.has(key)) return awsSqsNamespaces.get(key);
|
|
50
|
+
const namespace = new AwsSqsNamespace(key, await getConfig(key, config, vaultId, itemId));
|
|
51
|
+
awsSqsNamespaces.set(key, namespace);
|
|
52
|
+
return namespace;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { AwsSqsNamespace, awsSqsClient };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-CFaAdPAh.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-B4K9Z1U-.mjs";
|
|
3
|
+
import { SSMClient } from "@aws-sdk/client-ssm";
|
|
4
|
+
|
|
5
|
+
//#region src/aws/ssm/server/AwsSsmNamespace.d.ts
|
|
6
|
+
declare class AwsSsmNamespace extends BaseNamespace {
|
|
7
|
+
client: SSMClient;
|
|
8
|
+
config: AwsConfig;
|
|
9
|
+
parameters: Map<string, any>;
|
|
10
|
+
constructor(key: string, config: any);
|
|
11
|
+
ensureInit: () => Promise<void>;
|
|
12
|
+
getParameter: (name: string, withDecryption?: boolean, isJson?: boolean) => Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/aws/ssm/server/awsSsm.d.ts
|
|
16
|
+
declare const awsSsmClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSsmNamespace>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { AwsSsmNamespace, awsSsmClient };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/aws/ssm/server/AwsSsmNamespace.ts
|
|
5
|
+
var AwsSsmNamespace = class extends BaseNamespace {
|
|
6
|
+
parameters;
|
|
7
|
+
constructor(key, config) {
|
|
8
|
+
super(key, config);
|
|
9
|
+
this.parameters = /* @__PURE__ */ new Map();
|
|
10
|
+
}
|
|
11
|
+
ensureInit = async () => {
|
|
12
|
+
if (!this.client) try {
|
|
13
|
+
const { SSMClient } = await import("@aws-sdk/client-ssm");
|
|
14
|
+
this.client = new SSMClient(this.config);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
throw new Error("AWS SSM Client not installed");
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
getParameter = async (name, withDecryption = false, isJson = true) => {
|
|
20
|
+
await this.ensureInit();
|
|
21
|
+
if (!this.parameters.has(name)) {
|
|
22
|
+
const { GetParameterCommand } = await import("@aws-sdk/client-ssm");
|
|
23
|
+
const apiResponse = await this.client.send(new GetParameterCommand({
|
|
24
|
+
Name: name,
|
|
25
|
+
WithDecryption: void 0 === withDecryption ? true : withDecryption
|
|
26
|
+
}));
|
|
27
|
+
if (apiResponse.Parameter.Value) if (void 0 === apiResponse.Parameter.Value) this.parameters.set(name, null);
|
|
28
|
+
else if (void 0 === isJson || true === isJson) this.parameters.set(name, JSON.parse(apiResponse.Parameter.Value) || null);
|
|
29
|
+
else this.parameters.set(name, apiResponse.Parameter.Value);
|
|
30
|
+
else this.parameters.set(name, null);
|
|
31
|
+
}
|
|
32
|
+
return this.parameters.get(name);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/aws/ssm/server/awsSsm.ts
|
|
38
|
+
const awsSsmNamespaces = /* @__PURE__ */ new Map();
|
|
39
|
+
const awsSsmClient = async (key = "default", config, vaultId, itemId) => {
|
|
40
|
+
if (awsSsmNamespaces.has(key)) return awsSsmNamespaces.get(key);
|
|
41
|
+
const namespace = new AwsSsmNamespace(key, await getConfig(key, config, vaultId, itemId));
|
|
42
|
+
awsSsmNamespaces.set(key, namespace);
|
|
43
|
+
return namespace;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { AwsSsmNamespace, awsSsmClient };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { f as ApiResponseClass } from "../index-B20FTOvk.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/axios/deleteRequest.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Make a DELETE request.
|
|
6
|
+
* Can't use the function name delete as it's reserved
|
|
7
|
+
*/
|
|
8
|
+
declare const deleteRequest: (url: string, config?: {}) => Promise<ApiResponseClass>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/axios/get.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Make a GET request.
|
|
13
|
+
*/
|
|
14
|
+
declare const get: (url: string, config?: {}) => Promise<ApiResponseClass>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/axios/post.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Make a POST request.
|
|
19
|
+
*/
|
|
20
|
+
declare const post: (url: string, data?: {}, config?: {}) => Promise<ApiResponseClass>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { deleteRequest, get, post };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { u as ApiResponseClass } from "../api-DGKJDAfb.mjs";
|
|
2
|
+
import get$1 from "axios";
|
|
3
|
+
|
|
4
|
+
//#region src/axios/deleteRequest.ts
|
|
5
|
+
/**
|
|
6
|
+
* Make a DELETE request.
|
|
7
|
+
* Can't use the function name delete as it's reserved
|
|
8
|
+
*/
|
|
9
|
+
const deleteRequest = async (url, config = {}) => {
|
|
10
|
+
return await get$1.delete(url, config).then(async (response) => {
|
|
11
|
+
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
12
|
+
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
13
|
+
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
14
|
+
}).catch((error) => {
|
|
15
|
+
return new ApiResponseClass().setToError(null, error.message);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/axios/get.ts
|
|
21
|
+
/**
|
|
22
|
+
* Make a GET request.
|
|
23
|
+
*/
|
|
24
|
+
const get = async (url, config = {}) => {
|
|
25
|
+
return await get$1.get(url, config).then(async (response) => {
|
|
26
|
+
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
27
|
+
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
28
|
+
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
29
|
+
}).catch((error) => {
|
|
30
|
+
return new ApiResponseClass().setToError(null, error.message);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/axios/post.ts
|
|
36
|
+
/**
|
|
37
|
+
* Make a POST request.
|
|
38
|
+
*/
|
|
39
|
+
const post = async (url, data = {}, config = {}) => {
|
|
40
|
+
return await get$1.post(url, data, config).then(async (response) => {
|
|
41
|
+
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
42
|
+
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
43
|
+
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
44
|
+
}).catch((error) => {
|
|
45
|
+
return new ApiResponseClass().setToError(null, error.message);
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { deleteRequest, get, post };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import isBoolean from "lodash/isBoolean";
|
|
2
|
+
|
|
3
|
+
//#region src/boolean/boolean.ts
|
|
4
|
+
/**
|
|
5
|
+
* Convert an input from a variety of forms into boolean.
|
|
6
|
+
*/
|
|
7
|
+
const getBoolean = (input, defaultValue = false) => {
|
|
8
|
+
if (isBoolean(input)) return input;
|
|
9
|
+
else if ("string" === typeof input) return "true" === input || "1" === input || "yes" === input || "y" === input;
|
|
10
|
+
else if ("number" === typeof input) return 1 === input;
|
|
11
|
+
return defaultValue;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getBoolean };
|