@8ms/helpers 1.40.6 → 1.40.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/ApiResponse.d.ts +50 -0
- package/api/ApiResponse.js +94 -0
- package/api/index.d.ts +9 -0
- package/api/index.js +13 -0
- package/api/isError.d.ts +6 -0
- package/api/isError.js +7 -0
- package/api/isSuccess.d.ts +6 -0
- package/api/isSuccess.js +7 -0
- package/api/response.d.ts +8 -0
- package/api/response.js +9 -0
- package/array/contains.d.ts +9 -0
- package/array/contains.js +7 -0
- package/array/getArray.d.ts +8 -0
- package/array/getArray.js +11 -0
- package/atInternet/request.d.ts +30 -0
- package/atInternet/request.js +2 -0
- package/aws/athenaExpress/initClient.d.ts +12 -0
- package/aws/athenaExpress/initClient.js +31 -0
- package/aws/athenaExpress/query.d.ts +8 -0
- package/aws/athenaExpress/query.js +16 -0
- package/aws/ec2/initClient.d.ts +11 -0
- package/aws/ec2/initClient.js +23 -0
- package/aws/ec2/startInstances.d.ts +11 -0
- package/aws/ec2/startInstances.js +18 -0
- package/aws/ec2/stopInstances.d.ts +12 -0
- package/aws/ec2/stopInstances.js +19 -0
- package/aws/ecs/getClusters.d.ts +9 -0
- package/aws/ecs/getClusters.js +32 -0
- package/aws/ecs/getTaskDefinitions.d.ts +13 -0
- package/aws/ecs/getTaskDefinitions.js +35 -0
- package/aws/ecs/getTasks.d.ts +16 -0
- package/aws/ecs/getTasks.js +38 -0
- package/aws/ecs/initClient.d.ts +11 -0
- package/aws/ecs/initClient.js +23 -0
- package/aws/ecs/runTask.d.ts +16 -0
- package/aws/ecs/runTask.js +30 -0
- package/aws/getConfig.d.ts +13 -0
- package/aws/getConfig.js +27 -0
- package/aws/glue/initClient.d.ts +10 -0
- package/aws/glue/initClient.js +21 -0
- package/aws/glue/invoke.d.ts +9 -0
- package/aws/glue/invoke.js +23 -0
- package/aws/isResponse200.d.ts +7 -0
- package/aws/isResponse200.js +22 -0
- package/aws/lambda/getHandlerPath.d.ts +5 -0
- package/aws/lambda/getHandlerPath.js +7 -0
- package/aws/lambda/initClient.d.ts +10 -0
- package/aws/lambda/initClient.js +21 -0
- package/aws/lambda/invoke.d.ts +13 -0
- package/aws/lambda/invoke.js +61 -0
- package/aws/s3/copyFile.d.ts +13 -0
- package/aws/s3/copyFile.js +14 -0
- package/aws/s3/deleteFile.d.ts +9 -0
- package/aws/s3/deleteFile.js +13 -0
- package/aws/s3/deleteFiles.d.ts +9 -0
- package/aws/s3/deleteFiles.js +17 -0
- package/aws/s3/deleteFolder.d.ts +9 -0
- package/aws/s3/deleteFolder.js +36 -0
- package/aws/s3/getGlueJson.d.ts +8 -0
- package/aws/s3/getGlueJson.js +11 -0
- package/aws/s3/getPresignedPost.d.ts +20 -0
- package/aws/s3/getPresignedPost.js +19 -0
- package/aws/s3/getSignedUrl.d.ts +12 -0
- package/aws/s3/getSignedUrl.js +17 -0
- package/aws/s3/initClient.d.ts +10 -0
- package/aws/s3/initClient.js +19 -0
- package/aws/s3/isFileExists.d.ts +9 -0
- package/aws/s3/isFileExists.js +27 -0
- package/aws/s3/listFiles.d.ts +9 -0
- package/aws/s3/listFiles.js +33 -0
- package/aws/s3/listFilesIteratively.d.ts +9 -0
- package/aws/s3/listFilesIteratively.js +44 -0
- package/aws/s3/listFolders.d.ts +9 -0
- package/aws/s3/listFolders.js +32 -0
- package/aws/s3/moveFile.d.ts +10 -0
- package/aws/s3/moveFile.js +21 -0
- package/aws/s3/readBrotli.d.ts +11 -0
- package/aws/s3/readBrotli.js +28 -0
- package/aws/s3/readBuffer.d.ts +13 -0
- package/aws/s3/readBuffer.js +39 -0
- package/aws/s3/readFile.d.ts +31 -0
- package/aws/s3/readFile.js +83 -0
- package/aws/s3/readGzip.d.ts +11 -0
- package/aws/s3/readGzip.js +28 -0
- package/aws/s3/writeBrotli.d.ts +12 -0
- package/aws/s3/writeBrotli.js +28 -0
- package/aws/s3/writeFile.d.ts +11 -0
- package/aws/s3/writeFile.js +16 -0
- package/aws/s3/writeGzip.d.ts +12 -0
- package/aws/s3/writeGzip.js +28 -0
- package/aws/s3/writePresignedPost.d.ts +14 -0
- package/aws/s3/writePresignedPost.js +31 -0
- package/aws/s3/writeUrlContents.d.ts +10 -0
- package/aws/s3/writeUrlContents.js +23 -0
- package/aws/s3cache/getCache.d.ts +11 -0
- package/aws/s3cache/getCache.js +37 -0
- package/aws/s3cache/getKey.d.ts +10 -0
- package/aws/s3cache/getKey.js +18 -0
- package/aws/s3cache/index.d.ts +6 -0
- package/aws/s3cache/index.js +2 -0
- package/aws/s3cache/saveCache.d.ts +10 -0
- package/aws/s3cache/saveCache.js +17 -0
- package/aws/s3cache/updateCache.d.ts +10 -0
- package/aws/s3cache/updateCache.js +24 -0
- package/aws/ses/SimpleEmail.d.ts +51 -0
- package/aws/ses/SimpleEmail.js +114 -0
- package/aws/ses/initClient.d.ts +10 -0
- package/aws/ses/initClient.js +19 -0
- package/aws/sqs/addToQueue.d.ts +27 -0
- package/aws/sqs/addToQueue.js +26 -0
- package/aws/sqs/deleteFromQueue.d.ts +10 -0
- package/aws/sqs/deleteFromQueue.js +15 -0
- package/aws/sqs/initClient.d.ts +10 -0
- package/aws/sqs/initClient.js +19 -0
- package/aws/sqs/isEventSqs.js +13 -0
- package/aws/ssm/getParameter.d.ts +10 -0
- package/aws/ssm/getParameter.js +40 -0
- package/aws/ssm/initClient.d.ts +10 -0
- package/aws/ssm/initClient.js +19 -0
- package/axios/delete.d.ts +11 -0
- package/axios/delete.js +43 -0
- package/axios/get.d.ts +10 -0
- package/axios/get.js +39 -0
- package/axios/post.d.ts +11 -0
- package/axios/post.js +39 -0
- package/boolean/getBoolean.d.ts +7 -0
- package/boolean/getBoolean.js +16 -0
- package/brightData/getCustomerId.d.ts +10 -0
- package/brightData/getCustomerId.js +11 -0
- package/brightData/getZone.d.ts +9 -0
- package/brightData/getZone.js +10 -0
- package/brightData/param.d.ts +9 -0
- package/brightData/param.js +3 -0
- package/brightData/serpApi/buildGoogleSerpUrl.d.ts +32 -0
- package/brightData/serpApi/buildGoogleSerpUrl.js +115 -0
- package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +22 -0
- package/brightData/serpApi/buildGoogleTrendsUrl.js +60 -0
- package/brightData/serpApi/getAsyncRequestId.d.ts +14 -0
- package/brightData/serpApi/getAsyncRequestId.js +50 -0
- package/brightData/serpApi/getAsyncResults.d.ts +12 -0
- package/brightData/serpApi/getAsyncResults.js +49 -0
- package/brightData/serpApi/getRealtime.d.ts +10 -0
- package/brightData/serpApi/getRealtime.js +35 -0
- package/brightData/serpApi/type.d.ts +11 -0
- package/brightData/serpApi/type.js +14 -0
- package/brightData/webScraperIde/getBatch.d.ts +14 -0
- package/brightData/webScraperIde/getBatch.js +34 -0
- package/brightData/webScraperIde/getRealtime.d.ts +13 -0
- package/brightData/webScraperIde/getRealtime.js +64 -0
- package/class/BaseClass.d.ts +31 -0
- package/class/BaseClass.js +50 -0
- package/crud/index.d.ts +6 -0
- package/crud/index.js +10 -0
- package/crypto/getDecrypt.d.ts +10 -0
- package/crypto/getDecrypt.js +13 -0
- package/crypto/getEncrypt.d.ts +10 -0
- package/crypto/getEncrypt.js +13 -0
- package/crypto/getRandom.d.ts +8 -0
- package/crypto/getRandom.js +12 -0
- package/crypto/getSha256.d.ts +8 -0
- package/crypto/getSha256.js +17 -0
- package/date/format.d.ts +10 -0
- package/date/format.js +21 -0
- package/date/getDate.d.ts +14 -0
- package/date/getDate.js +138 -0
- package/date/getDatesBetween.d.ts +13 -0
- package/date/getDatesBetween.js +54 -0
- package/date/getDurationHours.d.ts +9 -0
- package/date/getDurationHours.js +24 -0
- package/date/getDurationMinutes.d.ts +9 -0
- package/date/getDurationMinutes.js +22 -0
- package/date/getFinancialYear.d.ts +9 -0
- package/date/getFinancialYear.js +52 -0
- package/date/getFinancialYearToDate.d.ts +7 -0
- package/date/getFinancialYearToDate.js +20 -0
- package/date/getFinancialYearToYesterday.d.ts +7 -0
- package/date/getFinancialYearToYesterday.js +20 -0
- package/date/getFinancialYearWeeks.d.ts +9 -0
- package/date/getFinancialYearWeeks.js +33 -0
- package/date/getLastWeek.d.ts +10 -0
- package/date/getLastWeek.js +34 -0
- package/date/getMax.d.ts +13 -0
- package/date/getMax.js +24 -0
- package/date/getMidnight.d.ts +10 -0
- package/date/getMidnight.js +13 -0
- package/date/getMin.d.ts +13 -0
- package/date/getMin.js +24 -0
- package/date/getMonday.d.ts +15 -0
- package/date/getMonday.js +46 -0
- package/date/getNumber.d.ts +7 -0
- package/date/getNumber.js +20 -0
- package/date/getPredefinedTimeframe.d.ts +8 -0
- package/date/getPredefinedTimeframe.js +24 -0
- package/date/getSunday.d.ts +15 -0
- package/date/getSunday.js +42 -0
- package/date/getThisWeek.d.ts +10 -0
- package/date/getThisWeek.js +36 -0
- package/date/getTimeZoned.d.ts +13 -0
- package/date/getTimeZoned.js +55 -0
- package/date/getToday.d.ts +9 -0
- package/date/getToday.js +24 -0
- package/date/getTodayYmd.d.ts +5 -0
- package/date/getTodayYmd.js +21 -0
- package/date/getTodayYmdhis.d.ts +5 -0
- package/date/getTodayYmdhis.js +21 -0
- package/date/getTwoWeeksAgo.d.ts +10 -0
- package/date/getTwoWeeksAgo.js +36 -0
- package/date/getWeeksAgo.d.ts +13 -0
- package/date/getWeeksAgo.js +25 -0
- package/date/getYesterday.d.ts +9 -0
- package/date/getYesterday.js +52 -0
- package/date/index.d.ts +55 -0
- package/date/index.js +36 -0
- package/date/isDateValid.d.ts +7 -0
- package/date/isDateValid.js +20 -0
- package/date/isLastWeek.d.ts +6 -0
- package/date/isLastWeek.js +14 -0
- package/date/isThisWeek.d.ts +6 -0
- package/date/isThisWeek.js +14 -0
- package/date/parseExcelDate.d.ts +8 -0
- package/date/parseExcelDate.js +19 -0
- package/environment/getEnvironment.d.ts +6 -0
- package/environment/getEnvironment.js +43 -0
- package/environment/index.d.ts +9 -0
- package/environment/index.js +14 -0
- package/environment/isAws.d.ts +5 -0
- package/environment/isAws.js +8 -0
- package/environment/isDevelopment.d.ts +2 -0
- package/environment/isDevelopment.js +9 -0
- package/environment/isLocalhost.d.ts +5 -0
- package/environment/isLocalhost.js +25 -0
- package/environment/isProduction.d.ts +2 -0
- package/environment/isProduction.js +9 -0
- package/environment/isStaging.d.ts +2 -0
- package/environment/isStaging.js +9 -0
- package/environment/isVercel.d.ts +5 -0
- package/environment/isVercel.js +7 -0
- package/eskimi/ageGroups.d.ts +5 -0
- package/eskimi/ageGroups.js +41 -0
- package/eskimi/campaign.d.ts +19 -0
- package/eskimi/campaign.js +2 -0
- package/eskimi/devices.d.ts +5 -0
- package/eskimi/devices.js +13 -0
- package/eskimi/endpoints.d.ts +16 -0
- package/eskimi/endpoints.js +18 -0
- package/eskimi/genders.d.ts +5 -0
- package/eskimi/genders.js +13 -0
- package/eskimi/getAccessToken.d.ts +9 -0
- package/eskimi/getAccessToken.js +23 -0
- package/eskimi/getAgeGroup.d.ts +7 -0
- package/eskimi/getAgeGroup.js +17 -0
- package/eskimi/getCampaignIds.d.ts +7 -0
- package/eskimi/getCampaignIds.js +12 -0
- package/eskimi/getData.d.ts +8 -0
- package/eskimi/getData.js +23 -0
- package/eskimi/getDevice.d.ts +7 -0
- package/eskimi/getDevice.js +17 -0
- package/eskimi/getGender.d.ts +7 -0
- package/eskimi/getGender.js +17 -0
- package/file/createDirectory.d.ts +9 -0
- package/file/createDirectory.js +16 -0
- package/file/writeFile.d.ts +1 -0
- package/file/writeFile.js +3 -0
- package/global/forceUpdate.d.ts +8 -0
- package/global/forceUpdate.js +25 -0
- package/global/init.d.ts +10 -0
- package/global/init.js +18 -0
- package/global/isSet.d.ts +8 -0
- package/global/isSet.js +9 -0
- package/global/maxCache.d.ts +8 -0
- package/global/maxCache.js +17 -0
- package/global/read.d.ts +8 -0
- package/global/read.js +30 -0
- package/google/bigQuery/IsTableExists.d.ts +11 -0
- package/google/bigQuery/IsTableExists.js +25 -0
- package/google/bigQuery/createDataset.d.ts +11 -0
- package/google/bigQuery/createDataset.js +22 -0
- package/google/bigQuery/createTable.d.ts +12 -0
- package/google/bigQuery/createTable.js +31 -0
- package/google/bigQuery/getClient.d.ts +9 -0
- package/google/bigQuery/getClient.js +18 -0
- package/google/bigQuery/getDatasets.d.ts +13 -0
- package/google/bigQuery/getDatasets.js +27 -0
- package/google/bigQuery/getTables.d.ts +12 -0
- package/google/bigQuery/getTables.js +25 -0
- package/google/bigQuery/initClient.d.ts +11 -0
- package/google/bigQuery/initClient.js +29 -0
- package/google/bigQuery/isDatasetExists.d.ts +11 -0
- package/google/bigQuery/isDatasetExists.js +25 -0
- package/google/bigQuery/loadData.d.ts +18 -0
- package/google/bigQuery/loadData.js +32 -0
- package/google/bigQuery/query.d.ts +19 -0
- package/google/bigQuery/query.js +15 -0
- package/google/getConfig.d.ts +20 -0
- package/google/getConfig.js +23 -0
- package/google/sheets/getAssociatedData.d.ts +16 -0
- package/google/sheets/getAssociatedData.js +53 -0
- package/google/sheets/getBatchData.d.ts +18 -0
- package/google/sheets/getBatchData.js +19 -0
- package/google/sheets/initClient.d.ts +11 -0
- package/google/sheets/initClient.js +25 -0
- package/google/sheets/isCellNa.d.ts +7 -0
- package/google/sheets/isCellNa.js +7 -0
- package/google/storage/copyToCloud.d.ts +11 -0
- package/google/storage/copyToCloud.js +18 -0
- package/google/storage/getClient.d.ts +8 -0
- package/google/storage/getClient.js +18 -0
- package/google/storage/initClient.d.ts +12 -0
- package/google/storage/initClient.js +29 -0
- package/google/storage/isFileExists.d.ts +10 -0
- package/google/storage/isFileExists.js +19 -0
- package/google/storage/writeFile.d.ts +11 -0
- package/google/storage/writeFile.js +37 -0
- package/googleAds/getCustomer.d.ts +8 -0
- package/googleAds/getCustomer.js +14 -0
- package/googleAds/initClient.d.ts +16 -0
- package/googleAds/initClient.js +25 -0
- package/googleAds/keywordPlanner/index.d.ts +238 -0
- package/googleAds/keywordPlanner/index.js +244 -0
- package/googleAds/keywordPlanner/request.d.ts +18 -0
- package/googleAds/keywordPlanner/request.js +13 -0
- package/googleAds/keywordPlanner/response.d.ts +25 -0
- package/googleAds/keywordPlanner/response.js +2 -0
- package/initClients.d.ts +43 -0
- package/initClients.js +131 -0
- package/json/getJsonNewline.d.ts +5 -0
- package/json/getJsonNewline.js +17 -0
- package/json/isJson.d.ts +8 -0
- package/json/isJson.js +20 -0
- package/littleWarden/getUrlStatus.d.ts +9 -0
- package/littleWarden/getUrlStatus.js +21 -0
- package/littleWarden/index.d.ts +5 -0
- package/littleWarden/index.js +9 -0
- package/littleWarden/isAllGood.d.ts +7 -0
- package/littleWarden/isAllGood.js +15 -0
- package/littleWarden/isDanger.d.ts +7 -0
- package/littleWarden/isDanger.js +15 -0
- package/littleWarden/isWarning.d.ts +7 -0
- package/littleWarden/isWarning.js +15 -0
- package/lumar/api/buildRequest.d.ts +15 -0
- package/lumar/api/buildRequest.js +83 -0
- package/lumar/api/filter.d.ts +5 -0
- package/lumar/api/filter.js +2 -0
- package/lumar/api/getData.d.ts +6 -0
- package/lumar/api/getData.js +18 -0
- package/lumar/api/initClient.d.ts +13 -0
- package/lumar/api/initClient.js +38 -0
- package/lumar/api/operands.d.ts +11 -0
- package/lumar/api/operands.js +13 -0
- package/lumar/api/orders.d.ts +9 -0
- package/lumar/api/orders.js +7 -0
- package/lumar/api/reports.d.ts +11 -0
- package/lumar/api/reports.js +13 -0
- package/lumar/graphql/columns.d.ts +29 -0
- package/lumar/graphql/columns.js +31 -0
- package/lumar/graphql/getData.d.ts +9 -0
- package/lumar/graphql/getData.js +26 -0
- package/lumar/graphql/getReportKey.d.ts +9 -0
- package/lumar/graphql/getReportKey.js +9 -0
- package/lumar/graphql/initClient.d.ts +12 -0
- package/lumar/graphql/initClient.js +38 -0
- package/lumar/graphql/operands.d.ts +16 -0
- package/lumar/graphql/operands.js +18 -0
- package/lumar/graphql/queries/crawl.d.ts +5 -0
- package/lumar/graphql/queries/crawl.js +2 -0
- package/lumar/graphql/queries/getCrawls.d.ts +18 -0
- package/lumar/graphql/queries/getCrawls.js +33 -0
- package/lumar/graphql/queries/getReportDifferences.d.ts +24 -0
- package/lumar/graphql/queries/getReportDifferences.js +40 -0
- package/lumar/graphql/queries/getRows.d.ts +38 -0
- package/lumar/graphql/queries/getRows.js +57 -0
- package/lumar/graphql/queries/getTotals.d.ts +25 -0
- package/lumar/graphql/queries/getTotals.js +40 -0
- package/lumar/graphql/queries/row.d.ts +157 -0
- package/lumar/graphql/queries/row.js +2 -0
- package/lumar/graphql/reportTemplates.d.ts +68 -0
- package/lumar/graphql/reportTemplates.js +70 -0
- package/lumar/graphql/reportTypes.d.ts +7 -0
- package/lumar/graphql/reportTypes.js +9 -0
- package/myTarget/getAccessToken.d.ts +9 -0
- package/myTarget/getAccessToken.js +23 -0
- package/myTarget/request.d.ts +9 -0
- package/myTarget/request.js +23 -0
- package/nextAuth/index.d.ts +5 -0
- package/nextAuth/index.js +9 -0
- package/nextAuth/isSessionReady.d.ts +4 -0
- package/nextAuth/isSessionReady.js +12 -0
- package/nextJs/getIp.d.ts +7 -0
- package/nextJs/getIp.js +13 -0
- package/nextJs/getUserAgent.d.ts +7 -0
- package/nextJs/getUserAgent.js +7 -0
- package/number/format.d.ts +11 -0
- package/number/format.js +23 -0
- package/number/getCurrency.d.ts +10 -0
- package/number/getCurrency.js +20 -0
- package/number/getDecimal.d.ts +9 -0
- package/number/getDecimal.js +16 -0
- package/number/getDivide.d.ts +11 -0
- package/number/getDivide.js +26 -0
- package/number/getNumber.d.ts +8 -0
- package/number/getNumber.js +51 -0
- package/number/getPercentIncrease.d.ts +10 -0
- package/number/getPercentIncrease.js +22 -0
- package/object/replaceKeys.d.ts +10 -0
- package/object/replaceKeys.js +30 -0
- package/package.json +55 -413
- package/prisma/getDecimal.d.ts +9 -0
- package/prisma/getDecimal.js +25 -0
- package/prisma/initClient.d.ts +6 -0
- package/prisma/initClient.js +36 -0
- package/snapchat/getAccessToken.d.ts +9 -0
- package/snapchat/getAccessToken.js +35 -0
- package/sorting/byNumberAscending.d.ts +8 -0
- package/sorting/byNumberAscending.js +17 -0
- package/sorting/byNumberDescending.d.ts +8 -0
- package/sorting/byNumberDescending.js +17 -0
- package/sorting/byStringAscending.d.ts +8 -0
- package/sorting/byStringAscending.js +21 -0
- package/sorting/byStringDescending.d.ts +8 -0
- package/sorting/byStringDescending.js +21 -0
- package/stream/sort.d.ts +13 -0
- package/stream/sort.js +50 -0
- package/string/getCapitalised.d.ts +10 -0
- package/string/getCapitalised.js +17 -0
- package/string/getClean.d.ts +18 -0
- package/string/getClean.js +65 -0
- package/string/getDecoded.d.ts +10 -0
- package/string/getDecoded.js +26 -0
- package/string/getFolder.d.ts +8 -0
- package/string/getFolder.js +14 -0
- package/string/getProperCase.d.ts +11 -0
- package/string/getProperCase.js +27 -0
- package/string/getString.d.ts +7 -0
- package/string/getString.js +34 -0
- package/string/getStringFromStream.d.ts +8 -0
- package/string/getStringFromStream.js +16 -0
- package/string/getWithoutAccents.d.ts +9 -0
- package/string/getWithoutAccents.js +16 -0
- package/string/getWithoutHtmlTags.d.ts +9 -0
- package/string/getWithoutHtmlTags.js +15 -0
- package/string/getWithoutPunctuation.d.ts +9 -0
- package/string/getWithoutPunctuation.js +16 -0
- package/string/getWithoutUnderscores.d.ts +8 -0
- package/string/getWithoutUnderscores.js +14 -0
- package/string/getWithoutWhitespaces.d.ts +9 -0
- package/string/getWithoutWhitespaces.js +16 -0
- package/swr/isAllData.d.ts +7 -0
- package/swr/isAllData.js +19 -0
- package/swr/isAnyError.d.ts +7 -0
- package/swr/isAnyError.js +19 -0
- package/swr/isAnyLoading.d.ts +7 -0
- package/swr/isAnyLoading.js +21 -0
- package/swr/isData.d.ts +7 -0
- package/swr/isData.js +9 -0
- package/swr/isError.d.ts +7 -0
- package/swr/isError.js +7 -0
- package/swr/isLoading.d.ts +7 -0
- package/swr/isLoading.js +12 -0
- package/upTimeRobot/getMonitors.js +33 -0
- package/upTimeRobot/logTypes.d.ts +7 -0
- package/upTimeRobot/logTypes.js +9 -0
- package/upTimeRobot/monitorStatuses.d.ts +8 -0
- package/upTimeRobot/monitorStatuses.js +10 -0
- package/upTimeRobot/monitorSubTypes.d.ts +10 -0
- package/upTimeRobot/monitorSubTypes.js +12 -0
- package/upTimeRobot/monitorTypes.d.ts +8 -0
- package/upTimeRobot/monitorTypes.js +10 -0
- package/upTimeRobot/requestStatuses.d.ts +5 -0
- package/upTimeRobot/requestStatuses.js +7 -0
- package/url/buildParameters.d.ts +8 -0
- package/url/buildParameters.js +22 -0
- package/url/buildRelative.d.ts +8 -0
- package/url/buildRelative.js +13 -0
- package/url/buildUrl.d.ts +10 -0
- package/url/buildUrl.js +29 -0
- package/url/isAbsolute.d.ts +7 -0
- package/url/isAbsolute.js +15 -0
- package/url/isRelative.d.ts +7 -0
- package/url/isRelative.js +8 -0
- package/url/url.d.ts +6 -0
- package/url/url.js +2 -0
- package/url/writeUrlContents.d.ts +11 -0
- package/url/writeUrlContents.js +72 -0
- package/util/defaultTo.d.ts +10 -0
- package/util/defaultTo.js +43 -0
- package/util/getBrotliCompressed.d.ts +9 -0
- package/util/getBrotliCompressed.js +19 -0
- package/util/getBrotliDecompressed.d.ts +9 -0
- package/util/getBrotliDecompressed.js +20 -0
- package/util/getClean.d.ts +11 -0
- package/util/getClean.js +28 -0
- package/util/getGzipCompressed.d.ts +9 -0
- package/util/getGzipCompressed.js +19 -0
- package/util/getGzipDecompressed.d.ts +9 -0
- package/util/getGzipDecompressed.js +20 -0
- package/util/getWithoutHash.d.ts +8 -0
- package/util/getWithoutHash.js +17 -0
- package/util/getWithoutParameter.d.ts +8 -0
- package/util/getWithoutParameter.js +17 -0
- package/util/isUndefined.d.ts +9 -0
- package/util/isUndefined.js +19 -0
- package/util/promiseChunks.d.ts +10 -0
- package/util/promiseChunks.js +22 -0
- package/util/sleep.d.ts +5 -0
- package/util/sleep.js +6 -0
- package/webWorker/index.d.ts +5 -0
- package/webWorker/index.js +9 -0
- package/xml/getXml.d.ts +5 -0
- package/xml/getXml.js +22 -0
- package/dist/api/ApiResponse.d.mts +0 -73
- package/dist/api/ApiResponse.mjs +0 -91
- package/dist/api/index.d.mts +0 -2
- package/dist/api/index.mjs +0 -13
- package/dist/api/isError.d.mts +0 -9
- package/dist/api/isError.mjs +0 -7
- package/dist/api/isSuccess.d.mts +0 -9
- package/dist/api/isSuccess.mjs +0 -7
- package/dist/api/response.d.mts +0 -2
- package/dist/api/response.mjs +0 -9
- package/dist/array/contains.d.mts +0 -11
- package/dist/array/contains.mjs +0 -7
- package/dist/array/getArray.d.mts +0 -10
- package/dist/array/getArray.mjs +0 -8
- package/dist/atInternet/request.d.mts +0 -31
- package/dist/aws/athenaExpress/initClient.d.mts +0 -15
- package/dist/aws/athenaExpress/initClient.mjs +0 -28
- package/dist/aws/athenaExpress/query.d.mts +0 -10
- package/dist/aws/athenaExpress/query.mjs +0 -13
- package/dist/aws/ec2/initClient.d.mts +0 -14
- package/dist/aws/ec2/initClient.mjs +0 -18
- package/dist/aws/ec2/startInstances.d.mts +0 -13
- package/dist/aws/ec2/startInstances.mjs +0 -17
- package/dist/aws/ec2/stopInstances.d.mts +0 -14
- package/dist/aws/ec2/stopInstances.mjs +0 -18
- package/dist/aws/ecs/getClusters.d.mts +0 -11
- package/dist/aws/ecs/getClusters.mjs +0 -23
- package/dist/aws/ecs/getTaskDefinitions.d.mts +0 -16
- package/dist/aws/ecs/getTaskDefinitions.mjs +0 -26
- package/dist/aws/ecs/getTasks.d.mts +0 -19
- package/dist/aws/ecs/getTasks.mjs +0 -29
- package/dist/aws/ecs/initClient.d.mts +0 -14
- package/dist/aws/ecs/initClient.mjs +0 -18
- package/dist/aws/ecs/runTask.d.mts +0 -19
- package/dist/aws/ecs/runTask.mjs +0 -24
- package/dist/aws/getConfig.d.mts +0 -18
- package/dist/aws/getConfig.mjs +0 -17
- package/dist/aws/glue/initClient.d.mts +0 -13
- package/dist/aws/glue/initClient.mjs +0 -17
- package/dist/aws/glue/invoke.d.mts +0 -11
- package/dist/aws/glue/invoke.mjs +0 -14
- package/dist/aws/isResponse200.d.mts +0 -11
- package/dist/aws/isResponse200.mjs +0 -16
- package/dist/aws/lambda/getHandlerPath.d.mts +0 -7
- package/dist/aws/lambda/getHandlerPath.mjs +0 -6
- package/dist/aws/lambda/initClient.d.mts +0 -13
- package/dist/aws/lambda/initClient.mjs +0 -17
- package/dist/aws/lambda/invoke.d.mts +0 -15
- package/dist/aws/lambda/invoke.mjs +0 -31
- package/dist/aws/s3/copyFile.d.mts +0 -18
- package/dist/aws/s3/copyFile.mjs +0 -15
- package/dist/aws/s3/deleteFile.d.mts +0 -14
- package/dist/aws/s3/deleteFile.mjs +0 -14
- package/dist/aws/s3/deleteFiles.d.mts +0 -14
- package/dist/aws/s3/deleteFiles.mjs +0 -14
- package/dist/aws/s3/deleteFolder.d.mts +0 -14
- package/dist/aws/s3/deleteFolder.mjs +0 -26
- package/dist/aws/s3/getGlueJson.d.mts +0 -12
- package/dist/aws/s3/getGlueJson.mjs +0 -8
- package/dist/aws/s3/getPresignedPost.d.mts +0 -28
- package/dist/aws/s3/getPresignedPost.mjs +0 -19
- package/dist/aws/s3/getSignedUrl.d.mts +0 -19
- package/dist/aws/s3/getSignedUrl.mjs +0 -17
- package/dist/aws/s3/initClient.d.mts +0 -15
- package/dist/aws/s3/initClient.mjs +0 -17
- package/dist/aws/s3/isFileExists.d.mts +0 -11
- package/dist/aws/s3/isFileExists.mjs +0 -21
- package/dist/aws/s3/listFiles.d.mts +0 -14
- package/dist/aws/s3/listFiles.mjs +0 -27
- package/dist/aws/s3/listFilesIteratively.d.mts +0 -11
- package/dist/aws/s3/listFilesIteratively.mjs +0 -40
- package/dist/aws/s3/listFolders.d.mts +0 -14
- package/dist/aws/s3/listFolders.mjs +0 -23
- package/dist/aws/s3/moveFile.d.mts +0 -16
- package/dist/aws/s3/moveFile.mjs +0 -18
- package/dist/aws/s3/readBrotli.d.mts +0 -18
- package/dist/aws/s3/readBrotli.mjs +0 -20
- package/dist/aws/s3/readBuffer.d.mts +0 -19
- package/dist/aws/s3/readBuffer.mjs +0 -29
- package/dist/aws/s3/readFile.d.mts +0 -38
- package/dist/aws/s3/readFile.mjs +0 -64
- package/dist/aws/s3/readGzip.d.mts +0 -18
- package/dist/aws/s3/readGzip.mjs +0 -20
- package/dist/aws/s3/writeBrotli.d.mts +0 -20
- package/dist/aws/s3/writeBrotli.mjs +0 -18
- package/dist/aws/s3/writeFile.d.mts +0 -18
- package/dist/aws/s3/writeFile.mjs +0 -16
- package/dist/aws/s3/writeGzip.d.mts +0 -20
- package/dist/aws/s3/writeGzip.mjs +0 -18
- package/dist/aws/s3/writePresignedPost.d.mts +0 -24
- package/dist/aws/s3/writePresignedPost.mjs +0 -28
- package/dist/aws/s3/writeUrlContents.d.mts +0 -16
- package/dist/aws/s3/writeUrlContents.mjs +0 -19
- package/dist/aws/s3cache/getCache.d.mts +0 -19
- package/dist/aws/s3cache/getCache.mjs +0 -25
- package/dist/aws/s3cache/getKey.d.mts +0 -15
- package/dist/aws/s3cache/getKey.mjs +0 -15
- package/dist/aws/s3cache/index.d.mts +0 -10
- package/dist/aws/s3cache/saveCache.d.mts +0 -16
- package/dist/aws/s3cache/saveCache.mjs +0 -14
- package/dist/aws/s3cache/updateCache.d.mts +0 -18
- package/dist/aws/s3cache/updateCache.mjs +0 -26
- package/dist/aws/ses/SimpleEmail.d.mts +0 -79
- package/dist/aws/ses/SimpleEmail.mjs +0 -122
- package/dist/aws/ses/initClient.d.mts +0 -15
- package/dist/aws/ses/initClient.mjs +0 -17
- package/dist/aws/sqs/addToQueue.d.mts +0 -35
- package/dist/aws/sqs/addToQueue.mjs +0 -20
- package/dist/aws/sqs/deleteFromQueue.d.mts +0 -16
- package/dist/aws/sqs/deleteFromQueue.mjs +0 -15
- package/dist/aws/sqs/index.d.mts +0 -18
- package/dist/aws/sqs/initClient.d.mts +0 -15
- package/dist/aws/sqs/initClient.mjs +0 -17
- package/dist/aws/sqs/isEventSqs.d.mts +0 -1
- package/dist/aws/sqs/isEventSqs.mjs +0 -1
- package/dist/aws/ssm/getParameter.d.mts +0 -16
- package/dist/aws/ssm/getParameter.mjs +0 -22
- package/dist/aws/ssm/initClient.d.mts +0 -15
- package/dist/aws/ssm/initClient.mjs +0 -17
- package/dist/axios/delete.d.mts +0 -14
- package/dist/axios/delete.mjs +0 -25
- package/dist/axios/get.d.mts +0 -16
- package/dist/axios/get.mjs +0 -24
- package/dist/axios/post.d.mts +0 -18
- package/dist/axios/post.mjs +0 -25
- package/dist/boolean/getBoolean.d.mts +0 -11
- package/dist/boolean/getBoolean.mjs +0 -11
- package/dist/brightData/getCustomerId.d.mts +0 -13
- package/dist/brightData/getCustomerId.mjs +0 -10
- package/dist/brightData/getZone.d.mts +0 -12
- package/dist/brightData/getZone.mjs +0 -10
- package/dist/brightData/param.d.mts +0 -11
- package/dist/brightData/param.mjs +0 -4
- package/dist/brightData/serpApi/buildGoogleSerpUrl.d.mts +0 -34
- package/dist/brightData/serpApi/buildGoogleSerpUrl.mjs +0 -100
- package/dist/brightData/serpApi/buildGoogleTrendsUrl.d.mts +0 -24
- package/dist/brightData/serpApi/buildGoogleTrendsUrl.mjs +0 -51
- package/dist/brightData/serpApi/getAsyncRequestId.d.mts +0 -17
- package/dist/brightData/serpApi/getAsyncRequestId.mjs +0 -35
- package/dist/brightData/serpApi/getAsyncResults.d.mts +0 -15
- package/dist/brightData/serpApi/getAsyncResults.mjs +0 -25
- package/dist/brightData/serpApi/getRealtime.d.mts +0 -13
- package/dist/brightData/serpApi/getRealtime.mjs +0 -25
- package/dist/brightData/serpApi/type.d.mts +0 -13
- package/dist/brightData/serpApi/type.mjs +0 -14
- package/dist/brightData/webScraperIde/getBatch.d.mts +0 -17
- package/dist/brightData/webScraperIde/getBatch.mjs +0 -22
- package/dist/brightData/webScraperIde/getRealtime.d.mts +0 -16
- package/dist/brightData/webScraperIde/getRealtime.mjs +0 -44
- package/dist/chunk-y_GBKt04.mjs +0 -5
- package/dist/class/BaseClass.d.mts +0 -45
- package/dist/class/BaseClass.mjs +0 -46
- package/dist/crud/index.d.mts +0 -9
- package/dist/crud/index.mjs +0 -10
- package/dist/crypto/getDecrypt.d.mts +0 -16
- package/dist/crypto/getDecrypt.mjs +0 -13
- package/dist/crypto/getEncrypt.d.mts +0 -16
- package/dist/crypto/getEncrypt.mjs +0 -13
- package/dist/crypto/getRandom.d.mts +0 -12
- package/dist/crypto/getRandom.mjs +0 -10
- package/dist/crypto/getSha256.d.mts +0 -12
- package/dist/crypto/getSha256.mjs +0 -13
- package/dist/date/format.d.mts +0 -13
- package/dist/date/format.mjs +0 -17
- package/dist/date/getDate.d.mts +0 -17
- package/dist/date/getDate.mjs +0 -107
- package/dist/date/getDatesBetween.d.mts +0 -16
- package/dist/date/getDatesBetween.mjs +0 -37
- package/dist/date/getDurationHours.d.mts +0 -11
- package/dist/date/getDurationHours.mjs +0 -24
- package/dist/date/getDurationMinutes.d.mts +0 -11
- package/dist/date/getDurationMinutes.mjs +0 -22
- package/dist/date/getFinancialYear.d.mts +0 -12
- package/dist/date/getFinancialYear.mjs +0 -31
- package/dist/date/getFinancialYearToDate.d.mts +0 -10
- package/dist/date/getFinancialYearToDate.mjs +0 -15
- package/dist/date/getFinancialYearToYesterday.d.mts +0 -10
- package/dist/date/getFinancialYearToYesterday.mjs +0 -15
- package/dist/date/getFinancialYearWeeks.d.mts +0 -12
- package/dist/date/getFinancialYearWeeks.mjs +0 -23
- package/dist/date/getLastWeek.d.mts +0 -16
- package/dist/date/getLastWeek.mjs +0 -30
- package/dist/date/getMax.d.mts +0 -16
- package/dist/date/getMax.mjs +0 -21
- package/dist/date/getMidnight.d.mts +0 -2
- package/dist/date/getMidnight.mjs +0 -11
- package/dist/date/getMin.d.mts +0 -16
- package/dist/date/getMin.mjs +0 -21
- package/dist/date/getMonday.d.mts +0 -18
- package/dist/date/getMonday.mjs +0 -31
- package/dist/date/getNumber.d.mts +0 -10
- package/dist/date/getNumber.mjs +0 -17
- package/dist/date/getPredefinedTimeframe.d.mts +0 -13
- package/dist/date/getPredefinedTimeframe.mjs +0 -15
- package/dist/date/getSunday.d.mts +0 -18
- package/dist/date/getSunday.mjs +0 -27
- package/dist/date/getThisWeek.d.mts +0 -16
- package/dist/date/getThisWeek.mjs +0 -36
- package/dist/date/getTimeZoned.d.mts +0 -2
- package/dist/date/getTimeZoned.mjs +0 -53
- package/dist/date/getToday.d.mts +0 -12
- package/dist/date/getToday.mjs +0 -21
- package/dist/date/getTodayYmd.d.mts +0 -7
- package/dist/date/getTodayYmd.mjs +0 -16
- package/dist/date/getTodayYmdhis.d.mts +0 -7
- package/dist/date/getTodayYmdhis.mjs +0 -16
- package/dist/date/getTwoWeeksAgo.d.mts +0 -16
- package/dist/date/getTwoWeeksAgo.mjs +0 -36
- package/dist/date/getWeeksAgo.d.mts +0 -22
- package/dist/date/getWeeksAgo.mjs +0 -22
- package/dist/date/getYesterday.d.mts +0 -15
- package/dist/date/getYesterday.mjs +0 -24
- package/dist/date/index.d.mts +0 -2
- package/dist/date/index.mjs +0 -36
- package/dist/date/isDateValid.d.mts +0 -11
- package/dist/date/isDateValid.mjs +0 -16
- package/dist/date/isLastWeek.d.mts +0 -12
- package/dist/date/isLastWeek.mjs +0 -11
- package/dist/date/isThisWeek.d.mts +0 -12
- package/dist/date/isThisWeek.mjs +0 -11
- package/dist/date/parseExcelDate.d.mts +0 -12
- package/dist/date/parseExcelDate.mjs +0 -18
- package/dist/environment/getEnvironment.d.mts +0 -9
- package/dist/environment/getEnvironment.mjs +0 -27
- package/dist/environment/index.d.mts +0 -12
- package/dist/environment/index.mjs +0 -14
- package/dist/environment/isAws.d.mts +0 -7
- package/dist/environment/isAws.mjs +0 -8
- package/dist/environment/isDevelopment.d.mts +0 -4
- package/dist/environment/isDevelopment.mjs +0 -6
- package/dist/environment/isLocalhost.d.mts +0 -7
- package/dist/environment/isLocalhost.mjs +0 -15
- package/dist/environment/isProduction.d.mts +0 -4
- package/dist/environment/isProduction.mjs +0 -6
- package/dist/environment/isStaging.d.mts +0 -4
- package/dist/environment/isStaging.mjs +0 -6
- package/dist/environment/isVercel.d.mts +0 -7
- package/dist/environment/isVercel.mjs +0 -7
- package/dist/eskimi/ageGroups.d.mts +0 -7
- package/dist/eskimi/ageGroups.mjs +0 -41
- package/dist/eskimi/campaign.d.mts +0 -22
- package/dist/eskimi/campaign.mjs +0 -1
- package/dist/eskimi/devices.d.mts +0 -7
- package/dist/eskimi/devices.mjs +0 -10
- package/dist/eskimi/endpoints.d.mts +0 -18
- package/dist/eskimi/endpoints.mjs +0 -16
- package/dist/eskimi/genders.d.mts +0 -7
- package/dist/eskimi/genders.mjs +0 -10
- package/dist/eskimi/getAccessToken.d.mts +0 -14
- package/dist/eskimi/getAccessToken.mjs +0 -19
- package/dist/eskimi/getAgeGroup.d.mts +0 -11
- package/dist/eskimi/getAgeGroup.mjs +0 -12
- package/dist/eskimi/getCampaignIds.d.mts +0 -11
- package/dist/eskimi/getCampaignIds.mjs +0 -9
- package/dist/eskimi/getData.d.mts +0 -13
- package/dist/eskimi/getData.mjs +0 -20
- package/dist/eskimi/getDevice.d.mts +0 -11
- package/dist/eskimi/getDevice.mjs +0 -12
- package/dist/eskimi/getGender.d.mts +0 -11
- package/dist/eskimi/getGender.mjs +0 -12
- package/dist/file/createDirectory.d.mts +0 -13
- package/dist/file/createDirectory.mjs +0 -16
- package/dist/file/writeFile.d.mts +0 -1
- package/dist/file/writeFile.mjs +0 -1
- package/dist/getMidnight-Cr5sAuOj.d.mts +0 -12
- package/dist/getTimeZoned-D7uY_mE6.d.mts +0 -15
- package/dist/global/forceUpdate.d.mts +0 -12
- package/dist/global/forceUpdate.mjs +0 -16
- package/dist/global/init.d.mts +0 -16
- package/dist/global/init.mjs +0 -16
- package/dist/global/isSet.d.mts +0 -12
- package/dist/global/isSet.mjs +0 -9
- package/dist/global/maxCache.d.mts +0 -12
- package/dist/global/maxCache.mjs +0 -15
- package/dist/global/read.d.mts +0 -12
- package/dist/global/read.mjs +0 -15
- package/dist/global.d.mts +0 -42
- package/dist/google/bigQuery/IsTableExists.d.mts +0 -17
- package/dist/google/bigQuery/IsTableExists.mjs +0 -19
- package/dist/google/bigQuery/createDataset.d.mts +0 -17
- package/dist/google/bigQuery/createDataset.mjs +0 -15
- package/dist/google/bigQuery/createTable.d.mts +0 -20
- package/dist/google/bigQuery/createTable.mjs +0 -21
- package/dist/google/bigQuery/getClient.d.mts +0 -11
- package/dist/google/bigQuery/getClient.mjs +0 -19
- package/dist/google/bigQuery/getDatasets.d.mts +0 -17
- package/dist/google/bigQuery/getDatasets.mjs +0 -17
- package/dist/google/bigQuery/getTables.d.mts +0 -14
- package/dist/google/bigQuery/getTables.mjs +0 -13
- package/dist/google/bigQuery/initClient.d.mts +0 -17
- package/dist/google/bigQuery/initClient.mjs +0 -27
- package/dist/google/bigQuery/isDatasetExists.d.mts +0 -16
- package/dist/google/bigQuery/isDatasetExists.mjs +0 -20
- package/dist/google/bigQuery/loadData.d.mts +0 -23
- package/dist/google/bigQuery/loadData.mjs +0 -20
- package/dist/google/bigQuery/query.d.mts +0 -24
- package/dist/google/bigQuery/query.mjs +0 -10
- package/dist/google/getConfig.d.mts +0 -24
- package/dist/google/getConfig.mjs +0 -21
- package/dist/google/sheets/getAssociatedData.d.mts +0 -18
- package/dist/google/sheets/getAssociatedData.mjs +0 -35
- package/dist/google/sheets/getBatchData.d.mts +0 -23
- package/dist/google/sheets/getBatchData.mjs +0 -15
- package/dist/google/sheets/initClient.d.mts +0 -16
- package/dist/google/sheets/initClient.mjs +0 -21
- package/dist/google/sheets/isCellNa.d.mts +0 -11
- package/dist/google/sheets/isCellNa.mjs +0 -7
- package/dist/google/storage/copyToCloud.d.mts +0 -18
- package/dist/google/storage/copyToCloud.mjs +0 -10
- package/dist/google/storage/getClient.d.mts +0 -12
- package/dist/google/storage/getClient.mjs +0 -19
- package/dist/google/storage/initClient.d.mts +0 -18
- package/dist/google/storage/initClient.mjs +0 -27
- package/dist/google/storage/isFileExists.d.mts +0 -12
- package/dist/google/storage/isFileExists.mjs +0 -11
- package/dist/google/storage/writeFile.d.mts +0 -13
- package/dist/google/storage/writeFile.mjs +0 -28
- package/dist/googleAds/getCustomer.d.mts +0 -12
- package/dist/googleAds/getCustomer.mjs +0 -13
- package/dist/googleAds/initClient.d.mts +0 -20
- package/dist/googleAds/initClient.mjs +0 -25
- package/dist/googleAds/keywordPlanner/index.d.mts +0 -241
- package/dist/googleAds/keywordPlanner/index.mjs +0 -244
- package/dist/googleAds/keywordPlanner/request.d.mts +0 -21
- package/dist/googleAds/keywordPlanner/request.mjs +0 -13
- package/dist/googleAds/keywordPlanner/response.d.mts +0 -28
- package/dist/googleAds/keywordPlanner/response.mjs +0 -1
- package/dist/index-CiGy7MyK.d.mts +0 -58
- package/dist/index-gGQBTUJU.d.mts +0 -12
- package/dist/initClients.d.mts +0 -46
- package/dist/initClients.mjs +0 -56
- package/dist/json/getJsonNewline.d.mts +0 -9
- package/dist/json/getJsonNewline.mjs +0 -7
- package/dist/json/isJson.d.mts +0 -12
- package/dist/json/isJson.mjs +0 -17
- package/dist/littleWarden/getUrlStatus.d.mts +0 -14
- package/dist/littleWarden/getUrlStatus.mjs +0 -16
- package/dist/littleWarden/index.d.mts +0 -8
- package/dist/littleWarden/index.mjs +0 -9
- package/dist/littleWarden/isAllGood.d.mts +0 -11
- package/dist/littleWarden/isAllGood.mjs +0 -12
- package/dist/littleWarden/isDanger.d.mts +0 -11
- package/dist/littleWarden/isDanger.mjs +0 -12
- package/dist/littleWarden/isWarning.d.mts +0 -11
- package/dist/littleWarden/isWarning.mjs +0 -12
- package/dist/lumar/api/buildRequest.d.mts +0 -28
- package/dist/lumar/api/buildRequest.mjs +0 -58
- package/dist/lumar/api/filter.d.mts +0 -8
- package/dist/lumar/api/filter.mjs +0 -1
- package/dist/lumar/api/getData.d.mts +0 -11
- package/dist/lumar/api/getData.mjs +0 -10
- package/dist/lumar/api/initClient.d.mts +0 -17
- package/dist/lumar/api/initClient.mjs +0 -28
- package/dist/lumar/api/operands.d.mts +0 -13
- package/dist/lumar/api/operands.mjs +0 -13
- package/dist/lumar/api/orders.d.mts +0 -11
- package/dist/lumar/api/orders.mjs +0 -7
- package/dist/lumar/api/reports.d.mts +0 -13
- package/dist/lumar/api/reports.mjs +0 -13
- package/dist/lumar/graphql/columns.d.mts +0 -31
- package/dist/lumar/graphql/columns.mjs +0 -31
- package/dist/lumar/graphql/getData.d.mts +0 -15
- package/dist/lumar/graphql/getData.mjs +0 -18
- package/dist/lumar/graphql/getReportKey.d.mts +0 -14
- package/dist/lumar/graphql/getReportKey.mjs +0 -9
- package/dist/lumar/graphql/initClient.d.mts +0 -16
- package/dist/lumar/graphql/initClient.mjs +0 -34
- package/dist/lumar/graphql/operands.d.mts +0 -18
- package/dist/lumar/graphql/operands.mjs +0 -18
- package/dist/lumar/graphql/queries/crawl.d.mts +0 -8
- package/dist/lumar/graphql/queries/crawl.mjs +0 -1
- package/dist/lumar/graphql/queries/getCrawls.d.mts +0 -23
- package/dist/lumar/graphql/queries/getCrawls.mjs +0 -33
- package/dist/lumar/graphql/queries/getReportDifferences.d.mts +0 -30
- package/dist/lumar/graphql/queries/getReportDifferences.mjs +0 -37
- package/dist/lumar/graphql/queries/getRows.d.mts +0 -50
- package/dist/lumar/graphql/queries/getRows.mjs +0 -57
- package/dist/lumar/graphql/queries/getTotals.d.mts +0 -33
- package/dist/lumar/graphql/queries/getTotals.mjs +0 -40
- package/dist/lumar/graphql/queries/row.d.mts +0 -159
- package/dist/lumar/graphql/queries/row.mjs +0 -1
- package/dist/lumar/graphql/reportTemplates.d.mts +0 -70
- package/dist/lumar/graphql/reportTemplates.mjs +0 -70
- package/dist/lumar/graphql/reportTypes.d.mts +0 -9
- package/dist/lumar/graphql/reportTypes.mjs +0 -9
- package/dist/myTarget/getAccessToken.d.mts +0 -14
- package/dist/myTarget/getAccessToken.mjs +0 -19
- package/dist/myTarget/request.d.mts +0 -15
- package/dist/myTarget/request.mjs +0 -17
- package/dist/nextAuth/index.d.mts +0 -9
- package/dist/nextAuth/index.mjs +0 -9
- package/dist/nextAuth/isSessionReady.d.mts +0 -8
- package/dist/nextAuth/isSessionReady.mjs +0 -10
- package/dist/nextJs/getIp.d.mts +0 -11
- package/dist/nextJs/getIp.mjs +0 -11
- package/dist/nextJs/getUserAgent.d.mts +0 -11
- package/dist/nextJs/getUserAgent.mjs +0 -7
- package/dist/number/format.d.mts +0 -13
- package/dist/number/format.mjs +0 -16
- package/dist/number/getCurrency.d.mts +0 -15
- package/dist/number/getCurrency.mjs +0 -17
- package/dist/number/getDecimal.d.mts +0 -11
- package/dist/number/getDecimal.mjs +0 -11
- package/dist/number/getDivide.d.mts +0 -13
- package/dist/number/getDivide.mjs +0 -17
- package/dist/number/getNumber.d.mts +0 -13
- package/dist/number/getNumber.mjs +0 -23
- package/dist/number/getPercentIncrease.d.mts +0 -16
- package/dist/number/getPercentIncrease.mjs +0 -13
- package/dist/object/replaceKeys.d.mts +0 -15
- package/dist/object/replaceKeys.mjs +0 -27
- package/dist/prisma/getDecimal.d.mts +0 -11
- package/dist/prisma/getDecimal.mjs +0 -17
- package/dist/prisma/initClient.d.mts +0 -8
- package/dist/prisma/initClient.mjs +0 -25
- package/dist/response-CKsarnP-.d.mts +0 -11
- package/dist/snapchat/getAccessToken.d.mts +0 -14
- package/dist/snapchat/getAccessToken.mjs +0 -29
- package/dist/sorting/byNumberAscending.d.mts +0 -13
- package/dist/sorting/byNumberAscending.mjs +0 -13
- package/dist/sorting/byNumberDescending.d.mts +0 -13
- package/dist/sorting/byNumberDescending.mjs +0 -13
- package/dist/sorting/byStringAscending.d.mts +0 -13
- package/dist/sorting/byStringAscending.mjs +0 -13
- package/dist/sorting/byStringDescending.d.mts +0 -13
- package/dist/sorting/byStringDescending.mjs +0 -13
- package/dist/stream/sort.d.mts +0 -16
- package/dist/stream/sort.mjs +0 -46
- package/dist/string/getCapitalised.d.mts +0 -15
- package/dist/string/getCapitalised.mjs +0 -13
- package/dist/string/getClean.d.mts +0 -32
- package/dist/string/getClean.mjs +0 -28
- package/dist/string/getDecoded.d.mts +0 -14
- package/dist/string/getDecoded.mjs +0 -19
- package/dist/string/getFolder.d.mts +0 -12
- package/dist/string/getFolder.mjs +0 -10
- package/dist/string/getProperCase.d.mts +0 -13
- package/dist/string/getProperCase.mjs +0 -14
- package/dist/string/getString.d.mts +0 -11
- package/dist/string/getString.mjs +0 -18
- package/dist/string/getStringFromStream.d.mts +0 -12
- package/dist/string/getStringFromStream.mjs +0 -15
- package/dist/string/getWithoutAccents.d.mts +0 -13
- package/dist/string/getWithoutAccents.mjs +0 -11
- package/dist/string/getWithoutHtmlTags.d.mts +0 -13
- package/dist/string/getWithoutHtmlTags.mjs +0 -11
- package/dist/string/getWithoutPunctuation.d.mts +0 -13
- package/dist/string/getWithoutPunctuation.mjs +0 -11
- package/dist/string/getWithoutUnderscores.d.mts +0 -12
- package/dist/string/getWithoutUnderscores.mjs +0 -10
- package/dist/string/getWithoutWhitespaces.d.mts +0 -13
- package/dist/string/getWithoutWhitespaces.mjs +0 -11
- package/dist/swr/isAllData.d.mts +0 -11
- package/dist/swr/isAllData.mjs +0 -12
- package/dist/swr/isAnyError.d.mts +0 -11
- package/dist/swr/isAnyError.mjs +0 -12
- package/dist/swr/isAnyLoading.d.mts +0 -11
- package/dist/swr/isAnyLoading.mjs +0 -12
- package/dist/swr/isData.d.mts +0 -11
- package/dist/swr/isData.mjs +0 -7
- package/dist/swr/isError.d.mts +0 -11
- package/dist/swr/isError.mjs +0 -7
- package/dist/swr/isLoading.d.mts +0 -11
- package/dist/swr/isLoading.mjs +0 -9
- package/dist/upTimeRobot/getMonitors.d.mts +0 -1
- package/dist/upTimeRobot/getMonitors.mjs +0 -3
- package/dist/upTimeRobot/logTypes.d.mts +0 -9
- package/dist/upTimeRobot/logTypes.mjs +0 -9
- package/dist/upTimeRobot/monitorStatuses.d.mts +0 -10
- package/dist/upTimeRobot/monitorStatuses.mjs +0 -10
- package/dist/upTimeRobot/monitorSubTypes.d.mts +0 -12
- package/dist/upTimeRobot/monitorSubTypes.mjs +0 -12
- package/dist/upTimeRobot/monitorTypes.d.mts +0 -10
- package/dist/upTimeRobot/monitorTypes.mjs +0 -10
- package/dist/upTimeRobot/requestStatuses.d.mts +0 -7
- package/dist/upTimeRobot/requestStatuses.mjs +0 -7
- package/dist/url/buildParameters.d.mts +0 -13
- package/dist/url/buildParameters.mjs +0 -17
- package/dist/url/buildRelative.d.mts +0 -13
- package/dist/url/buildRelative.mjs +0 -13
- package/dist/url/buildUrl.d.mts +0 -16
- package/dist/url/buildUrl.mjs +0 -18
- package/dist/url/isAbsolute.d.mts +0 -11
- package/dist/url/isAbsolute.mjs +0 -14
- package/dist/url/isRelative.d.mts +0 -11
- package/dist/url/isRelative.mjs +0 -7
- package/dist/url/url.d.mts +0 -9
- package/dist/url/url.mjs +0 -1
- package/dist/url/writeUrlContents.d.mts +0 -16
- package/dist/url/writeUrlContents.mjs +0 -30
- package/dist/util/defaultTo.d.mts +0 -12
- package/dist/util/defaultTo.mjs +0 -20
- package/dist/util/getBrotliCompressed.d.mts +0 -14
- package/dist/util/getBrotliCompressed.mjs +0 -15
- package/dist/util/getBrotliDecompressed.d.mts +0 -14
- package/dist/util/getBrotliDecompressed.mjs +0 -17
- package/dist/util/getClean.d.mts +0 -18
- package/dist/util/getClean.mjs +0 -15
- package/dist/util/getGzipCompressed.d.mts +0 -14
- package/dist/util/getGzipCompressed.mjs +0 -15
- package/dist/util/getGzipDecompressed.d.mts +0 -14
- package/dist/util/getGzipDecompressed.mjs +0 -17
- package/dist/util/getWithoutHash.d.mts +0 -12
- package/dist/util/getWithoutHash.mjs +0 -14
- package/dist/util/getWithoutParameter.d.mts +0 -12
- package/dist/util/getWithoutParameter.mjs +0 -14
- package/dist/util/isUndefined.d.mts +0 -14
- package/dist/util/isUndefined.mjs +0 -15
- package/dist/util/promiseChunks.d.mts +0 -12
- package/dist/util/promiseChunks.mjs +0 -19
- package/dist/util/sleep.d.mts +0 -7
- package/dist/util/sleep.mjs +0 -6
- package/dist/webWorker/index.d.mts +0 -8
- package/dist/webWorker/index.mjs +0 -9
- package/dist/xml/getXml.d.mts +0 -7
- package/dist/xml/getXml.mjs +0 -14
- /package/{dist/atInternet/request.mjs → aws/sqs/isEventSqs.d.ts} +0 -0
- /package/{dist/aws/s3cache/index.mjs → upTimeRobot/getMonitors.d.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getConfig_1 = __importDefault(require("../getConfig"));
|
|
7
|
+
global.googleBigQueryDefault = {
|
|
8
|
+
credentials: null,
|
|
9
|
+
projectId: null,
|
|
10
|
+
};
|
|
11
|
+
global.googleBigQueryClient = null;
|
|
12
|
+
/**
|
|
13
|
+
* Initialise the Big Query client.
|
|
14
|
+
* It's possible to use multiple clients, so we set one up per project id.
|
|
15
|
+
*/
|
|
16
|
+
const initClient = ({ parameter, projectId }) => {
|
|
17
|
+
if (!global.googleBigQueryClient) {
|
|
18
|
+
const { BigQuery } = require('@google-cloud/bigquery');
|
|
19
|
+
const formattedConfig = (0, getConfig_1.default)({ parameter });
|
|
20
|
+
global.googleBigQueryDefault.credentials = formattedConfig;
|
|
21
|
+
global.googleBigQueryDefault.projectId = projectId;
|
|
22
|
+
global.googleBigQueryClient = new BigQuery({
|
|
23
|
+
credentials: global.googleBigQueryDefault.credentials,
|
|
24
|
+
location: "europe-west2",
|
|
25
|
+
projectId: global.googleBigQueryDefault.projectId,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.default = initClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type IsDatasetExists = {
|
|
2
|
+
datasetId: string;
|
|
3
|
+
projectId?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Check to see whether a given BigQuery dataset exists.
|
|
7
|
+
* Based off:
|
|
8
|
+
* https://github.com/googleapis/nodejs-bigquery/blob/main/samples/getDataset.js
|
|
9
|
+
*/
|
|
10
|
+
declare const isDatasetExists: ({ datasetId, projectId }: IsDatasetExists) => Promise<boolean>;
|
|
11
|
+
export default isDatasetExists;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
7
|
+
/**
|
|
8
|
+
* Check to see whether a given BigQuery dataset exists.
|
|
9
|
+
* Based off:
|
|
10
|
+
* https://github.com/googleapis/nodejs-bigquery/blob/main/samples/getDataset.js
|
|
11
|
+
*/
|
|
12
|
+
const isDatasetExists = async ({ datasetId, projectId }) => {
|
|
13
|
+
let response;
|
|
14
|
+
let client = (0, getClient_1.default)({ projectId });
|
|
15
|
+
try {
|
|
16
|
+
await client.dataset(datasetId)
|
|
17
|
+
.get();
|
|
18
|
+
response = true;
|
|
19
|
+
}
|
|
20
|
+
catch (exception) {
|
|
21
|
+
response = false;
|
|
22
|
+
}
|
|
23
|
+
return response;
|
|
24
|
+
};
|
|
25
|
+
exports.default = isDatasetExists;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type LoadData = {
|
|
2
|
+
file: {
|
|
3
|
+
bucket: string;
|
|
4
|
+
key: string;
|
|
5
|
+
metadata: object;
|
|
6
|
+
projectId?: string;
|
|
7
|
+
};
|
|
8
|
+
table: {
|
|
9
|
+
projectId?: string;
|
|
10
|
+
datasetId: string;
|
|
11
|
+
tableId: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Load data into a given table.
|
|
16
|
+
*/
|
|
17
|
+
declare const loadData: ({ file, table }: LoadData) => Promise<void>;
|
|
18
|
+
export default loadData;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const IsTableExists_1 = __importDefault(require("./IsTableExists"));
|
|
7
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
8
|
+
const getClient_2 = __importDefault(require("../storage/getClient"));
|
|
9
|
+
/**
|
|
10
|
+
* Load data into a given table.
|
|
11
|
+
*/
|
|
12
|
+
const loadData = async ({ file, table }) => {
|
|
13
|
+
const tableExists = await (0, IsTableExists_1.default)({
|
|
14
|
+
datasetId: table.datasetId,
|
|
15
|
+
projectId: table.projectId,
|
|
16
|
+
tableId: table.tableId,
|
|
17
|
+
});
|
|
18
|
+
if (tableExists) {
|
|
19
|
+
let bigqueryClient = (0, getClient_1.default)({
|
|
20
|
+
projectId: table.projectId
|
|
21
|
+
});
|
|
22
|
+
let storageClient = (0, getClient_2.default)({
|
|
23
|
+
projectId: file.projectId
|
|
24
|
+
});
|
|
25
|
+
await bigqueryClient
|
|
26
|
+
.dataset(table.datasetId)
|
|
27
|
+
.table(table.tableId)
|
|
28
|
+
.load(storageClient.bucket(file.bucket)
|
|
29
|
+
.file(file.key), file.metadata);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.default = loadData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://cloud.google.com/bigquery/docs/parameterized-queries
|
|
3
|
+
*/
|
|
4
|
+
export type QueryInput = string | {
|
|
5
|
+
query: string;
|
|
6
|
+
location?: string;
|
|
7
|
+
params: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type Query = {
|
|
12
|
+
input: QueryInput;
|
|
13
|
+
projectId?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Build the query and return the data.
|
|
17
|
+
*/
|
|
18
|
+
declare const query: ({ input, projectId }: Query) => Promise<any>;
|
|
19
|
+
export default query;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
7
|
+
/**
|
|
8
|
+
* Build the query and return the data.
|
|
9
|
+
*/
|
|
10
|
+
const query = async ({ input, projectId }) => {
|
|
11
|
+
let client = (0, getClient_1.default)({ projectId });
|
|
12
|
+
const apiResponse = await client.query(input);
|
|
13
|
+
return apiResponse;
|
|
14
|
+
};
|
|
15
|
+
exports.default = query;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Config = {
|
|
2
|
+
type: string;
|
|
3
|
+
project_id: string;
|
|
4
|
+
private_key_id: string;
|
|
5
|
+
private_key: string;
|
|
6
|
+
client_email: string;
|
|
7
|
+
client_id: string;
|
|
8
|
+
auth_uri: string;
|
|
9
|
+
token_uri: string;
|
|
10
|
+
auth_provider_x509_cert_url: string;
|
|
11
|
+
client_x509_cert_url: string;
|
|
12
|
+
};
|
|
13
|
+
export type GetConfig = {
|
|
14
|
+
parameter: Config;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Using the response from Parameter Store and format it ready to be used with Google API.
|
|
18
|
+
*/
|
|
19
|
+
declare const getConfig: ({ parameter }: GetConfig) => Config;
|
|
20
|
+
export default getConfig;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Using the response from Parameter Store and format it ready to be used with Google API.
|
|
5
|
+
*/
|
|
6
|
+
const getConfig = ({ parameter }) => {
|
|
7
|
+
// Format the private key to be in the same format as required by Google
|
|
8
|
+
const privateKey = parameter['private_key'].replace(/\\n/g, '\n');
|
|
9
|
+
const response = {
|
|
10
|
+
type: parameter['type'],
|
|
11
|
+
project_id: parameter['project_id'],
|
|
12
|
+
private_key_id: parameter['private_key_id'],
|
|
13
|
+
private_key: privateKey,
|
|
14
|
+
client_email: parameter['client_email'],
|
|
15
|
+
client_id: parameter['client_id'],
|
|
16
|
+
auth_uri: parameter['auth_uri'],
|
|
17
|
+
token_uri: parameter['token_uri'],
|
|
18
|
+
auth_provider_x509_cert_url: parameter['auth_provider_x509_cert_url'],
|
|
19
|
+
client_x509_cert_url: parameter['client_x509_cert_url'],
|
|
20
|
+
};
|
|
21
|
+
return response;
|
|
22
|
+
};
|
|
23
|
+
exports.default = getConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type GetAssociatedData = {
|
|
2
|
+
spreadsheetId: string;
|
|
3
|
+
ranges: [
|
|
4
|
+
format: string,
|
|
5
|
+
defaultRange: string,
|
|
6
|
+
heading: string,
|
|
7
|
+
data: string
|
|
8
|
+
];
|
|
9
|
+
dateTimeRender: 'FORMATTED_STRING' | 'SERIAL_NUMBER';
|
|
10
|
+
valueRender: 'FORMATTED_VALUE' | 'UNFORMATTED_VALUE' | 'FORMULA';
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Make a batch get to Google Sheets to retrieve the data correctly formatted, with default values provided.
|
|
14
|
+
*/
|
|
15
|
+
declare const getAssociatedData: ({ dateTimeRender, ranges, spreadsheetId, valueRender }: GetAssociatedData) => Promise<object[]>;
|
|
16
|
+
export default getAssociatedData;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getBatchData_1 = __importDefault(require("./getBatchData"));
|
|
7
|
+
/**
|
|
8
|
+
* Make a batch get to Google Sheets to retrieve the data correctly formatted, with default values provided.
|
|
9
|
+
*/
|
|
10
|
+
const getAssociatedData = async ({ dateTimeRender, ranges, spreadsheetId, valueRender }) => {
|
|
11
|
+
// Make the API request
|
|
12
|
+
const apiResponse = await (0, getBatchData_1.default)({
|
|
13
|
+
spreadsheetId,
|
|
14
|
+
ranges,
|
|
15
|
+
dateTimeRender,
|
|
16
|
+
valueRender,
|
|
17
|
+
});
|
|
18
|
+
let template = [];
|
|
19
|
+
let response = [];
|
|
20
|
+
// Missing ranges or too many ranges
|
|
21
|
+
if (4 !== apiResponse.valueRanges.length) {
|
|
22
|
+
throw new Error("Associated data response length must be 4.");
|
|
23
|
+
}
|
|
24
|
+
// Get the first data range
|
|
25
|
+
const initialRangeLength = apiResponse.valueRanges[0].values[0].length;
|
|
26
|
+
// Loop through the headings
|
|
27
|
+
for (let i = 0; i < initialRangeLength; i++) {
|
|
28
|
+
template.push({
|
|
29
|
+
format: apiResponse.valueRanges[0].values[0][i],
|
|
30
|
+
default: apiResponse.valueRanges[1].values[0][i],
|
|
31
|
+
heading: apiResponse.valueRanges[2].values[0][i],
|
|
32
|
+
index: i,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// console.log('template', template);
|
|
36
|
+
// Loop through each row of data
|
|
37
|
+
if (undefined !== apiResponse.valueRanges[3].values) {
|
|
38
|
+
for (let rowIndex = 0; rowIndex < apiResponse.valueRanges[3].values.length; rowIndex++) {
|
|
39
|
+
let row = {};
|
|
40
|
+
// Loop through each column within the row
|
|
41
|
+
for (let columnIndex = 0; columnIndex < apiResponse.valueRanges[3].values[rowIndex].length; columnIndex++) {
|
|
42
|
+
const refValue = apiResponse.valueRanges[3].values[rowIndex][columnIndex];
|
|
43
|
+
const value = ('' === refValue ? template[columnIndex]['default'] : refValue);
|
|
44
|
+
// Add this to our row
|
|
45
|
+
row[template[columnIndex]['heading']] = value;
|
|
46
|
+
}
|
|
47
|
+
// Add the row to our response
|
|
48
|
+
response.push(row);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return response;
|
|
52
|
+
};
|
|
53
|
+
exports.default = getAssociatedData;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type BatchData = {
|
|
2
|
+
spreadsheetId: string;
|
|
3
|
+
valueRanges: {
|
|
4
|
+
range: string;
|
|
5
|
+
majorDimension: 'rows' | 'dimension';
|
|
6
|
+
values: [
|
|
7
|
+
any[]
|
|
8
|
+
];
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
type GetBatchData = {
|
|
12
|
+
spreadsheetId: string;
|
|
13
|
+
ranges: string[];
|
|
14
|
+
dateTimeRender?: string;
|
|
15
|
+
valueRender?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const getBatchData: ({ spreadsheetId, ranges, dateTimeRender, valueRender, }: GetBatchData) => Promise<BatchData>;
|
|
18
|
+
export default getBatchData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getBatchData = async ({ spreadsheetId, ranges, dateTimeRender = 'FORMATTED_STRING', valueRender = 'UNFORMATTED_VALUE', }) => {
|
|
4
|
+
const googleApisSheets = require('@googleapis/sheets');
|
|
5
|
+
const request = {
|
|
6
|
+
auth: global.googleSheetsClient,
|
|
7
|
+
dateTimeRenderOption: dateTimeRender,
|
|
8
|
+
ranges: ranges,
|
|
9
|
+
spreadsheetId: spreadsheetId,
|
|
10
|
+
valueRenderOption: valueRender,
|
|
11
|
+
};
|
|
12
|
+
// Make the API request
|
|
13
|
+
const apiResponse = (await googleApisSheets.sheets('v4')
|
|
14
|
+
.spreadsheets
|
|
15
|
+
.values
|
|
16
|
+
.batchGet(request));
|
|
17
|
+
return apiResponse.data;
|
|
18
|
+
};
|
|
19
|
+
exports.default = getBatchData;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Config } from '../getConfig';
|
|
2
|
+
type InitClient = {
|
|
3
|
+
parameter: Config;
|
|
4
|
+
};
|
|
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
|
+
declare const initClient: ({ parameter }: InitClient) => void;
|
|
11
|
+
export default initClient;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getConfig_1 = __importDefault(require("../getConfig"));
|
|
7
|
+
global.googleSheetsClient = null;
|
|
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
|
+
const initClient = ({ parameter }) => {
|
|
14
|
+
if (!global.googleSheetsClient) {
|
|
15
|
+
const googleApisSheets = require('@googleapis/sheets');
|
|
16
|
+
const formattedConfig = (0, getConfig_1.default)({ parameter });
|
|
17
|
+
global.googleSheetsClient = new googleApisSheets.auth.GoogleAuth({
|
|
18
|
+
credentials: formattedConfig,
|
|
19
|
+
scopes: [
|
|
20
|
+
'https://www.googleapis.com/auth/spreadsheets',
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.default = initClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type CopyToCloud = {
|
|
2
|
+
bucket: string;
|
|
3
|
+
localFile: string;
|
|
4
|
+
options?: object;
|
|
5
|
+
projectId?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Copy a local file to Google Cloud Storage.
|
|
9
|
+
*/
|
|
10
|
+
export declare const copyToCloud: ({ bucket, localFile, options, projectId }: CopyToCloud) => Promise<any>;
|
|
11
|
+
export default copyToCloud;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.copyToCloud = void 0;
|
|
7
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
8
|
+
/**
|
|
9
|
+
* Copy a local file to Google Cloud Storage.
|
|
10
|
+
*/
|
|
11
|
+
const copyToCloud = async ({ bucket, localFile, options, projectId }) => {
|
|
12
|
+
const bucketInstance = (0, getClient_1.default)({ projectId })
|
|
13
|
+
.bucket(bucket);
|
|
14
|
+
const apiResponse = await bucketInstance.upload(localFile, options);
|
|
15
|
+
return apiResponse;
|
|
16
|
+
};
|
|
17
|
+
exports.copyToCloud = copyToCloud;
|
|
18
|
+
exports.default = exports.copyToCloud;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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 (undefined !== 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: projectId,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return client;
|
|
17
|
+
};
|
|
18
|
+
exports.default = getClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Config } from '../getConfig';
|
|
2
|
+
type InitClient = {
|
|
3
|
+
parameter: Config;
|
|
4
|
+
projectId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Initialise the Google Sheets instance using the separate service method.
|
|
8
|
+
* https://github.com/googleapis/google-api-nodejs-client
|
|
9
|
+
* Library: @googleapis/sheets
|
|
10
|
+
*/
|
|
11
|
+
declare const initClient: ({ parameter, projectId }: InitClient) => void;
|
|
12
|
+
export default initClient;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getConfig_1 = __importDefault(require("../getConfig"));
|
|
7
|
+
global.googleStorageDefault = {
|
|
8
|
+
credentials: null,
|
|
9
|
+
projectId: null,
|
|
10
|
+
};
|
|
11
|
+
global.googleStorageClient = null;
|
|
12
|
+
/**
|
|
13
|
+
* Initialise the Google Sheets instance using the separate service method.
|
|
14
|
+
* https://github.com/googleapis/google-api-nodejs-client
|
|
15
|
+
* Library: @googleapis/sheets
|
|
16
|
+
*/
|
|
17
|
+
const initClient = ({ parameter, projectId }) => {
|
|
18
|
+
if (!global.googleStorageClient) {
|
|
19
|
+
const { Storage } = require('@google-cloud/storage');
|
|
20
|
+
const formattedConfig = (0, getConfig_1.default)({ parameter });
|
|
21
|
+
global.googleStorageDefault.credentials = formattedConfig;
|
|
22
|
+
global.googleStorageDefault.projectId = projectId;
|
|
23
|
+
global.googleStorageClient = new Storage({
|
|
24
|
+
credentials: formattedConfig,
|
|
25
|
+
projectId: projectId,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.default = initClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
7
|
+
/**
|
|
8
|
+
* Check to see if a file exists but don't get the contents.
|
|
9
|
+
*/
|
|
10
|
+
const isFileExists = async (props) => {
|
|
11
|
+
const { bucket, key, projectId, } = props;
|
|
12
|
+
const googleFile = await (0, getClient_1.default)({ projectId })
|
|
13
|
+
.bucket(bucket)
|
|
14
|
+
.file(key)
|
|
15
|
+
.exists();
|
|
16
|
+
const response = googleFile?.[0];
|
|
17
|
+
return response;
|
|
18
|
+
};
|
|
19
|
+
exports.default = isFileExists;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.writeFile = void 0;
|
|
7
|
+
const getClient_1 = __importDefault(require("./getClient"));
|
|
8
|
+
/**
|
|
9
|
+
* Write a file to Google Cloud Storage.
|
|
10
|
+
*/
|
|
11
|
+
const writeFile = async (props) => {
|
|
12
|
+
const { bucket, contentType, data, key, projectId, ...options } = props;
|
|
13
|
+
const stream = require("stream");
|
|
14
|
+
const dataStream = new stream.PassThrough();
|
|
15
|
+
const googleFile = (0, getClient_1.default)({ projectId })
|
|
16
|
+
.bucket(bucket)
|
|
17
|
+
.file(key);
|
|
18
|
+
dataStream.push(data);
|
|
19
|
+
dataStream.push(null);
|
|
20
|
+
return await new Promise((resolve, reject) => {
|
|
21
|
+
dataStream.pipe(googleFile.createWriteStream({
|
|
22
|
+
contentType: "auto",
|
|
23
|
+
resumable: false,
|
|
24
|
+
validation: false,
|
|
25
|
+
metadata: {},
|
|
26
|
+
...options,
|
|
27
|
+
}))
|
|
28
|
+
.on("error", (error) => {
|
|
29
|
+
reject(error);
|
|
30
|
+
})
|
|
31
|
+
.on("finish", () => {
|
|
32
|
+
resolve(true);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.writeFile = writeFile;
|
|
37
|
+
exports.default = exports.writeFile;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Return the Google Ads Client with the specified customer set.
|
|
5
|
+
*/
|
|
6
|
+
const getCustomer = async ({ customerId }) => {
|
|
7
|
+
const customer = global.googleAdsClient.instance.Customer({
|
|
8
|
+
customer_id: customerId,
|
|
9
|
+
login_customer_id: global.googleAdsClient.mccAccountId,
|
|
10
|
+
refresh_token: global.googleAdsClient.refreshToken,
|
|
11
|
+
});
|
|
12
|
+
return customer;
|
|
13
|
+
};
|
|
14
|
+
exports.default = getCustomer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type GoogleAdsParameter = {
|
|
2
|
+
clientId: string;
|
|
3
|
+
clientSecret: string;
|
|
4
|
+
developerToken: string;
|
|
5
|
+
mccAccountId: string;
|
|
6
|
+
refreshToken: string;
|
|
7
|
+
};
|
|
8
|
+
type InitClient = {
|
|
9
|
+
parameter: GoogleAdsParameter;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Shorthand function to get the Google Ads Client.
|
|
13
|
+
* Library: google-ads-api
|
|
14
|
+
*/
|
|
15
|
+
declare const initClient: ({ parameter }: InitClient) => Promise<void>;
|
|
16
|
+
export default initClient;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
+
// Create a new client instance
|
|
16
|
+
global.googleAdsClient.instance = new GoogleAdsApi({
|
|
17
|
+
client_id: parameter.clientId,
|
|
18
|
+
client_secret: parameter.clientSecret,
|
|
19
|
+
developer_token: parameter.developerToken,
|
|
20
|
+
});
|
|
21
|
+
global.googleAdsClient.mccAccountId = parameter.mccAccountId;
|
|
22
|
+
global.googleAdsClient.refreshToken = parameter.refreshToken;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.default = initClient;
|