@8ms/helpers 1.40.0 → 1.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/ApiResponse.d.mts +73 -0
- package/dist/api/ApiResponse.mjs +91 -0
- package/dist/api/index.d.mts +1 -11
- package/dist/api/isError.d.mts +9 -0
- package/dist/api/isError.mjs +7 -0
- package/dist/api/isSuccess.d.mts +9 -0
- package/dist/api/isSuccess.mjs +7 -0
- package/dist/api/response.d.mts +2 -0
- package/dist/api/response.mjs +9 -0
- package/dist/array/contains.d.mts +11 -0
- package/dist/array/contains.mjs +7 -0
- package/dist/array/getArray.d.mts +10 -0
- package/dist/array/getArray.mjs +8 -0
- package/dist/atInternet/request.d.mts +31 -0
- package/dist/atInternet/request.mjs +1 -0
- package/dist/aws/athenaExpress/initClient.d.mts +15 -0
- package/dist/aws/athenaExpress/initClient.mjs +28 -0
- package/dist/aws/athenaExpress/query.d.mts +10 -0
- package/dist/aws/athenaExpress/query.mjs +13 -0
- package/dist/aws/ec2/initClient.d.mts +14 -0
- package/dist/aws/ec2/initClient.mjs +18 -0
- package/dist/aws/ec2/startInstances.d.mts +13 -0
- package/dist/aws/ec2/startInstances.mjs +17 -0
- package/dist/aws/ec2/stopInstances.d.mts +14 -0
- package/dist/aws/ec2/stopInstances.mjs +18 -0
- package/dist/aws/ecs/getClusters.d.mts +11 -0
- package/dist/aws/ecs/getClusters.mjs +23 -0
- package/dist/aws/ecs/getTaskDefinitions.d.mts +16 -0
- package/dist/aws/ecs/getTaskDefinitions.mjs +26 -0
- package/dist/aws/ecs/getTasks.d.mts +19 -0
- package/dist/aws/ecs/getTasks.mjs +29 -0
- package/dist/aws/ecs/initClient.d.mts +14 -0
- package/dist/aws/ecs/initClient.mjs +18 -0
- package/dist/aws/ecs/runTask.d.mts +19 -0
- package/dist/aws/ecs/runTask.mjs +24 -0
- package/dist/aws/getConfig.d.mts +18 -0
- package/dist/aws/getConfig.mjs +17 -0
- package/dist/aws/glue/initClient.d.mts +13 -0
- package/dist/aws/glue/initClient.mjs +17 -0
- package/dist/aws/glue/invoke.d.mts +11 -0
- package/dist/aws/glue/invoke.mjs +14 -0
- package/dist/aws/isResponse200.d.mts +11 -0
- package/dist/aws/isResponse200.mjs +16 -0
- package/dist/aws/lambda/getHandlerPath.d.mts +7 -0
- package/dist/aws/lambda/getHandlerPath.mjs +6 -0
- package/dist/aws/lambda/initClient.d.mts +13 -0
- package/dist/aws/lambda/initClient.mjs +17 -0
- package/dist/aws/lambda/invoke.d.mts +15 -0
- package/dist/aws/lambda/invoke.mjs +31 -0
- package/dist/aws/s3/copyFile.d.mts +18 -0
- package/dist/aws/s3/copyFile.mjs +15 -0
- package/dist/aws/s3/deleteFile.d.mts +14 -0
- package/dist/aws/s3/deleteFile.mjs +14 -0
- package/dist/aws/s3/deleteFiles.d.mts +14 -0
- package/dist/aws/s3/deleteFiles.mjs +14 -0
- package/dist/aws/s3/deleteFolder.d.mts +14 -0
- package/dist/aws/s3/deleteFolder.mjs +26 -0
- package/dist/aws/s3/getGlueJson.d.mts +12 -0
- package/dist/aws/s3/getGlueJson.mjs +8 -0
- package/dist/aws/s3/getPresignedPost.d.mts +28 -0
- package/dist/aws/s3/getPresignedPost.mjs +19 -0
- package/dist/aws/s3/getSignedUrl.d.mts +19 -0
- package/dist/aws/s3/getSignedUrl.mjs +17 -0
- package/dist/aws/s3/initClient.d.mts +15 -0
- package/dist/aws/s3/initClient.mjs +17 -0
- package/dist/aws/s3/isFileExists.d.mts +11 -0
- package/dist/aws/s3/isFileExists.mjs +21 -0
- package/dist/aws/s3/listFiles.d.mts +14 -0
- package/dist/aws/s3/listFiles.mjs +27 -0
- package/dist/aws/s3/listFilesIteratively.d.mts +11 -0
- package/dist/aws/s3/listFilesIteratively.mjs +40 -0
- package/dist/aws/s3/listFolders.d.mts +14 -0
- package/dist/aws/s3/listFolders.mjs +23 -0
- package/dist/aws/s3/moveFile.d.mts +16 -0
- package/dist/aws/s3/moveFile.mjs +18 -0
- package/dist/aws/s3/readBrotli.d.mts +18 -0
- package/dist/aws/s3/readBrotli.mjs +20 -0
- package/dist/aws/s3/readBuffer.d.mts +19 -0
- package/dist/aws/s3/readBuffer.mjs +29 -0
- package/dist/aws/s3/readFile.d.mts +38 -0
- package/dist/aws/s3/readFile.mjs +64 -0
- package/dist/aws/s3/readGzip.d.mts +18 -0
- package/dist/aws/s3/readGzip.mjs +20 -0
- package/dist/aws/s3/writeBrotli.d.mts +20 -0
- package/dist/aws/s3/writeBrotli.mjs +18 -0
- package/dist/aws/s3/writeFile.d.mts +18 -0
- package/dist/aws/s3/writeFile.mjs +16 -0
- package/dist/aws/s3/writeGzip.d.mts +20 -0
- package/dist/aws/s3/writeGzip.mjs +18 -0
- package/dist/aws/s3/writePresignedPost.d.mts +24 -0
- package/dist/aws/s3/writePresignedPost.mjs +28 -0
- package/dist/aws/s3/writeUrlContents.d.mts +16 -0
- package/dist/aws/s3/writeUrlContents.mjs +19 -0
- package/dist/aws/s3cache/getCache.d.mts +19 -0
- package/dist/aws/s3cache/getCache.mjs +25 -0
- package/dist/aws/s3cache/getKey.d.mts +15 -0
- package/dist/aws/s3cache/getKey.mjs +15 -0
- package/dist/aws/s3cache/index.d.mts +1 -1
- package/dist/aws/s3cache/saveCache.d.mts +16 -0
- package/dist/aws/s3cache/saveCache.mjs +14 -0
- package/dist/aws/s3cache/updateCache.d.mts +18 -0
- package/dist/aws/s3cache/updateCache.mjs +26 -0
- package/dist/aws/ses/SimpleEmail.d.mts +79 -0
- package/dist/aws/ses/SimpleEmail.mjs +122 -0
- package/dist/aws/ses/initClient.d.mts +15 -0
- package/dist/aws/ses/initClient.mjs +17 -0
- package/dist/aws/sqs/addToQueue.d.mts +35 -0
- package/dist/aws/sqs/addToQueue.mjs +20 -0
- package/dist/aws/sqs/deleteFromQueue.d.mts +16 -0
- package/dist/aws/sqs/deleteFromQueue.mjs +15 -0
- package/dist/aws/sqs/index.d.mts +18 -0
- package/dist/aws/sqs/initClient.d.mts +15 -0
- package/dist/aws/sqs/initClient.mjs +17 -0
- package/dist/aws/sqs/isEventSqs.d.mts +1 -0
- package/dist/aws/sqs/isEventSqs.mjs +1 -0
- package/dist/aws/ssm/getParameter.d.mts +16 -0
- package/dist/aws/ssm/getParameter.mjs +22 -0
- package/dist/aws/ssm/initClient.d.mts +15 -0
- package/dist/aws/ssm/initClient.mjs +17 -0
- package/dist/axios/delete.d.mts +14 -0
- package/dist/axios/delete.mjs +25 -0
- package/dist/axios/get.d.mts +16 -0
- package/dist/axios/get.mjs +24 -0
- package/dist/axios/post.d.mts +18 -0
- package/dist/axios/post.mjs +25 -0
- package/dist/boolean/getBoolean.d.mts +11 -0
- package/dist/boolean/getBoolean.mjs +11 -0
- package/dist/brightData/getCustomerId.d.mts +13 -0
- package/dist/brightData/getCustomerId.mjs +10 -0
- package/dist/brightData/getZone.d.mts +12 -0
- package/dist/brightData/getZone.mjs +10 -0
- package/dist/brightData/param.d.mts +11 -0
- package/dist/brightData/param.mjs +4 -0
- package/dist/brightData/serpApi/buildGoogleSerpUrl.d.mts +34 -0
- package/dist/brightData/serpApi/buildGoogleSerpUrl.mjs +100 -0
- package/dist/brightData/serpApi/buildGoogleTrendsUrl.d.mts +24 -0
- package/dist/brightData/serpApi/buildGoogleTrendsUrl.mjs +51 -0
- package/dist/brightData/serpApi/getAsyncRequestId.d.mts +17 -0
- package/dist/brightData/serpApi/getAsyncRequestId.mjs +35 -0
- package/dist/brightData/serpApi/getAsyncResults.d.mts +15 -0
- package/dist/brightData/serpApi/getAsyncResults.mjs +25 -0
- package/dist/brightData/serpApi/getRealtime.d.mts +13 -0
- package/dist/brightData/serpApi/getRealtime.mjs +25 -0
- package/dist/brightData/serpApi/type.d.mts +13 -0
- package/dist/brightData/serpApi/type.mjs +14 -0
- package/dist/brightData/webScraperIde/getBatch.d.mts +17 -0
- package/dist/brightData/webScraperIde/getBatch.mjs +22 -0
- package/dist/brightData/webScraperIde/getRealtime.d.mts +16 -0
- package/dist/brightData/webScraperIde/getRealtime.mjs +44 -0
- package/dist/chunk-y_GBKt04.mjs +5 -0
- package/dist/class/BaseClass.d.mts +45 -0
- package/dist/class/BaseClass.mjs +46 -0
- package/dist/crypto/getDecrypt.d.mts +16 -0
- package/dist/crypto/getDecrypt.mjs +13 -0
- package/dist/crypto/getEncrypt.d.mts +16 -0
- package/dist/crypto/getEncrypt.mjs +13 -0
- package/dist/crypto/getRandom.d.mts +12 -0
- package/dist/crypto/getRandom.mjs +10 -0
- package/dist/crypto/getSha256.d.mts +12 -0
- package/dist/crypto/getSha256.mjs +13 -0
- package/dist/date/format.d.mts +13 -0
- package/dist/date/format.mjs +17 -0
- package/dist/date/getDate.d.mts +17 -0
- package/dist/date/getDate.mjs +107 -0
- package/dist/date/getDatesBetween.d.mts +16 -0
- package/dist/date/getDatesBetween.mjs +37 -0
- package/dist/date/getDurationHours.d.mts +11 -0
- package/dist/date/getDurationHours.mjs +24 -0
- package/dist/date/getDurationMinutes.d.mts +11 -0
- package/dist/date/getDurationMinutes.mjs +22 -0
- package/dist/date/getFinancialYear.d.mts +12 -0
- package/dist/date/getFinancialYear.mjs +31 -0
- package/dist/date/getFinancialYearToDate.d.mts +10 -0
- package/dist/date/getFinancialYearToDate.mjs +15 -0
- package/dist/date/getFinancialYearToYesterday.d.mts +10 -0
- package/dist/date/getFinancialYearToYesterday.mjs +15 -0
- package/dist/date/getFinancialYearWeeks.d.mts +12 -0
- package/dist/date/getFinancialYearWeeks.mjs +23 -0
- package/dist/date/getLastWeek.d.mts +16 -0
- package/dist/date/getLastWeek.mjs +30 -0
- package/dist/date/getMax.d.mts +16 -0
- package/dist/date/getMax.mjs +21 -0
- package/dist/date/getMidnight.d.mts +2 -0
- package/dist/date/getMidnight.mjs +11 -0
- package/dist/date/getMin.d.mts +16 -0
- package/dist/date/getMin.mjs +21 -0
- package/dist/date/getMonday.d.mts +18 -0
- package/dist/date/getMonday.mjs +31 -0
- package/dist/date/getNumber.d.mts +10 -0
- package/dist/date/getNumber.mjs +17 -0
- package/dist/date/getPredefinedTimeframe.d.mts +13 -0
- package/dist/date/getPredefinedTimeframe.mjs +15 -0
- package/dist/date/getSunday.d.mts +18 -0
- package/dist/date/getSunday.mjs +27 -0
- package/dist/date/getThisWeek.d.mts +16 -0
- package/dist/date/getThisWeek.mjs +36 -0
- package/dist/date/getTimeZoned.d.mts +2 -0
- package/dist/date/getTimeZoned.mjs +53 -0
- package/dist/date/getToday.d.mts +12 -0
- package/dist/date/getToday.mjs +21 -0
- package/dist/date/getTodayYmd.d.mts +7 -0
- package/dist/date/getTodayYmd.mjs +16 -0
- package/dist/date/getTodayYmdhis.d.mts +7 -0
- package/dist/date/getTodayYmdhis.mjs +16 -0
- package/dist/date/getTwoWeeksAgo.d.mts +16 -0
- package/dist/date/getTwoWeeksAgo.mjs +36 -0
- package/dist/date/getWeeksAgo.d.mts +22 -0
- package/dist/date/getWeeksAgo.mjs +22 -0
- package/dist/date/getYesterday.d.mts +15 -0
- package/dist/date/getYesterday.mjs +24 -0
- package/dist/date/index.d.mts +1 -57
- package/dist/date/isDateValid.d.mts +11 -0
- package/dist/date/isDateValid.mjs +16 -0
- package/dist/date/isLastWeek.d.mts +12 -0
- package/dist/date/isLastWeek.mjs +11 -0
- package/dist/date/isThisWeek.d.mts +12 -0
- package/dist/date/isThisWeek.mjs +11 -0
- package/dist/date/parseExcelDate.d.mts +12 -0
- package/dist/date/parseExcelDate.mjs +18 -0
- package/dist/environment/getEnvironment.d.mts +9 -0
- package/dist/environment/getEnvironment.mjs +27 -0
- package/dist/environment/isAws.d.mts +7 -0
- package/dist/environment/isAws.mjs +8 -0
- package/dist/environment/isDevelopment.d.mts +4 -0
- package/dist/environment/isDevelopment.mjs +6 -0
- package/dist/environment/isLocalhost.d.mts +7 -0
- package/dist/environment/isLocalhost.mjs +15 -0
- package/dist/environment/isProduction.d.mts +4 -0
- package/dist/environment/isProduction.mjs +6 -0
- package/dist/environment/isStaging.d.mts +4 -0
- package/dist/environment/isStaging.mjs +6 -0
- package/dist/environment/isVercel.d.mts +7 -0
- package/dist/environment/isVercel.mjs +7 -0
- package/dist/eskimi/ageGroups.d.mts +7 -0
- package/dist/eskimi/ageGroups.mjs +41 -0
- package/dist/eskimi/campaign.d.mts +22 -0
- package/dist/eskimi/campaign.mjs +1 -0
- package/dist/eskimi/devices.d.mts +7 -0
- package/dist/eskimi/devices.mjs +10 -0
- package/dist/eskimi/endpoints.d.mts +18 -0
- package/dist/eskimi/endpoints.mjs +16 -0
- package/dist/eskimi/genders.d.mts +7 -0
- package/dist/eskimi/genders.mjs +10 -0
- package/dist/eskimi/getAccessToken.d.mts +14 -0
- package/dist/eskimi/getAccessToken.mjs +19 -0
- package/dist/eskimi/getAgeGroup.d.mts +11 -0
- package/dist/eskimi/getAgeGroup.mjs +12 -0
- package/dist/eskimi/getCampaignIds.d.mts +11 -0
- package/dist/eskimi/getCampaignIds.mjs +9 -0
- package/dist/eskimi/getData.d.mts +13 -0
- package/dist/eskimi/getData.mjs +20 -0
- package/dist/eskimi/getDevice.d.mts +11 -0
- package/dist/eskimi/getDevice.mjs +12 -0
- package/dist/eskimi/getGender.d.mts +11 -0
- package/dist/eskimi/getGender.mjs +12 -0
- package/dist/file/createDirectory.d.mts +13 -0
- package/dist/file/createDirectory.mjs +16 -0
- package/dist/file/writeFile.d.mts +1 -0
- package/dist/file/writeFile.mjs +1 -0
- package/dist/getMidnight-Cr5sAuOj.d.mts +12 -0
- package/dist/getTimeZoned-D7uY_mE6.d.mts +15 -0
- package/dist/global/forceUpdate.d.mts +12 -0
- package/dist/global/forceUpdate.mjs +16 -0
- package/dist/global/init.d.mts +16 -0
- package/dist/global/init.mjs +16 -0
- package/dist/global/isSet.d.mts +12 -0
- package/dist/global/isSet.mjs +9 -0
- package/dist/global/maxCache.d.mts +12 -0
- package/dist/global/maxCache.mjs +15 -0
- package/dist/global/read.d.mts +12 -0
- package/dist/global/read.mjs +15 -0
- package/dist/global.d.mts +42 -0
- package/dist/google/bigQuery/IsTableExists.d.mts +17 -0
- package/dist/google/bigQuery/IsTableExists.mjs +19 -0
- package/dist/google/bigQuery/createDataset.d.mts +17 -0
- package/dist/google/bigQuery/createDataset.mjs +15 -0
- package/dist/google/bigQuery/createTable.d.mts +20 -0
- package/dist/google/bigQuery/createTable.mjs +21 -0
- package/dist/google/bigQuery/getClient.d.mts +11 -0
- package/dist/google/bigQuery/getClient.mjs +19 -0
- package/dist/google/bigQuery/getDatasets.d.mts +17 -0
- package/dist/google/bigQuery/getDatasets.mjs +17 -0
- package/dist/google/bigQuery/getTables.d.mts +14 -0
- package/dist/google/bigQuery/getTables.mjs +13 -0
- package/dist/google/bigQuery/initClient.d.mts +17 -0
- package/dist/google/bigQuery/initClient.mjs +27 -0
- package/dist/google/bigQuery/isDatasetExists.d.mts +16 -0
- package/dist/google/bigQuery/isDatasetExists.mjs +20 -0
- package/dist/google/bigQuery/loadData.d.mts +23 -0
- package/dist/google/bigQuery/loadData.mjs +20 -0
- package/dist/google/bigQuery/query.d.mts +24 -0
- package/dist/google/bigQuery/query.mjs +10 -0
- package/dist/google/getConfig.d.mts +24 -0
- package/dist/google/getConfig.mjs +21 -0
- package/dist/google/sheets/getAssociatedData.d.mts +18 -0
- package/dist/google/sheets/getAssociatedData.mjs +35 -0
- package/dist/google/sheets/getBatchData.d.mts +23 -0
- package/dist/google/sheets/getBatchData.mjs +15 -0
- package/dist/google/sheets/initClient.d.mts +16 -0
- package/dist/google/sheets/initClient.mjs +21 -0
- package/dist/google/sheets/isCellNa.d.mts +11 -0
- package/dist/google/sheets/isCellNa.mjs +7 -0
- package/dist/google/storage/copyToCloud.d.mts +18 -0
- package/dist/google/storage/copyToCloud.mjs +10 -0
- package/dist/google/storage/getClient.d.mts +12 -0
- package/dist/google/storage/getClient.mjs +19 -0
- package/dist/google/storage/initClient.d.mts +18 -0
- package/dist/google/storage/initClient.mjs +27 -0
- package/dist/google/storage/isFileExists.d.mts +12 -0
- package/dist/google/storage/isFileExists.mjs +11 -0
- package/dist/google/storage/writeFile.d.mts +13 -0
- package/dist/google/storage/writeFile.mjs +28 -0
- package/dist/googleAds/getCustomer.d.mts +12 -0
- package/dist/googleAds/getCustomer.mjs +13 -0
- package/dist/googleAds/initClient.d.mts +20 -0
- package/dist/googleAds/initClient.mjs +25 -0
- package/dist/googleAds/keywordPlanner/request.d.mts +21 -0
- package/dist/googleAds/keywordPlanner/request.mjs +13 -0
- package/dist/googleAds/keywordPlanner/response.d.mts +28 -0
- package/dist/googleAds/keywordPlanner/response.mjs +1 -0
- package/dist/index-CiGy7MyK.d.mts +58 -0
- package/dist/index-gGQBTUJU.d.mts +12 -0
- package/dist/initClients.d.mts +46 -0
- package/dist/initClients.mjs +56 -0
- package/dist/json/getJsonNewline.d.mts +9 -0
- package/dist/json/getJsonNewline.mjs +7 -0
- package/dist/json/isJson.d.mts +12 -0
- package/dist/json/isJson.mjs +17 -0
- package/dist/littleWarden/getUrlStatus.d.mts +14 -0
- package/dist/littleWarden/getUrlStatus.mjs +16 -0
- package/dist/littleWarden/isAllGood.d.mts +11 -0
- package/dist/littleWarden/isAllGood.mjs +12 -0
- package/dist/littleWarden/isDanger.d.mts +11 -0
- package/dist/littleWarden/isDanger.mjs +12 -0
- package/dist/littleWarden/isWarning.d.mts +11 -0
- package/dist/littleWarden/isWarning.mjs +12 -0
- package/dist/lumar/api/buildRequest.d.mts +28 -0
- package/dist/lumar/api/buildRequest.mjs +58 -0
- package/dist/lumar/api/filter.d.mts +8 -0
- package/dist/lumar/api/filter.mjs +1 -0
- package/dist/lumar/api/getData.d.mts +11 -0
- package/dist/lumar/api/getData.mjs +10 -0
- package/dist/lumar/api/initClient.d.mts +17 -0
- package/dist/lumar/api/initClient.mjs +28 -0
- package/dist/lumar/api/operands.d.mts +13 -0
- package/dist/lumar/api/operands.mjs +13 -0
- package/dist/lumar/api/orders.d.mts +11 -0
- package/dist/lumar/api/orders.mjs +7 -0
- package/dist/lumar/api/reports.d.mts +13 -0
- package/dist/lumar/api/reports.mjs +13 -0
- package/dist/lumar/graphql/columns.d.mts +31 -0
- package/dist/lumar/graphql/columns.mjs +31 -0
- package/dist/lumar/graphql/getData.d.mts +15 -0
- package/dist/lumar/graphql/getData.mjs +18 -0
- package/dist/lumar/graphql/getReportKey.d.mts +14 -0
- package/dist/lumar/graphql/getReportKey.mjs +9 -0
- package/dist/lumar/graphql/initClient.d.mts +16 -0
- package/dist/lumar/graphql/initClient.mjs +34 -0
- package/dist/lumar/graphql/operands.d.mts +18 -0
- package/dist/lumar/graphql/operands.mjs +18 -0
- package/dist/lumar/graphql/queries/crawl.d.mts +8 -0
- package/dist/lumar/graphql/queries/crawl.mjs +1 -0
- package/dist/lumar/graphql/queries/getCrawls.d.mts +23 -0
- package/dist/lumar/graphql/queries/getCrawls.mjs +33 -0
- package/dist/lumar/graphql/queries/getReportDifferences.d.mts +30 -0
- package/dist/lumar/graphql/queries/getReportDifferences.mjs +37 -0
- package/dist/lumar/graphql/queries/getRows.d.mts +50 -0
- package/dist/lumar/graphql/queries/getRows.mjs +57 -0
- package/dist/lumar/graphql/queries/getTotals.d.mts +33 -0
- package/dist/lumar/graphql/queries/getTotals.mjs +40 -0
- package/dist/lumar/graphql/queries/row.d.mts +159 -0
- package/dist/lumar/graphql/queries/row.mjs +1 -0
- package/dist/lumar/graphql/reportTemplates.d.mts +70 -0
- package/dist/lumar/graphql/reportTemplates.mjs +70 -0
- package/dist/lumar/graphql/reportTypes.d.mts +9 -0
- package/dist/lumar/graphql/reportTypes.mjs +9 -0
- package/dist/myTarget/getAccessToken.d.mts +14 -0
- package/dist/myTarget/getAccessToken.mjs +19 -0
- package/dist/myTarget/request.d.mts +15 -0
- package/dist/myTarget/request.mjs +17 -0
- package/dist/nextAuth/isSessionReady.d.mts +8 -0
- package/dist/nextAuth/isSessionReady.mjs +10 -0
- package/dist/nextJs/getIp.d.mts +11 -0
- package/dist/nextJs/getIp.mjs +11 -0
- package/dist/nextJs/getUserAgent.d.mts +11 -0
- package/dist/nextJs/getUserAgent.mjs +7 -0
- package/dist/number/format.d.mts +13 -0
- package/dist/number/format.mjs +16 -0
- package/dist/number/getCurrency.d.mts +15 -0
- package/dist/number/getCurrency.mjs +17 -0
- package/dist/number/getDecimal.d.mts +11 -0
- package/dist/number/getDecimal.mjs +11 -0
- package/dist/number/getDivide.d.mts +13 -0
- package/dist/number/getDivide.mjs +17 -0
- package/dist/number/getNumber.d.mts +13 -0
- package/dist/number/getNumber.mjs +23 -0
- package/dist/number/getPercentIncrease.d.mts +16 -0
- package/dist/number/getPercentIncrease.mjs +13 -0
- package/dist/object/replaceKeys.d.mts +15 -0
- package/dist/object/replaceKeys.mjs +27 -0
- package/dist/prisma/getDecimal.d.mts +11 -0
- package/dist/prisma/getDecimal.mjs +17 -0
- package/dist/prisma/initClient.d.mts +8 -0
- package/dist/prisma/initClient.mjs +25 -0
- package/dist/response-CKsarnP-.d.mts +11 -0
- package/dist/snapchat/getAccessToken.d.mts +14 -0
- package/dist/snapchat/getAccessToken.mjs +29 -0
- package/dist/sorting/byNumberAscending.d.mts +13 -0
- package/dist/sorting/byNumberAscending.mjs +13 -0
- package/dist/sorting/byNumberDescending.d.mts +13 -0
- package/dist/sorting/byNumberDescending.mjs +13 -0
- package/dist/sorting/byStringAscending.d.mts +13 -0
- package/dist/sorting/byStringAscending.mjs +13 -0
- package/dist/sorting/byStringDescending.d.mts +13 -0
- package/dist/sorting/byStringDescending.mjs +13 -0
- package/dist/stream/sort.d.mts +16 -0
- package/dist/stream/sort.mjs +46 -0
- package/dist/string/getCapitalised.d.mts +15 -0
- package/dist/string/getCapitalised.mjs +13 -0
- package/dist/string/getClean.d.mts +32 -0
- package/dist/string/getClean.mjs +28 -0
- package/dist/string/getDecoded.d.mts +14 -0
- package/dist/string/getDecoded.mjs +19 -0
- package/dist/string/getFolder.d.mts +12 -0
- package/dist/string/getFolder.mjs +10 -0
- package/dist/string/getProperCase.d.mts +13 -0
- package/dist/string/getProperCase.mjs +14 -0
- package/dist/string/getString.d.mts +11 -0
- package/dist/string/getString.mjs +18 -0
- package/dist/string/getStringFromStream.d.mts +12 -0
- package/dist/string/getStringFromStream.mjs +15 -0
- package/dist/string/getWithoutAccents.d.mts +13 -0
- package/dist/string/getWithoutAccents.mjs +11 -0
- package/dist/string/getWithoutHtmlTags.d.mts +13 -0
- package/dist/string/getWithoutHtmlTags.mjs +11 -0
- package/dist/string/getWithoutPunctuation.d.mts +13 -0
- package/dist/string/getWithoutPunctuation.mjs +11 -0
- package/dist/string/getWithoutUnderscores.d.mts +12 -0
- package/dist/string/getWithoutUnderscores.mjs +10 -0
- package/dist/string/getWithoutWhitespaces.d.mts +13 -0
- package/dist/string/getWithoutWhitespaces.mjs +11 -0
- package/dist/swr/isAllData.d.mts +11 -0
- package/dist/swr/isAllData.mjs +12 -0
- package/dist/swr/isAnyError.d.mts +11 -0
- package/dist/swr/isAnyError.mjs +12 -0
- package/dist/swr/isAnyLoading.d.mts +11 -0
- package/dist/swr/isAnyLoading.mjs +12 -0
- package/dist/swr/isData.d.mts +11 -0
- package/dist/swr/isData.mjs +7 -0
- package/dist/swr/isError.d.mts +11 -0
- package/dist/swr/isError.mjs +7 -0
- package/dist/swr/isLoading.d.mts +11 -0
- package/dist/swr/isLoading.mjs +9 -0
- package/dist/upTimeRobot/getMonitors.d.mts +1 -0
- package/dist/upTimeRobot/getMonitors.mjs +3 -0
- package/dist/upTimeRobot/logTypes.d.mts +9 -0
- package/dist/upTimeRobot/logTypes.mjs +9 -0
- package/dist/upTimeRobot/monitorStatuses.d.mts +10 -0
- package/dist/upTimeRobot/monitorStatuses.mjs +10 -0
- package/dist/upTimeRobot/monitorSubTypes.d.mts +12 -0
- package/dist/upTimeRobot/monitorSubTypes.mjs +12 -0
- package/dist/upTimeRobot/monitorTypes.d.mts +10 -0
- package/dist/upTimeRobot/monitorTypes.mjs +10 -0
- package/dist/upTimeRobot/requestStatuses.d.mts +7 -0
- package/dist/upTimeRobot/requestStatuses.mjs +7 -0
- package/dist/url/buildParameters.d.mts +13 -0
- package/dist/url/buildParameters.mjs +17 -0
- package/dist/url/buildRelative.d.mts +13 -0
- package/dist/url/buildRelative.mjs +13 -0
- package/dist/url/buildUrl.d.mts +16 -0
- package/dist/url/buildUrl.mjs +18 -0
- package/dist/url/isAbsolute.d.mts +11 -0
- package/dist/url/isAbsolute.mjs +14 -0
- package/dist/url/isRelative.d.mts +11 -0
- package/dist/url/isRelative.mjs +7 -0
- package/dist/url/url.d.mts +9 -0
- package/dist/url/url.mjs +1 -0
- package/dist/url/writeUrlContents.d.mts +16 -0
- package/dist/url/writeUrlContents.mjs +30 -0
- package/dist/util/defaultTo.d.mts +12 -0
- package/dist/util/defaultTo.mjs +20 -0
- package/dist/util/getBrotliCompressed.d.mts +14 -0
- package/dist/util/getBrotliCompressed.mjs +15 -0
- package/dist/util/getBrotliDecompressed.d.mts +14 -0
- package/dist/util/getBrotliDecompressed.mjs +17 -0
- package/dist/util/getClean.d.mts +18 -0
- package/dist/util/getClean.mjs +15 -0
- package/dist/util/getGzipCompressed.d.mts +14 -0
- package/dist/util/getGzipCompressed.mjs +15 -0
- package/dist/util/getGzipDecompressed.d.mts +14 -0
- package/dist/util/getGzipDecompressed.mjs +17 -0
- package/dist/util/getWithoutHash.d.mts +12 -0
- package/dist/util/getWithoutHash.mjs +14 -0
- package/dist/util/getWithoutParameter.d.mts +12 -0
- package/dist/util/getWithoutParameter.mjs +14 -0
- package/dist/util/isUndefined.d.mts +14 -0
- package/dist/util/isUndefined.mjs +15 -0
- package/dist/util/promiseChunks.d.mts +12 -0
- package/dist/util/promiseChunks.mjs +18 -0
- package/dist/util/sleep.d.mts +7 -0
- package/dist/util/sleep.mjs +6 -0
- package/dist/xml/getXml.d.mts +7 -0
- package/dist/xml/getXml.mjs +14 -0
- package/package.json +247 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as __require } from "../../chunk-y_GBKt04.mjs";
|
|
2
|
+
import getConfig from "../getConfig.mjs";
|
|
3
|
+
//#region src/google/sheets/initClient.ts
|
|
4
|
+
global.googleSheetsClient = null;
|
|
5
|
+
/**
|
|
6
|
+
* Initialise the Google Sheets instance using the separate service method.
|
|
7
|
+
* https://github.com/googleapis/google-api-nodejs-client
|
|
8
|
+
* Library: @googleapis/sheets
|
|
9
|
+
*/
|
|
10
|
+
const initClient = ({ parameter }) => {
|
|
11
|
+
if (!global.googleSheetsClient) {
|
|
12
|
+
const googleApisSheets = __require("@googleapis/sheets");
|
|
13
|
+
const formattedConfig = getConfig({ parameter });
|
|
14
|
+
global.googleSheetsClient = new googleApisSheets.auth.GoogleAuth({
|
|
15
|
+
credentials: formattedConfig,
|
|
16
|
+
scopes: ["https://www.googleapis.com/auth/spreadsheets"]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { initClient as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/google/sheets/isCellNa.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Noticed sometimes Google Sheets can struggle with import XML resulting to N/A values.
|
|
4
|
+
*/
|
|
5
|
+
declare const isCellNa: ({
|
|
6
|
+
input
|
|
7
|
+
}: {
|
|
8
|
+
input: any;
|
|
9
|
+
}) => boolean;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isCellNa as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/google/storage/copyToCloud.d.ts
|
|
2
|
+
type CopyToCloud = {
|
|
3
|
+
bucket: string;
|
|
4
|
+
localFile: string;
|
|
5
|
+
options?: object;
|
|
6
|
+
projectId?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Copy a local file to Google Cloud Storage.
|
|
10
|
+
*/
|
|
11
|
+
declare const copyToCloud: ({
|
|
12
|
+
bucket,
|
|
13
|
+
localFile,
|
|
14
|
+
options,
|
|
15
|
+
projectId
|
|
16
|
+
}: CopyToCloud) => Promise<any>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { copyToCloud, copyToCloud as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import getClient from "./getClient.mjs";
|
|
2
|
+
//#region src/google/storage/copyToCloud.ts
|
|
3
|
+
/**
|
|
4
|
+
* Copy a local file to Google Cloud Storage.
|
|
5
|
+
*/
|
|
6
|
+
const copyToCloud = async ({ bucket, localFile, options, projectId }) => {
|
|
7
|
+
return await getClient({ projectId }).bucket(bucket).upload(localFile, options);
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { copyToCloud, copyToCloud as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/google/storage/getClient.d.ts
|
|
2
|
+
type GetClient = {
|
|
3
|
+
projectId?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Create a new client if the project id differs from the global.
|
|
7
|
+
*/
|
|
8
|
+
declare const getClient: ({
|
|
9
|
+
projectId
|
|
10
|
+
}: GetClient) => any;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { getClient as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as __require } from "../../chunk-y_GBKt04.mjs";
|
|
2
|
+
//#region src/google/storage/getClient.ts
|
|
3
|
+
/**
|
|
4
|
+
* Create a new client if the project id differs from the global.
|
|
5
|
+
*/
|
|
6
|
+
const getClient = ({ projectId }) => {
|
|
7
|
+
let client = global.googleStorageClient;
|
|
8
|
+
if (void 0 !== projectId && projectId !== global.googleStorageDefault.projectId) {
|
|
9
|
+
const { Storage } = __require("@google-cloud/storage");
|
|
10
|
+
client = new Storage({
|
|
11
|
+
credentials: global.googleStorageDefault.credentials,
|
|
12
|
+
location: "europe-west2",
|
|
13
|
+
projectId
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return client;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getClient as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Config } from "../getConfig.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/google/storage/initClient.d.ts
|
|
4
|
+
type InitClient = {
|
|
5
|
+
parameter: Config;
|
|
6
|
+
projectId: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Initialise the Google Sheets instance using the separate service method.
|
|
10
|
+
* https://github.com/googleapis/google-api-nodejs-client
|
|
11
|
+
* Library: @googleapis/sheets
|
|
12
|
+
*/
|
|
13
|
+
declare const initClient: ({
|
|
14
|
+
parameter,
|
|
15
|
+
projectId
|
|
16
|
+
}: InitClient) => void;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { initClient as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as __require } from "../../chunk-y_GBKt04.mjs";
|
|
2
|
+
import getConfig from "../getConfig.mjs";
|
|
3
|
+
//#region src/google/storage/initClient.ts
|
|
4
|
+
global.googleStorageDefault = {
|
|
5
|
+
credentials: null,
|
|
6
|
+
projectId: null
|
|
7
|
+
};
|
|
8
|
+
global.googleStorageClient = null;
|
|
9
|
+
/**
|
|
10
|
+
* Initialise the Google Sheets instance using the separate service method.
|
|
11
|
+
* https://github.com/googleapis/google-api-nodejs-client
|
|
12
|
+
* Library: @googleapis/sheets
|
|
13
|
+
*/
|
|
14
|
+
const initClient = ({ parameter, projectId }) => {
|
|
15
|
+
if (!global.googleStorageClient) {
|
|
16
|
+
const { Storage } = __require("@google-cloud/storage");
|
|
17
|
+
const formattedConfig = getConfig({ parameter });
|
|
18
|
+
global.googleStorageDefault.credentials = formattedConfig;
|
|
19
|
+
global.googleStorageDefault.projectId = projectId;
|
|
20
|
+
global.googleStorageClient = new Storage({
|
|
21
|
+
credentials: formattedConfig,
|
|
22
|
+
projectId
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { initClient as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/google/storage/isFileExists.d.ts
|
|
2
|
+
type IsFileExists = {
|
|
3
|
+
bucket: string;
|
|
4
|
+
key: string;
|
|
5
|
+
projectId?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Check to see if a file exists but don't get the contents.
|
|
9
|
+
*/
|
|
10
|
+
declare const isFileExists: (props: IsFileExists) => Promise<boolean>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isFileExists as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import getClient from "./getClient.mjs";
|
|
2
|
+
//#region src/google/storage/isFileExists.ts
|
|
3
|
+
/**
|
|
4
|
+
* Check to see if a file exists but don't get the contents.
|
|
5
|
+
*/
|
|
6
|
+
const isFileExists = async (props) => {
|
|
7
|
+
const { bucket, key, projectId } = props;
|
|
8
|
+
return (await getClient({ projectId }).bucket(bucket).file(key).exists())?.[0];
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isFileExists as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/google/storage/writeFile.d.ts
|
|
2
|
+
type WriteFile = {
|
|
3
|
+
bucket: string;
|
|
4
|
+
data: any;
|
|
5
|
+
key: string;
|
|
6
|
+
[options: string]: any;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Write a file to Google Cloud Storage.
|
|
10
|
+
*/
|
|
11
|
+
declare const writeFile: (props: WriteFile) => Promise<any>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { writeFile as default, writeFile };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { t as __require } from "../../chunk-y_GBKt04.mjs";
|
|
2
|
+
import getClient from "./getClient.mjs";
|
|
3
|
+
//#region src/google/storage/writeFile.ts
|
|
4
|
+
/**
|
|
5
|
+
* Write a file to Google Cloud Storage.
|
|
6
|
+
*/
|
|
7
|
+
const writeFile = async (props) => {
|
|
8
|
+
const { bucket, contentType, data, key, projectId, ...options } = props;
|
|
9
|
+
const dataStream = new (__require("stream")).PassThrough();
|
|
10
|
+
const googleFile = getClient({ projectId }).bucket(bucket).file(key);
|
|
11
|
+
dataStream.push(data);
|
|
12
|
+
dataStream.push(null);
|
|
13
|
+
return await new Promise((resolve, reject) => {
|
|
14
|
+
dataStream.pipe(googleFile.createWriteStream({
|
|
15
|
+
contentType: "auto",
|
|
16
|
+
resumable: false,
|
|
17
|
+
validation: false,
|
|
18
|
+
metadata: {},
|
|
19
|
+
...options
|
|
20
|
+
})).on("error", (error) => {
|
|
21
|
+
reject(error);
|
|
22
|
+
}).on("finish", () => {
|
|
23
|
+
resolve(true);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { writeFile as default, writeFile };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/googleAds/getCustomer.d.ts
|
|
2
|
+
type GetCustomer = {
|
|
3
|
+
customerId: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Return the Google Ads Client with the specified customer set.
|
|
7
|
+
*/
|
|
8
|
+
declare const getCustomer: ({
|
|
9
|
+
customerId
|
|
10
|
+
}: GetCustomer) => Promise<any>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { getCustomer as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/googleAds/getCustomer.ts
|
|
2
|
+
/**
|
|
3
|
+
* Return the Google Ads Client with the specified customer set.
|
|
4
|
+
*/
|
|
5
|
+
const getCustomer = async ({ customerId }) => {
|
|
6
|
+
return global.googleAdsClient.instance.Customer({
|
|
7
|
+
customer_id: customerId,
|
|
8
|
+
login_customer_id: global.googleAdsClient.mccAccountId,
|
|
9
|
+
refresh_token: global.googleAdsClient.refreshToken
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { getCustomer as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/googleAds/initClient.d.ts
|
|
2
|
+
type GoogleAdsParameter = {
|
|
3
|
+
clientId: string;
|
|
4
|
+
clientSecret: string;
|
|
5
|
+
developerToken: string;
|
|
6
|
+
mccAccountId: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
};
|
|
9
|
+
type InitClient = {
|
|
10
|
+
parameter: GoogleAdsParameter;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Shorthand function to get the Google Ads Client.
|
|
14
|
+
* Library: google-ads-api
|
|
15
|
+
*/
|
|
16
|
+
declare const initClient: ({
|
|
17
|
+
parameter
|
|
18
|
+
}: InitClient) => Promise<void>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { GoogleAdsParameter, initClient as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as __require } from "../chunk-y_GBKt04.mjs";
|
|
2
|
+
//#region src/googleAds/initClient.ts
|
|
3
|
+
global.googleAdsClient = {
|
|
4
|
+
instance: null,
|
|
5
|
+
mccAccountId: "",
|
|
6
|
+
refreshToken: ""
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Shorthand function to get the Google Ads Client.
|
|
10
|
+
* Library: google-ads-api
|
|
11
|
+
*/
|
|
12
|
+
const initClient = async ({ parameter }) => {
|
|
13
|
+
if (!global.googleAdsClient.instance) {
|
|
14
|
+
const { GoogleAdsApi } = __require("google-ads-api");
|
|
15
|
+
global.googleAdsClient.instance = new GoogleAdsApi({
|
|
16
|
+
client_id: parameter.clientId,
|
|
17
|
+
client_secret: parameter.clientSecret,
|
|
18
|
+
developer_token: parameter.developerToken
|
|
19
|
+
});
|
|
20
|
+
global.googleAdsClient.mccAccountId = parameter.mccAccountId;
|
|
21
|
+
global.googleAdsClient.refreshToken = parameter.refreshToken;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { initClient as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Country, Month, Network } from "./index.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/googleAds/keywordPlanner/request.d.ts
|
|
4
|
+
type Request = {
|
|
5
|
+
countries?: Country[] | null;
|
|
6
|
+
customerId?: string;
|
|
7
|
+
historicalMetricsOptions?: {
|
|
8
|
+
startMonth: Month;
|
|
9
|
+
startYear: number;
|
|
10
|
+
endMonth: Month;
|
|
11
|
+
endYear: number;
|
|
12
|
+
};
|
|
13
|
+
includeAdultKeywords?: boolean;
|
|
14
|
+
keywordPlanNetwork?: Network;
|
|
15
|
+
queries?: string[];
|
|
16
|
+
language?: number | null;
|
|
17
|
+
url?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const request: Request;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Request, request as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Network } from "./index.mjs";
|
|
2
|
+
//#region src/googleAds/keywordPlanner/request.ts
|
|
3
|
+
const request = {
|
|
4
|
+
countries: [],
|
|
5
|
+
customerId: "",
|
|
6
|
+
historicalMetricsOptions: null,
|
|
7
|
+
includeAdultKeywords: false,
|
|
8
|
+
keywordPlanNetwork: Network.GOOGLE_SEARCH_ONLY,
|
|
9
|
+
queries: [],
|
|
10
|
+
language: null
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { request as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { t as State } from "../../index-gGQBTUJU.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/googleAds/keywordPlanner/response.d.ts
|
|
4
|
+
type Month = {
|
|
5
|
+
date: string;
|
|
6
|
+
month: number;
|
|
7
|
+
searchVolume: number;
|
|
8
|
+
year: number;
|
|
9
|
+
};
|
|
10
|
+
type Keyword = {
|
|
11
|
+
payload: object;
|
|
12
|
+
keyword: string;
|
|
13
|
+
avgCpc: number;
|
|
14
|
+
avgSearchVolume: number;
|
|
15
|
+
competition: number;
|
|
16
|
+
competitionIndex: number;
|
|
17
|
+
months: Month[];
|
|
18
|
+
topOfPageBidHigh: number;
|
|
19
|
+
topOfPageBidLow: number;
|
|
20
|
+
totalSearchVolume: number;
|
|
21
|
+
};
|
|
22
|
+
type Response = {
|
|
23
|
+
body: Keyword[];
|
|
24
|
+
error: null | string;
|
|
25
|
+
state: State;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Response };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/date/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A date can be either a number (YYYYMMDD), string (YYYY-MM-DD) or Date instance.
|
|
4
|
+
*/
|
|
5
|
+
type DateType = number | string | Date;
|
|
6
|
+
/**
|
|
7
|
+
* When a date isn't specified and we need a value.
|
|
8
|
+
*/
|
|
9
|
+
declare const defaultDate = "1901-01-01";
|
|
10
|
+
/**
|
|
11
|
+
* When a date time isn't specified and we need a value.
|
|
12
|
+
*/
|
|
13
|
+
declare const defaultDateTime = "1901-01-01 00:00:00";
|
|
14
|
+
type Duration = {
|
|
15
|
+
hours: number;
|
|
16
|
+
minutes: number;
|
|
17
|
+
seconds: number;
|
|
18
|
+
};
|
|
19
|
+
declare enum DurationComparison {
|
|
20
|
+
VS_NOW = "VS_NOW",
|
|
21
|
+
VS_MIDNIGHT = "VS_MIDNIGHT"
|
|
22
|
+
}
|
|
23
|
+
declare enum Interval {
|
|
24
|
+
FOREVER = "FOREVER",
|
|
25
|
+
MONTHS = "MONTHS",
|
|
26
|
+
DAYS = "DAYS",
|
|
27
|
+
HOURS = "HOURS",
|
|
28
|
+
MINUTES = "MINUTES"
|
|
29
|
+
}
|
|
30
|
+
type FinancialYear = {
|
|
31
|
+
end: Date;
|
|
32
|
+
start: Date;
|
|
33
|
+
};
|
|
34
|
+
type FinancialYearWeekType = {
|
|
35
|
+
end: Date;
|
|
36
|
+
financialWeek: number;
|
|
37
|
+
financialYear: number;
|
|
38
|
+
start: Date;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A timeframe has a start and an end date.
|
|
42
|
+
*/
|
|
43
|
+
type Timeframe = {
|
|
44
|
+
end: DateType;
|
|
45
|
+
start: DateType;
|
|
46
|
+
};
|
|
47
|
+
declare enum Timeframes {
|
|
48
|
+
CURRENT = "CURRENT",
|
|
49
|
+
COMPARISON = "COMPARISON"
|
|
50
|
+
}
|
|
51
|
+
declare enum PredefinedTimeframe {
|
|
52
|
+
NONE = "NONE",
|
|
53
|
+
CUSTOM = "CUSTOM",
|
|
54
|
+
THIS_WEEK = "THIS_WEEK",
|
|
55
|
+
LAST_WEEK = "LAST_WEEK"
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { FinancialYearWeekType as a, Timeframe as c, defaultDateTime as d, FinancialYear as i, Timeframes as l, Duration as n, Interval as o, DurationComparison as r, PredefinedTimeframe as s, DateType as t, defaultDate as u };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/api/index.d.ts
|
|
2
|
+
declare enum State {
|
|
3
|
+
CANCELLED = "CANCELLED",
|
|
4
|
+
ERROR = "ERROR",
|
|
5
|
+
IDLE = "IDLE",
|
|
6
|
+
PENDING = "PENDING",
|
|
7
|
+
SUCCESS = "SUCCESS",
|
|
8
|
+
VALIDATION_ERROR = "VALIDATION_ERROR"
|
|
9
|
+
}
|
|
10
|
+
declare const unexpectedError: string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { unexpectedError as n, State as t };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Config } from "./aws/getConfig.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/initClients.d.ts
|
|
4
|
+
type InitClients = {
|
|
5
|
+
athenaExpress?: {
|
|
6
|
+
database: string;
|
|
7
|
+
s3Bucket: string;
|
|
8
|
+
s3Key: string;
|
|
9
|
+
};
|
|
10
|
+
awsConfig?: Config;
|
|
11
|
+
awsEc2?: boolean;
|
|
12
|
+
awsEcs?: boolean;
|
|
13
|
+
awsGlue?: boolean;
|
|
14
|
+
awsLambda?: boolean;
|
|
15
|
+
awsS3?: boolean;
|
|
16
|
+
awsSes?: boolean;
|
|
17
|
+
awsSsm?: boolean;
|
|
18
|
+
lumarApi?: {
|
|
19
|
+
parameterName: string;
|
|
20
|
+
};
|
|
21
|
+
lumarGraphql?: {
|
|
22
|
+
parameterName: string;
|
|
23
|
+
};
|
|
24
|
+
eskimi?: boolean;
|
|
25
|
+
googleAds?: {
|
|
26
|
+
parameterName: string;
|
|
27
|
+
};
|
|
28
|
+
googleConfig?: {
|
|
29
|
+
parameterName: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
};
|
|
32
|
+
googleBigQuery?: boolean;
|
|
33
|
+
googleSheets?: boolean;
|
|
34
|
+
googleStorage?: boolean;
|
|
35
|
+
prisma?: {
|
|
36
|
+
debug?: boolean;
|
|
37
|
+
planetScale?: boolean;
|
|
38
|
+
};
|
|
39
|
+
myTarget?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Function to simplify initialising the clients.
|
|
43
|
+
*/
|
|
44
|
+
declare const initClients: (props: InitClients) => Promise<void>;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { initClients as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import initClient from "./aws/athenaExpress/initClient.mjs";
|
|
2
|
+
import { initClient as initClient$1 } from "./aws/ec2/initClient.mjs";
|
|
3
|
+
import { initClient as initClient$2 } from "./aws/ecs/initClient.mjs";
|
|
4
|
+
import initClient$3 from "./aws/glue/initClient.mjs";
|
|
5
|
+
import initClient$4 from "./aws/lambda/initClient.mjs";
|
|
6
|
+
import initClient$5 from "./aws/s3/initClient.mjs";
|
|
7
|
+
import initClient$6 from "./aws/ses/initClient.mjs";
|
|
8
|
+
import getParameter from "./aws/ssm/getParameter.mjs";
|
|
9
|
+
import initClient$7 from "./aws/ssm/initClient.mjs";
|
|
10
|
+
import initClient$8 from "./lumar/api/initClient.mjs";
|
|
11
|
+
import initClient$9 from "./lumar/graphql/initClient.mjs";
|
|
12
|
+
import initClient$10 from "./google/bigQuery/initClient.mjs";
|
|
13
|
+
import initClient$11 from "./google/sheets/initClient.mjs";
|
|
14
|
+
import initClient$12 from "./google/storage/initClient.mjs";
|
|
15
|
+
import initClient$13 from "./googleAds/initClient.mjs";
|
|
16
|
+
import initClient$14 from "./prisma/initClient.mjs";
|
|
17
|
+
//#region src/initClients.ts
|
|
18
|
+
/**
|
|
19
|
+
* Function to simplify initialising the clients.
|
|
20
|
+
*/
|
|
21
|
+
const initClients = async (props) => {
|
|
22
|
+
if (props?.athenaExpress) initClient({
|
|
23
|
+
config: props.awsConfig,
|
|
24
|
+
database: props.athenaExpress.database,
|
|
25
|
+
s3Bucket: props.athenaExpress.s3Bucket,
|
|
26
|
+
s3Key: props.athenaExpress.s3Key
|
|
27
|
+
});
|
|
28
|
+
if (props?.awsEc2) initClient$1({ config: props.awsConfig });
|
|
29
|
+
if (props?.awsEcs) initClient$2({ config: props.awsConfig });
|
|
30
|
+
if (props?.awsGlue) initClient$3({ config: props.awsConfig });
|
|
31
|
+
if (props?.awsLambda) initClient$4({ config: props.awsConfig });
|
|
32
|
+
if (props?.awsS3) initClient$5({ config: props.awsConfig });
|
|
33
|
+
if (props?.awsSes) initClient$6({ config: props.awsConfig });
|
|
34
|
+
if (props?.awsSsm || props?.lumarApi || props?.lumarGraphql || props?.googleAds || props?.googleConfig) initClient$7({ config: props.awsConfig });
|
|
35
|
+
if (props?.lumarApi) await initClient$8({ auth: await getParameter({ name: props.lumarApi.parameterName }) });
|
|
36
|
+
if (props?.lumarGraphql) await initClient$9({ auth: await getParameter({ name: props.lumarGraphql.parameterName }) });
|
|
37
|
+
if (props?.googleConfig) {
|
|
38
|
+
const googleParameter = await getParameter({ name: props.googleConfig.parameterName });
|
|
39
|
+
if (props?.googleBigQuery && props?.googleConfig?.projectId) initClient$10({
|
|
40
|
+
parameter: googleParameter,
|
|
41
|
+
projectId: props.googleConfig.projectId
|
|
42
|
+
});
|
|
43
|
+
if (props?.googleSheets) initClient$11({ parameter: googleParameter });
|
|
44
|
+
if (props?.googleStorage && props?.googleConfig?.projectId) initClient$12({
|
|
45
|
+
parameter: googleParameter,
|
|
46
|
+
projectId: props.googleConfig.projectId
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (props?.googleAds) await initClient$13({ parameter: await getParameter({ name: props.googleAds.parameterName }) });
|
|
50
|
+
if (props?.prisma) initClient$14({
|
|
51
|
+
debug: props?.prisma?.debug ?? false,
|
|
52
|
+
planetScale: props?.prisma?.planetScale ?? false
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { initClients as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/json/isJson.ts
|
|
2
|
+
/**
|
|
3
|
+
* Is the provided input JSON?
|
|
4
|
+
* https://stackoverflow.com/a/33369954
|
|
5
|
+
*/
|
|
6
|
+
const isJson = ({ input }) => {
|
|
7
|
+
input = "string" === typeof input ? input : JSON.stringify(input);
|
|
8
|
+
try {
|
|
9
|
+
input = JSON.parse(input);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if ("object" === typeof input && null !== input) return true;
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { isJson as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/littleWarden/getUrlStatus.d.ts
|
|
2
|
+
type GetUrlStatus = {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
urlId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Get the URL Status for a given URL ID from Little Warden.
|
|
8
|
+
*/
|
|
9
|
+
declare const getUrlStatus: ({
|
|
10
|
+
apiKey,
|
|
11
|
+
urlId
|
|
12
|
+
}: GetUrlStatus) => Promise<any>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getUrlStatus as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import get from "../axios/get.mjs";
|
|
2
|
+
//#region src/littleWarden/getUrlStatus.ts
|
|
3
|
+
/**
|
|
4
|
+
* Get the URL Status for a given URL ID from Little Warden.
|
|
5
|
+
*/
|
|
6
|
+
const getUrlStatus = async ({ apiKey, urlId }) => {
|
|
7
|
+
return (await get({
|
|
8
|
+
config: { headers: { "Authorization": `Token token="${apiKey}"` } },
|
|
9
|
+
url: `https://littlewarden.com/api/sites/${urlId}`
|
|
10
|
+
})).getBodyDefaultTo({
|
|
11
|
+
defaultValue: {},
|
|
12
|
+
keys: ["data", "site"]
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getUrlStatus as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { State } from "./index.mjs";
|
|
2
|
+
//#region src/littleWarden/isAllGood.ts
|
|
3
|
+
/**
|
|
4
|
+
* Check if the field is All Good.
|
|
5
|
+
*/
|
|
6
|
+
const isAllGood = ({ field }) => {
|
|
7
|
+
let response = false;
|
|
8
|
+
if (void 0 !== field && void 0 !== field["status"]) response = State.ALL_GOOD === field["status"];
|
|
9
|
+
return response;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isAllGood as default };
|