@8ms/helpers 2.3.4 → 2.3.6
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/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 +70 -1066
- package/tsdown.config.ts +10 -0
- package/.github/generate-exports.js +0 -69
- 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,93 @@
|
|
|
1
|
+
import { f as ApiResponseClass } from "../../../index-B20FTOvk.mjs";
|
|
2
|
+
import { t as Auth } from "../../../index-sfVt7tI_.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/brightData/serpApi/server/brightDataSerpApi.d.ts
|
|
5
|
+
declare const brightDataSerpApiType: {
|
|
6
|
+
readonly GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS";
|
|
7
|
+
readonly GOOGLE_HOTELS: "GOOGLE_HOTELS";
|
|
8
|
+
readonly GOOGLE_LENS: "GOOGLE_LENS";
|
|
9
|
+
readonly GOOGLE_MAPS: "GOOGLE_MAPS";
|
|
10
|
+
readonly GOOGLE_REVIEWS: "GOOGLE_REVIEWS";
|
|
11
|
+
readonly GOOGLE_SEARCH: "GOOGLE_SEARCH";
|
|
12
|
+
readonly GOOGLE_TRENDS: "GOOGLE_TRENDS";
|
|
13
|
+
};
|
|
14
|
+
type BrightDataSerpApiType = typeof brightDataSerpApiType[keyof typeof brightDataSerpApiType];
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/brightData/serpApi/server/buildGoogleSerpUrl.d.ts
|
|
17
|
+
type BuildGoogleSerpUrl = {
|
|
18
|
+
country?: string;
|
|
19
|
+
device?: "mobile" | "android" | "androidTablet" | "iphone" | "ipad";
|
|
20
|
+
language?: string;
|
|
21
|
+
geoLocation?: string;
|
|
22
|
+
hotel?: {
|
|
23
|
+
dates?: string;
|
|
24
|
+
occupancy?: number;
|
|
25
|
+
};
|
|
26
|
+
pagination?: {
|
|
27
|
+
offset?: number;
|
|
28
|
+
perPage?: number;
|
|
29
|
+
};
|
|
30
|
+
searchType?: "images" | "jobs" | "news" | "shopping" | "video";
|
|
31
|
+
query: string;
|
|
32
|
+
googleDomain: string;
|
|
33
|
+
output?: "html" | "json";
|
|
34
|
+
returnType: "url" | "json";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Construct the Google SERP url using Bright Data's API:
|
|
38
|
+
* https://brightdata.com/cp/serp_api/api/google/search?id=c_2cef083f
|
|
39
|
+
*
|
|
40
|
+
* For geolocation use value from:
|
|
41
|
+
* https://developers.google.com/google-ads/api/data/geotargets
|
|
42
|
+
*/
|
|
43
|
+
declare const buildGoogleSerpUrl: (props: BuildGoogleSerpUrl) => string | {
|
|
44
|
+
query: {
|
|
45
|
+
q: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts
|
|
50
|
+
type BuildGoogleTrendsUrl = {
|
|
51
|
+
country?: string;
|
|
52
|
+
language?: string;
|
|
53
|
+
category?: string;
|
|
54
|
+
date?: string;
|
|
55
|
+
searchType?: "images" | "news" | "shopping" | "youtube";
|
|
56
|
+
query: string;
|
|
57
|
+
returnType: "url" | "json";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Construct the Google Trends url using Bright Data's API:
|
|
61
|
+
* https://brightdata.com/cp/serp_api/api/google/trends?id=c_2cef083f
|
|
62
|
+
*
|
|
63
|
+
* For category use value from:
|
|
64
|
+
* https://trends.google.com/trends/api/explore/pickers/category?lang=en-US&tz=240
|
|
65
|
+
*/
|
|
66
|
+
declare const buildGoogleTrendsUrl: (props: BuildGoogleTrendsUrl) => string | {
|
|
67
|
+
query: {
|
|
68
|
+
q: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/brightData/serpApi/server/getAsyncResults.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
75
|
+
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
76
|
+
*/
|
|
77
|
+
declare const getAsyncResults: (auth: Auth, requestId: string) => Promise<ApiResponseClass<any, any>>;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/brightData/serpApi/server/getAsyncRequestId.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Make an async request to the SERP API using the Bright Data proxy.
|
|
82
|
+
* Returns a request ID used with getAsyncResults
|
|
83
|
+
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
84
|
+
*/
|
|
85
|
+
declare const getAsyncRequestId: (auth: Auth, data: {}, type: BrightDataSerpApiType) => Promise<string>;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/brightData/serpApi/server/getRealtime.d.ts
|
|
88
|
+
/**
|
|
89
|
+
* Make a request to the SERP API using the Bright Data proxy
|
|
90
|
+
*/
|
|
91
|
+
declare const getRealtime: (auth: Auth, url: string) => Promise<{}>;
|
|
92
|
+
//#endregion
|
|
93
|
+
export { BrightDataSerpApiType, brightDataSerpApiType, buildGoogleSerpUrl, buildGoogleTrendsUrl, getAsyncRequestId, getAsyncResults, getRealtime };
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { u as ApiResponseClass } from "../../../api-DGKJDAfb.mjs";
|
|
2
|
+
import { get, post } from "../../../axios/index.mjs";
|
|
3
|
+
import { getCustomerId, getZone } from "../../server/index.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/brightData/serpApi/server/brightDataSerpApi.ts
|
|
6
|
+
const brightDataSerpApiType = {
|
|
7
|
+
GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS",
|
|
8
|
+
GOOGLE_HOTELS: "GOOGLE_HOTELS",
|
|
9
|
+
GOOGLE_LENS: "GOOGLE_LENS",
|
|
10
|
+
GOOGLE_MAPS: "GOOGLE_MAPS",
|
|
11
|
+
GOOGLE_REVIEWS: "GOOGLE_REVIEWS",
|
|
12
|
+
GOOGLE_SEARCH: "GOOGLE_SEARCH",
|
|
13
|
+
GOOGLE_TRENDS: "GOOGLE_TRENDS"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/brightData/serpApi/server/buildGoogleSerpUrl.ts
|
|
18
|
+
/**
|
|
19
|
+
* Construct the Google SERP url using Bright Data's API:
|
|
20
|
+
* https://brightdata.com/cp/serp_api/api/google/search?id=c_2cef083f
|
|
21
|
+
*
|
|
22
|
+
* For geolocation use value from:
|
|
23
|
+
* https://developers.google.com/google-ads/api/data/geotargets
|
|
24
|
+
*/
|
|
25
|
+
const buildGoogleSerpUrl = (props) => {
|
|
26
|
+
let url = new URL(`https://www.${props.googleDomain}/search`);
|
|
27
|
+
let params = { query: { q: props.query } };
|
|
28
|
+
url.searchParams.append("q", props.query);
|
|
29
|
+
if (props?.country) {
|
|
30
|
+
params.query["gl"] = props.country;
|
|
31
|
+
url.searchParams.append("gl", props.country);
|
|
32
|
+
}
|
|
33
|
+
switch (props?.device) {
|
|
34
|
+
case "mobile":
|
|
35
|
+
params.query["brd_mobile"] = "1";
|
|
36
|
+
url.searchParams.append("brd_mobile", "1");
|
|
37
|
+
break;
|
|
38
|
+
case "android":
|
|
39
|
+
params.query["brd_mobile"] = "android";
|
|
40
|
+
url.searchParams.append("brd_mobile", "android");
|
|
41
|
+
break;
|
|
42
|
+
case "androidTablet":
|
|
43
|
+
params.query["brd_mobile"] = "android_tablet";
|
|
44
|
+
url.searchParams.append("brd_mobile", "android_tablet");
|
|
45
|
+
break;
|
|
46
|
+
case "ipad":
|
|
47
|
+
params.query["brd_mobile"] = "ipad";
|
|
48
|
+
url.searchParams.append("brd_mobile", "ipad");
|
|
49
|
+
break;
|
|
50
|
+
case "iphone":
|
|
51
|
+
params.query["brd_mobile"] = "ios";
|
|
52
|
+
url.searchParams.append("brd_mobile", "ios");
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
if (props?.geoLocation) {
|
|
56
|
+
params.query["uule"] = props.geoLocation;
|
|
57
|
+
url.searchParams.append("uule", props.geoLocation);
|
|
58
|
+
}
|
|
59
|
+
if (props?.hotel) {
|
|
60
|
+
if (props.hotel?.dates) {
|
|
61
|
+
params.query["hotel_dates"] = props.hotel.dates.toString();
|
|
62
|
+
url.searchParams.append("hotel_dates", props.hotel.dates);
|
|
63
|
+
}
|
|
64
|
+
if (props.hotel?.occupancy) {
|
|
65
|
+
params.query["hotel_occupancy"] = props.hotel.occupancy.toString();
|
|
66
|
+
url.searchParams.append("hotel_occupancy", props.hotel.occupancy.toString());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (props?.language) {
|
|
70
|
+
params.query["uule"] = props.language;
|
|
71
|
+
url.searchParams.append("hl", props.language);
|
|
72
|
+
}
|
|
73
|
+
switch (props?.searchType) {
|
|
74
|
+
case "images":
|
|
75
|
+
params.query["tbm"] = "isch";
|
|
76
|
+
url.searchParams.append("tbm", "isch");
|
|
77
|
+
break;
|
|
78
|
+
case "jobs":
|
|
79
|
+
params.query["ibp"] = "htl;jobs";
|
|
80
|
+
url.searchParams.append("ibp", "htl;jobs");
|
|
81
|
+
break;
|
|
82
|
+
case "news":
|
|
83
|
+
params.query["tbm"] = "nws";
|
|
84
|
+
url.searchParams.append("tbm", "nws");
|
|
85
|
+
break;
|
|
86
|
+
case "shopping":
|
|
87
|
+
params.query["tbm"] = "shop";
|
|
88
|
+
url.searchParams.append("tbm", "shop");
|
|
89
|
+
break;
|
|
90
|
+
case "video":
|
|
91
|
+
params.query["tbm"] = "vid";
|
|
92
|
+
url.searchParams.append("tbm", "vid");
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
if (props?.pagination) {
|
|
96
|
+
if (props.pagination?.offset) {
|
|
97
|
+
params.query["start"] = props.pagination.offset.toString();
|
|
98
|
+
url.searchParams.append("start", props.pagination.offset.toString());
|
|
99
|
+
}
|
|
100
|
+
if (props.pagination?.perPage) {
|
|
101
|
+
params.query["num"] = props.pagination.offset.toString();
|
|
102
|
+
url.searchParams.append("num", props.pagination.perPage.toString());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if ("json" === props.output) {
|
|
106
|
+
params["brd_json"] = "1";
|
|
107
|
+
url.searchParams.append("brn_json", "1");
|
|
108
|
+
} else {
|
|
109
|
+
params["brd_json"] = "html";
|
|
110
|
+
url.searchParams.append("brn_json", "html");
|
|
111
|
+
}
|
|
112
|
+
if ("json" === props.returnType) return params;
|
|
113
|
+
return url.toString();
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/brightData/serpApi/server/buildGoogleTrendsUrl.ts
|
|
118
|
+
/**
|
|
119
|
+
* Construct the Google Trends url using Bright Data's API:
|
|
120
|
+
* https://brightdata.com/cp/serp_api/api/google/trends?id=c_2cef083f
|
|
121
|
+
*
|
|
122
|
+
* For category use value from:
|
|
123
|
+
* https://trends.google.com/trends/api/explore/pickers/category?lang=en-US&tz=240
|
|
124
|
+
*/
|
|
125
|
+
const buildGoogleTrendsUrl = (props) => {
|
|
126
|
+
let url = new URL(`http://trends.google.com/trends/explore`);
|
|
127
|
+
url.searchParams.append("q", props.query);
|
|
128
|
+
let params = { query: { q: props.query } };
|
|
129
|
+
if (props?.country) {
|
|
130
|
+
params.query["geo"] = props.country;
|
|
131
|
+
url.searchParams.append("geo", props.country);
|
|
132
|
+
}
|
|
133
|
+
if (props?.language) {
|
|
134
|
+
params.query["hl"] = props.language;
|
|
135
|
+
url.searchParams.append("hl", props.language);
|
|
136
|
+
}
|
|
137
|
+
if (props?.category) {
|
|
138
|
+
params.query["cat"] = props.category;
|
|
139
|
+
url.searchParams.append("cat", props.category);
|
|
140
|
+
}
|
|
141
|
+
if (props?.date) {
|
|
142
|
+
params.query["date"] = props.date;
|
|
143
|
+
url.searchParams.append("date", props.date);
|
|
144
|
+
}
|
|
145
|
+
switch (props?.searchType) {
|
|
146
|
+
case "images":
|
|
147
|
+
params.query["group"] = "images";
|
|
148
|
+
url.searchParams.append("gprop", "images");
|
|
149
|
+
break;
|
|
150
|
+
case "news":
|
|
151
|
+
params.query["group"] = "news";
|
|
152
|
+
url.searchParams.append("gprop", "news");
|
|
153
|
+
break;
|
|
154
|
+
case "shopping":
|
|
155
|
+
params.query["group"] = "froogle";
|
|
156
|
+
url.searchParams.append("gprop", "froogle");
|
|
157
|
+
break;
|
|
158
|
+
case "youtube":
|
|
159
|
+
params.query["group"] = "youtube";
|
|
160
|
+
url.searchParams.append("gprop", "youtube");
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
if ("json" === props.returnType) return params;
|
|
164
|
+
return url.toString();
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/brightData/serpApi/server/getAsyncResults.ts
|
|
169
|
+
/**
|
|
170
|
+
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
171
|
+
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
172
|
+
*/
|
|
173
|
+
const getAsyncResults = async (auth, requestId) => {
|
|
174
|
+
let response = new ApiResponseClass();
|
|
175
|
+
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
|
|
176
|
+
const requestResponse = await get(`https://api.brightdata.com/serp/get_result?customer=${getCustomerId(auth)}&zone=${getZone(auth)}&response_id=${requestId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
|
|
177
|
+
if (requestResponse.isSuccess()) if ("Request is pending" === requestResponse.getBody()) response.setToPending();
|
|
178
|
+
else response.setToSuccess(requestResponse.getBody());
|
|
179
|
+
else response.setToError(null, "Error in request");
|
|
180
|
+
return response;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/brightData/serpApi/server/getAsyncRequestId.ts
|
|
185
|
+
/**
|
|
186
|
+
* Make an async request to the SERP API using the Bright Data proxy.
|
|
187
|
+
* Returns a request ID used with getAsyncResults
|
|
188
|
+
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
189
|
+
*/
|
|
190
|
+
const getAsyncRequestId = async (auth, data = {}, type) => {
|
|
191
|
+
let url = "";
|
|
192
|
+
let response = "";
|
|
193
|
+
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
|
|
194
|
+
const customerId = getCustomerId(auth);
|
|
195
|
+
const zone = getZone(auth);
|
|
196
|
+
switch (type) {
|
|
197
|
+
case brightDataSerpApiType.GOOGLE_TRENDS:
|
|
198
|
+
url = `https://api.brightdata.com/serp/trends?customer=${customerId}&zone=${zone}`;
|
|
199
|
+
break;
|
|
200
|
+
default: url = `https://api.brightdata.com/serp/req?customer=${customerId}&zone=${zone}`;
|
|
201
|
+
}
|
|
202
|
+
const requestResponse = await post(url, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
|
|
203
|
+
if (requestResponse.isSuccess()) response = requestResponse.getBodyDefaultTo(["response_id"], "");
|
|
204
|
+
return response;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/brightData/serpApi/server/getRealtime.ts
|
|
209
|
+
/**
|
|
210
|
+
* Make a request to the SERP API using the Bright Data proxy
|
|
211
|
+
*/
|
|
212
|
+
const getRealtime = async (auth, url) => {
|
|
213
|
+
let response = {};
|
|
214
|
+
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
|
|
215
|
+
const apiResponse = await get(url, { proxy: {
|
|
216
|
+
protocol: "http",
|
|
217
|
+
host: auth.host,
|
|
218
|
+
port: auth.port,
|
|
219
|
+
auth: {
|
|
220
|
+
username: auth.username,
|
|
221
|
+
password: auth.password
|
|
222
|
+
}
|
|
223
|
+
} });
|
|
224
|
+
if (apiResponse.isSuccess()) response = apiResponse.getBody();
|
|
225
|
+
return response;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
//#endregion
|
|
229
|
+
export { brightDataSerpApiType, buildGoogleSerpUrl, buildGoogleTrendsUrl, getAsyncRequestId, getAsyncResults, getRealtime };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/brightData/server/brightData.ts
|
|
2
|
+
/**
|
|
3
|
+
* Return the Zone based on the username.
|
|
4
|
+
*/
|
|
5
|
+
const getZone = (auth) => {
|
|
6
|
+
const segments = auth.username.split("-");
|
|
7
|
+
return segments[segments.length - 1];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Return the customer Id based on the username.
|
|
11
|
+
*/
|
|
12
|
+
const getCustomerId = (auth, prefix) => {
|
|
13
|
+
const customerId = auth.username.split("-")[2][2].replace("hl_", "");
|
|
14
|
+
return (prefix || "") + customerId;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getCustomerId, getZone };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as Auth } from "../../../index-sfVt7tI_.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/brightData/webScraperIde/server/getBatch.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Depends on the Scraper setup!
|
|
6
|
+
*
|
|
7
|
+
* Make the request to trigger the scraper and let it do its job.
|
|
8
|
+
*/
|
|
9
|
+
declare const getBatch: (auth: Auth, scraperId: string, data?: {}, isDev?: boolean) => Promise<boolean>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/brightData/webScraperIde/server/getRealtime.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Depends on the Scraper setup!
|
|
14
|
+
*
|
|
15
|
+
* Make the request and pool the response until the data is available.
|
|
16
|
+
*/
|
|
17
|
+
declare const getRealtime: (auth: Auth, scraperId: string, data?: {}) => Promise<{}>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getBatch, getRealtime };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { sleep } from "../../../util/index.mjs";
|
|
2
|
+
import { s as apiState } from "../../../api-DGKJDAfb.mjs";
|
|
3
|
+
import { get, post } from "../../../axios/index.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/brightData/webScraperIde/server/getBatch.ts
|
|
6
|
+
/**
|
|
7
|
+
* Depends on the Scraper setup!
|
|
8
|
+
*
|
|
9
|
+
* Make the request to trigger the scraper and let it do its job.
|
|
10
|
+
*/
|
|
11
|
+
const getBatch = async (auth, scraperId, data = {}, isDev = false) => {
|
|
12
|
+
let response = false;
|
|
13
|
+
const requestUrl = new URL("https://api.brightdata.com/dca/trigger");
|
|
14
|
+
requestUrl.searchParams.append("collector", scraperId);
|
|
15
|
+
requestUrl.searchParams.append("queue_next", "1");
|
|
16
|
+
if (isDev) requestUrl.searchParams.append("version", "dev");
|
|
17
|
+
if ((await post(requestUrl.toString(), data, { headers: { Authorization: `Bearer ${auth.apiKey}` } })).isSuccess()) response = true;
|
|
18
|
+
return response;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/brightData/webScraperIde/server/getRealtime.ts
|
|
23
|
+
/**
|
|
24
|
+
* Depends on the Scraper setup!
|
|
25
|
+
*
|
|
26
|
+
* Make the request and pool the response until the data is available.
|
|
27
|
+
*/
|
|
28
|
+
const getRealtime = async (auth, scraperId, data = {}) => {
|
|
29
|
+
let response = {};
|
|
30
|
+
const requestResponse = await post(`https://api.brightdata.com/dca/trigger_immediate?collector=${scraperId}`, data, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
|
|
31
|
+
if (requestResponse.isSuccess()) {
|
|
32
|
+
const responseId = requestResponse.getBodyDefaultTo(["response_id"], "");
|
|
33
|
+
if ("" !== responseId) {
|
|
34
|
+
let state = apiState.PENDING;
|
|
35
|
+
while (apiState.PENDING === state) {
|
|
36
|
+
const resultResponse = await get(`https://api.brightdata.com/dca/get_result?response_id=${responseId}`, { headers: { Authorization: `Bearer ${auth.apiKey}` } });
|
|
37
|
+
if (resultResponse.isSuccess()) if (void 0 !== resultResponse.body.pending && true === resultResponse.body.pending) state = apiState.PENDING;
|
|
38
|
+
else {
|
|
39
|
+
state = apiState.SUCCESS;
|
|
40
|
+
response = resultResponse.getBody();
|
|
41
|
+
}
|
|
42
|
+
await sleep(1);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return response;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { getBatch, getRealtime };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/cache/server/cache.d.ts
|
|
2
|
+
type CacheEntry = {
|
|
3
|
+
data: any;
|
|
4
|
+
expires: number;
|
|
5
|
+
insertedAt: number;
|
|
6
|
+
};
|
|
7
|
+
declare const getCache: (key: string) => any;
|
|
8
|
+
declare const setCache: (key: string, data: any, expires?: number, force?: boolean) => any;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CacheEntry, getCache, setCache };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/cache/server/cache.ts
|
|
2
|
+
const cache = /* @__PURE__ */ new Map();
|
|
3
|
+
const getCache = (key) => {
|
|
4
|
+
let response = null;
|
|
5
|
+
if (cache.has(key)) {
|
|
6
|
+
const cacheItem = cache.get(key);
|
|
7
|
+
if (cacheItem.expires > 0) {
|
|
8
|
+
const expiresAt = Math.floor(cacheItem.insertedAt / 1e3) + cacheItem.expires;
|
|
9
|
+
if (Math.floor(Date.now() / 1e3) < expiresAt) response = cacheItem;
|
|
10
|
+
} else response = cacheItem;
|
|
11
|
+
}
|
|
12
|
+
return response;
|
|
13
|
+
};
|
|
14
|
+
const setCache = (key, data, expires = 0, force = false) => {
|
|
15
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
16
|
+
if (cache.has(key) && !force) {
|
|
17
|
+
const cacheItem = cache.get(key);
|
|
18
|
+
if (cacheItem.expires > 0) {
|
|
19
|
+
if (now < Math.floor(cacheItem.insertedAt / 1e3) + cacheItem.expires) return cacheItem;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
cache.set(key, {
|
|
23
|
+
data,
|
|
24
|
+
expires,
|
|
25
|
+
insertedAt: now
|
|
26
|
+
});
|
|
27
|
+
return data;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { getCache, setCache };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
+
key = keys[i];
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
16
|
+
__defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { __require as n, __toESM as r, __commonJSMin as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/crud/crud.d.ts
|
|
2
|
+
declare const crudState: {
|
|
3
|
+
readonly CREATE: "CREATE";
|
|
4
|
+
readonly READ: "READ";
|
|
5
|
+
readonly UPDATE: "UPDATE";
|
|
6
|
+
readonly DELETE: "DELETE";
|
|
7
|
+
};
|
|
8
|
+
type CrudState = typeof crudState[keyof typeof crudState];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CrudState, crudState };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/crypto/getDecrypt.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Decrypt an encoding string using a salt
|
|
4
|
+
* Library: crypto-js
|
|
5
|
+
*/
|
|
6
|
+
declare const getDecrypt: (appSalt: string, input: string, salt: string) => Promise<string>;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/crypto/getEncrypt.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Encrypt an encoding string using a salt
|
|
11
|
+
* Library: crypto-js
|
|
12
|
+
*/
|
|
13
|
+
declare const getEncrypt: (appSalt: string, input: string, salt: string) => Promise<string>;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/crypto/getRandom.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Create a random string and return a number of characters from it.
|
|
18
|
+
*/
|
|
19
|
+
declare const getRandom: (length: number) => string;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/crypto/getSha256.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* Encrypt a string using sha256
|
|
24
|
+
* Library: crypto-js
|
|
25
|
+
*/
|
|
26
|
+
declare const getSha256: (input: any) => Promise<string>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { getDecrypt, getEncrypt, getRandom, getSha256 };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getString } from "../string/index.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/crypto/getDecrypt.ts
|
|
4
|
+
/**
|
|
5
|
+
* Decrypt an encoding string using a salt
|
|
6
|
+
* Library: crypto-js
|
|
7
|
+
*/
|
|
8
|
+
const getDecrypt = async (appSalt, input, salt) => {
|
|
9
|
+
const { AES, enc } = await import("crypto-js");
|
|
10
|
+
const customSalt = `${appSalt}-${salt}`;
|
|
11
|
+
return AES.decrypt(input, customSalt).toString(enc.Utf8);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/crypto/getEncrypt.ts
|
|
16
|
+
/**
|
|
17
|
+
* Encrypt an encoding string using a salt
|
|
18
|
+
* Library: crypto-js
|
|
19
|
+
*/
|
|
20
|
+
const getEncrypt = async (appSalt, input, salt) => {
|
|
21
|
+
const { AES } = await import("crypto-js");
|
|
22
|
+
const customSalt = `${appSalt}-${salt}`;
|
|
23
|
+
return AES.encrypt(input, customSalt).toString();
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/crypto/getRandom.ts
|
|
28
|
+
/**
|
|
29
|
+
* Create a random string and return a number of characters from it.
|
|
30
|
+
*/
|
|
31
|
+
const getRandom = (length) => {
|
|
32
|
+
return Math.random().toString(36).substr(0, length);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/crypto/getSha256.ts
|
|
37
|
+
/**
|
|
38
|
+
* Encrypt a string using sha256
|
|
39
|
+
* Library: crypto-js
|
|
40
|
+
*/
|
|
41
|
+
const getSha256 = async (input) => {
|
|
42
|
+
const { SHA256 } = await import("crypto-js");
|
|
43
|
+
return SHA256(getString(input)).toString();
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getDecrypt, getEncrypt, getRandom, getSha256 };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as defaultDate, A as getMonday, B as isLastWeek, C as differenceInBusinessDays, D as getLuxonDate, E as getLastWeek, F as getTwoWeeksAgo, G as isThursday, H as isSaturday, I as getUnix, J as isWeekend, K as isTuesday, L as getWeeksAgo, M as getSunday, N as getThisWeek, O as getMax, P as getToday, Q as Timeframe, R as getYesterday, S as getFinancialYearWeeks, T as getDatesBetween, U as isSunday, V as isMonday, W as isThisWeek, X as InputDate, Y as FinancialWeek, Z as Month, _ as getYmdNumber, a as getFullDate, b as getFinancialYearToDate, c as getMonthYearString, d as getTodayYmdNumber, et as defaultDateNumber, f as getTodayYmdString, g as getYmdHisString, h as getYmdHisNumber, i as getDurationMinutes, j as getMonthsBetween, k as getMin, l as getTodayYmdHisNumber, m as getYearNumber, n as getDayNumber, nt as month, o as getFullDateTime, p as getYearMonthString, q as isWednesday, r as getDurationHours, s as getLuxonDateFromExcel, t as format, tt as defaultDateTime, u as getTodayYmdHisString, v as getYmdString, w as differenceInMinutes, x as getFinancialYearToYesterday, y as getFinancialYear, z as isFriday } from "../index-CMfxuwL1.mjs";
|
|
2
|
+
export { FinancialWeek, InputDate, Month, Timeframe, defaultDate, defaultDateNumber, defaultDateTime, differenceInBusinessDays, differenceInMinutes, format, getDatesBetween, getDayNumber, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearToYesterday, getFinancialYearWeeks, getFullDate, getFullDateTime, getLastWeek, getLuxonDate, getLuxonDateFromExcel, getMax, getMin, getMonday, getMonthYearString, getMonthsBetween, getSunday, getThisWeek, getToday, getTodayYmdHisNumber, getTodayYmdHisString, getTodayYmdNumber, getTodayYmdString, getTwoWeeksAgo, getUnix, getWeeksAgo, getYearMonthString, getYearNumber, getYesterday, getYmdHisNumber, getYmdHisString, getYmdNumber, getYmdString, isFriday, isLastWeek, isMonday, isSaturday, isSunday, isThisWeek, isThursday, isTuesday, isWednesday, isWeekend, month };
|