@8ms/helpers 1.38.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deploy_npmjs.yml +22 -14
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.9.2.cjs +942 -0
- package/.yarnrc.yml +2 -0
- package/README.md +12 -0
- package/package.json +175 -46
- package/api/ApiResponse.d.ts +0 -50
- package/api/ApiResponse.js +0 -94
- package/api/index.d.ts +0 -9
- package/api/index.js +0 -13
- package/api/isError.d.ts +0 -6
- package/api/isError.js +0 -7
- package/api/isSuccess.d.ts +0 -6
- package/api/isSuccess.js +0 -7
- package/api/response.d.ts +0 -8
- package/api/response.js +0 -9
- package/array/contains.d.ts +0 -9
- package/array/contains.js +0 -7
- package/array/getArray.d.ts +0 -8
- package/array/getArray.js +0 -11
- package/atInternet/request.d.ts +0 -30
- package/atInternet/request.js +0 -2
- package/aws/athenaExpress/initClient.d.ts +0 -12
- package/aws/athenaExpress/initClient.js +0 -31
- package/aws/athenaExpress/query.d.ts +0 -8
- package/aws/athenaExpress/query.js +0 -16
- package/aws/ec2/initClient.d.ts +0 -11
- package/aws/ec2/initClient.js +0 -23
- package/aws/ec2/startInstances.d.ts +0 -11
- package/aws/ec2/startInstances.js +0 -18
- package/aws/ec2/stopInstances.d.ts +0 -12
- package/aws/ec2/stopInstances.js +0 -19
- package/aws/ecs/getClusters.d.ts +0 -9
- package/aws/ecs/getClusters.js +0 -32
- package/aws/ecs/getTaskDefinitions.d.ts +0 -13
- package/aws/ecs/getTaskDefinitions.js +0 -35
- package/aws/ecs/getTasks.d.ts +0 -16
- package/aws/ecs/getTasks.js +0 -38
- package/aws/ecs/initClient.d.ts +0 -11
- package/aws/ecs/initClient.js +0 -23
- package/aws/ecs/runTask.d.ts +0 -16
- package/aws/ecs/runTask.js +0 -30
- package/aws/getConfig.d.ts +0 -13
- package/aws/getConfig.js +0 -27
- package/aws/glue/initClient.d.ts +0 -10
- package/aws/glue/initClient.js +0 -21
- package/aws/glue/invoke.d.ts +0 -9
- package/aws/glue/invoke.js +0 -23
- package/aws/isResponse200.d.ts +0 -7
- package/aws/isResponse200.js +0 -22
- package/aws/lambda/getHandlerPath.d.ts +0 -5
- package/aws/lambda/getHandlerPath.js +0 -7
- package/aws/lambda/initClient.d.ts +0 -10
- package/aws/lambda/initClient.js +0 -21
- package/aws/lambda/invoke.d.ts +0 -13
- package/aws/lambda/invoke.js +0 -61
- package/aws/s3/copyFile.d.ts +0 -13
- package/aws/s3/copyFile.js +0 -14
- package/aws/s3/deleteFile.d.ts +0 -9
- package/aws/s3/deleteFile.js +0 -13
- package/aws/s3/deleteFiles.d.ts +0 -9
- package/aws/s3/deleteFiles.js +0 -17
- package/aws/s3/deleteFolder.d.ts +0 -9
- package/aws/s3/deleteFolder.js +0 -36
- package/aws/s3/getGlueJson.d.ts +0 -8
- package/aws/s3/getGlueJson.js +0 -11
- package/aws/s3/getPresignedPost.d.ts +0 -20
- package/aws/s3/getPresignedPost.js +0 -19
- package/aws/s3/getSignedUrl.d.ts +0 -12
- package/aws/s3/getSignedUrl.js +0 -17
- package/aws/s3/initClient.d.ts +0 -10
- package/aws/s3/initClient.js +0 -19
- package/aws/s3/isFileExists.d.ts +0 -9
- package/aws/s3/isFileExists.js +0 -27
- package/aws/s3/listFiles.d.ts +0 -9
- package/aws/s3/listFiles.js +0 -33
- package/aws/s3/listFilesIteratively.d.ts +0 -9
- package/aws/s3/listFilesIteratively.js +0 -44
- package/aws/s3/listFolders.d.ts +0 -9
- package/aws/s3/listFolders.js +0 -32
- package/aws/s3/moveFile.d.ts +0 -10
- package/aws/s3/moveFile.js +0 -21
- package/aws/s3/readBrotli.d.ts +0 -11
- package/aws/s3/readBrotli.js +0 -28
- package/aws/s3/readBuffer.d.ts +0 -13
- package/aws/s3/readBuffer.js +0 -39
- package/aws/s3/readFile.d.ts +0 -31
- package/aws/s3/readFile.js +0 -83
- package/aws/s3/readGzip.d.ts +0 -11
- package/aws/s3/readGzip.js +0 -28
- package/aws/s3/writeBrotli.d.ts +0 -12
- package/aws/s3/writeBrotli.js +0 -28
- package/aws/s3/writeFile.d.ts +0 -11
- package/aws/s3/writeFile.js +0 -16
- package/aws/s3/writeGzip.d.ts +0 -12
- package/aws/s3/writeGzip.js +0 -28
- package/aws/s3/writePresignedPost.d.ts +0 -14
- package/aws/s3/writePresignedPost.js +0 -31
- package/aws/s3/writeUrlContents.d.ts +0 -10
- package/aws/s3/writeUrlContents.js +0 -26
- package/aws/s3cache/getCache.d.ts +0 -11
- package/aws/s3cache/getCache.js +0 -37
- package/aws/s3cache/getKey.d.ts +0 -10
- package/aws/s3cache/getKey.js +0 -18
- package/aws/s3cache/index.d.ts +0 -6
- package/aws/s3cache/index.js +0 -2
- package/aws/s3cache/saveCache.d.ts +0 -10
- package/aws/s3cache/saveCache.js +0 -17
- package/aws/s3cache/updateCache.d.ts +0 -10
- package/aws/s3cache/updateCache.js +0 -24
- package/aws/ses/SimpleEmail.d.ts +0 -51
- package/aws/ses/SimpleEmail.js +0 -114
- package/aws/ses/initClient.d.ts +0 -10
- package/aws/ses/initClient.js +0 -19
- package/aws/sqs/addToQueue.d.ts +0 -27
- package/aws/sqs/addToQueue.js +0 -26
- package/aws/sqs/deleteFromQueue.d.ts +0 -10
- package/aws/sqs/deleteFromQueue.js +0 -15
- package/aws/sqs/initClient.d.ts +0 -10
- package/aws/sqs/initClient.js +0 -19
- package/aws/sqs/isEventSqs.d.ts +0 -1
- package/aws/sqs/isEventSqs.js +0 -13
- package/aws/ssm/getParameter.d.ts +0 -10
- package/aws/ssm/getParameter.js +0 -40
- package/aws/ssm/initClient.d.ts +0 -10
- package/aws/ssm/initClient.js +0 -19
- package/axios/delete.d.ts +0 -11
- package/axios/delete.js +0 -39
- package/axios/get.d.ts +0 -10
- package/axios/get.js +0 -38
- package/axios/post.d.ts +0 -11
- package/axios/post.js +0 -38
- package/boolean/getBoolean.d.ts +0 -7
- package/boolean/getBoolean.js +0 -16
- package/brightData/getCustomerId.d.ts +0 -10
- package/brightData/getCustomerId.js +0 -11
- package/brightData/getZone.d.ts +0 -9
- package/brightData/getZone.js +0 -10
- package/brightData/param.d.ts +0 -9
- package/brightData/param.js +0 -3
- package/brightData/serpApi/buildGoogleSerpUrl.d.ts +0 -32
- package/brightData/serpApi/buildGoogleSerpUrl.js +0 -115
- package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +0 -22
- package/brightData/serpApi/buildGoogleTrendsUrl.js +0 -60
- package/brightData/serpApi/getAsyncRequestId.d.ts +0 -14
- package/brightData/serpApi/getAsyncRequestId.js +0 -50
- package/brightData/serpApi/getAsyncResults.d.ts +0 -12
- package/brightData/serpApi/getAsyncResults.js +0 -49
- package/brightData/serpApi/getRealtime.d.ts +0 -10
- package/brightData/serpApi/getRealtime.js +0 -35
- package/brightData/serpApi/type.d.ts +0 -11
- package/brightData/serpApi/type.js +0 -14
- package/brightData/webScraperIde/getBatch.d.ts +0 -14
- package/brightData/webScraperIde/getBatch.js +0 -34
- package/brightData/webScraperIde/getRealtime.d.ts +0 -13
- package/brightData/webScraperIde/getRealtime.js +0 -64
- package/class/BaseClass.d.ts +0 -31
- package/class/BaseClass.js +0 -50
- package/crud/index.d.ts +0 -6
- package/crud/index.js +0 -10
- package/crypto/getDecrypt.d.ts +0 -10
- package/crypto/getDecrypt.js +0 -13
- package/crypto/getEncrypt.d.ts +0 -10
- package/crypto/getEncrypt.js +0 -13
- package/crypto/getRandom.d.ts +0 -8
- package/crypto/getRandom.js +0 -12
- package/crypto/getSha256.d.ts +0 -8
- package/crypto/getSha256.js +0 -17
- package/date/format.d.ts +0 -10
- package/date/format.js +0 -21
- package/date/getDate.d.ts +0 -14
- package/date/getDate.js +0 -138
- package/date/getDatesBetween.d.ts +0 -13
- package/date/getDatesBetween.js +0 -54
- package/date/getDurationHours.d.ts +0 -9
- package/date/getDurationHours.js +0 -24
- package/date/getDurationMinutes.d.ts +0 -9
- package/date/getDurationMinutes.js +0 -22
- package/date/getFinancialYear.d.ts +0 -9
- package/date/getFinancialYear.js +0 -52
- package/date/getFinancialYearToDate.d.ts +0 -7
- package/date/getFinancialYearToDate.js +0 -20
- package/date/getFinancialYearToYesterday.d.ts +0 -7
- package/date/getFinancialYearToYesterday.js +0 -20
- package/date/getFinancialYearWeeks.d.ts +0 -9
- package/date/getFinancialYearWeeks.js +0 -33
- package/date/getLastWeek.d.ts +0 -10
- package/date/getLastWeek.js +0 -34
- package/date/getMax.d.ts +0 -13
- package/date/getMax.js +0 -24
- package/date/getMidnight.d.ts +0 -10
- package/date/getMidnight.js +0 -13
- package/date/getMin.d.ts +0 -13
- package/date/getMin.js +0 -24
- package/date/getMonday.d.ts +0 -15
- package/date/getMonday.js +0 -46
- package/date/getNumber.d.ts +0 -7
- package/date/getNumber.js +0 -20
- package/date/getPredefinedTimeframe.d.ts +0 -8
- package/date/getPredefinedTimeframe.js +0 -24
- package/date/getSunday.d.ts +0 -15
- package/date/getSunday.js +0 -42
- package/date/getThisWeek.d.ts +0 -10
- package/date/getThisWeek.js +0 -36
- package/date/getTimeZoned.d.ts +0 -13
- package/date/getTimeZoned.js +0 -55
- package/date/getToday.d.ts +0 -9
- package/date/getToday.js +0 -24
- package/date/getTodayYmd.d.ts +0 -5
- package/date/getTodayYmd.js +0 -21
- package/date/getTodayYmdhis.d.ts +0 -5
- package/date/getTodayYmdhis.js +0 -21
- package/date/getTwoWeeksAgo.d.ts +0 -10
- package/date/getTwoWeeksAgo.js +0 -36
- package/date/getWeeksAgo.d.ts +0 -13
- package/date/getWeeksAgo.js +0 -25
- package/date/getYesterday.d.ts +0 -9
- package/date/getYesterday.js +0 -52
- package/date/index.d.ts +0 -55
- package/date/index.js +0 -36
- package/date/isDateValid.d.ts +0 -7
- package/date/isDateValid.js +0 -20
- package/date/isLastWeek.d.ts +0 -6
- package/date/isLastWeek.js +0 -14
- package/date/isThisWeek.d.ts +0 -6
- package/date/isThisWeek.js +0 -14
- package/date/parseExcelDate.d.ts +0 -8
- package/date/parseExcelDate.js +0 -19
- package/environment/getEnvironment.d.ts +0 -6
- package/environment/getEnvironment.js +0 -43
- package/environment/index.d.ts +0 -9
- package/environment/index.js +0 -14
- package/environment/isAws.d.ts +0 -5
- package/environment/isAws.js +0 -8
- package/environment/isDevelopment.d.ts +0 -2
- package/environment/isDevelopment.js +0 -9
- package/environment/isLocalhost.d.ts +0 -5
- package/environment/isLocalhost.js +0 -25
- package/environment/isProduction.d.ts +0 -2
- package/environment/isProduction.js +0 -9
- package/environment/isStaging.d.ts +0 -2
- package/environment/isStaging.js +0 -9
- package/environment/isVercel.d.ts +0 -5
- package/environment/isVercel.js +0 -7
- package/eskimi/ageGroups.d.ts +0 -5
- package/eskimi/ageGroups.js +0 -41
- package/eskimi/campaign.d.ts +0 -19
- package/eskimi/campaign.js +0 -2
- package/eskimi/devices.d.ts +0 -5
- package/eskimi/devices.js +0 -13
- package/eskimi/endpoints.d.ts +0 -16
- package/eskimi/endpoints.js +0 -18
- package/eskimi/genders.d.ts +0 -5
- package/eskimi/genders.js +0 -13
- package/eskimi/getAccessToken.d.ts +0 -9
- package/eskimi/getAccessToken.js +0 -23
- package/eskimi/getAgeGroup.d.ts +0 -7
- package/eskimi/getAgeGroup.js +0 -17
- package/eskimi/getCampaignIds.d.ts +0 -7
- package/eskimi/getCampaignIds.js +0 -12
- package/eskimi/getData.d.ts +0 -8
- package/eskimi/getData.js +0 -23
- package/eskimi/getDevice.d.ts +0 -7
- package/eskimi/getDevice.js +0 -17
- package/eskimi/getGender.d.ts +0 -7
- package/eskimi/getGender.js +0 -17
- package/file/createDirectory.d.ts +0 -9
- package/file/createDirectory.js +0 -16
- package/file/writeFile.d.ts +0 -1
- package/file/writeFile.js +0 -2
- package/global/forceUpdate.d.ts +0 -8
- package/global/forceUpdate.js +0 -25
- package/global/init.d.ts +0 -10
- package/global/init.js +0 -18
- package/global/isSet.d.ts +0 -8
- package/global/isSet.js +0 -9
- package/global/maxCache.d.ts +0 -8
- package/global/maxCache.js +0 -17
- package/global/read.d.ts +0 -8
- package/global/read.js +0 -30
- package/google/bigQuery/IsTableExists.d.ts +0 -11
- package/google/bigQuery/IsTableExists.js +0 -25
- package/google/bigQuery/createDataset.d.ts +0 -11
- package/google/bigQuery/createDataset.js +0 -22
- package/google/bigQuery/createTable.d.ts +0 -12
- package/google/bigQuery/createTable.js +0 -31
- package/google/bigQuery/getClient.d.ts +0 -9
- package/google/bigQuery/getClient.js +0 -18
- package/google/bigQuery/getDatasets.d.ts +0 -13
- package/google/bigQuery/getDatasets.js +0 -27
- package/google/bigQuery/getTables.d.ts +0 -12
- package/google/bigQuery/getTables.js +0 -25
- package/google/bigQuery/initClient.d.ts +0 -11
- package/google/bigQuery/initClient.js +0 -29
- package/google/bigQuery/isDatasetExists.d.ts +0 -11
- package/google/bigQuery/isDatasetExists.js +0 -25
- package/google/bigQuery/loadData.d.ts +0 -18
- package/google/bigQuery/loadData.js +0 -32
- package/google/bigQuery/query.d.ts +0 -19
- package/google/bigQuery/query.js +0 -15
- package/google/getConfig.d.ts +0 -20
- package/google/getConfig.js +0 -23
- package/google/sheets/getAssociatedData.d.ts +0 -16
- package/google/sheets/getAssociatedData.js +0 -53
- package/google/sheets/getBatchData.d.ts +0 -18
- package/google/sheets/getBatchData.js +0 -19
- package/google/sheets/initClient.d.ts +0 -11
- package/google/sheets/initClient.js +0 -25
- package/google/sheets/isCellNa.d.ts +0 -7
- package/google/sheets/isCellNa.js +0 -7
- package/google/storage/copyToCloud.d.ts +0 -11
- package/google/storage/copyToCloud.js +0 -18
- package/google/storage/getClient.d.ts +0 -8
- package/google/storage/getClient.js +0 -18
- package/google/storage/initClient.d.ts +0 -12
- package/google/storage/initClient.js +0 -29
- package/google/storage/isFileExists.d.ts +0 -10
- package/google/storage/isFileExists.js +0 -19
- package/google/storage/writeFile.d.ts +0 -11
- package/google/storage/writeFile.js +0 -37
- package/googleAds/getCustomer.d.ts +0 -8
- package/googleAds/getCustomer.js +0 -14
- package/googleAds/initClient.d.ts +0 -16
- package/googleAds/initClient.js +0 -25
- package/googleAds/keywordPlanner/index.d.ts +0 -238
- package/googleAds/keywordPlanner/index.js +0 -244
- package/googleAds/keywordPlanner/request.d.ts +0 -18
- package/googleAds/keywordPlanner/request.js +0 -13
- package/googleAds/keywordPlanner/response.d.ts +0 -25
- package/googleAds/keywordPlanner/response.js +0 -2
- package/initClients.d.ts +0 -43
- package/initClients.js +0 -131
- package/json/getJsonNewline.d.ts +0 -5
- package/json/getJsonNewline.js +0 -17
- package/json/isJson.d.ts +0 -8
- package/json/isJson.js +0 -20
- package/littleWarden/getUrlStatus.d.ts +0 -9
- package/littleWarden/getUrlStatus.js +0 -21
- package/littleWarden/index.d.ts +0 -5
- package/littleWarden/index.js +0 -9
- package/littleWarden/isAllGood.d.ts +0 -7
- package/littleWarden/isAllGood.js +0 -15
- package/littleWarden/isDanger.d.ts +0 -7
- package/littleWarden/isDanger.js +0 -15
- package/littleWarden/isWarning.d.ts +0 -7
- package/littleWarden/isWarning.js +0 -15
- package/lumar/api/buildRequest.d.ts +0 -15
- package/lumar/api/buildRequest.js +0 -83
- package/lumar/api/filter.d.ts +0 -5
- package/lumar/api/filter.js +0 -2
- package/lumar/api/getData.d.ts +0 -6
- package/lumar/api/getData.js +0 -18
- package/lumar/api/initClient.d.ts +0 -13
- package/lumar/api/initClient.js +0 -38
- package/lumar/api/operands.d.ts +0 -11
- package/lumar/api/operands.js +0 -13
- package/lumar/api/orders.d.ts +0 -9
- package/lumar/api/orders.js +0 -7
- package/lumar/api/reports.d.ts +0 -11
- package/lumar/api/reports.js +0 -13
- package/lumar/graphql/columns.d.ts +0 -29
- package/lumar/graphql/columns.js +0 -31
- package/lumar/graphql/getData.d.ts +0 -9
- package/lumar/graphql/getData.js +0 -26
- package/lumar/graphql/getReportKey.d.ts +0 -9
- package/lumar/graphql/getReportKey.js +0 -9
- package/lumar/graphql/initClient.d.ts +0 -12
- package/lumar/graphql/initClient.js +0 -38
- package/lumar/graphql/operands.d.ts +0 -16
- package/lumar/graphql/operands.js +0 -18
- package/lumar/graphql/queries/crawl.d.ts +0 -5
- package/lumar/graphql/queries/crawl.js +0 -2
- package/lumar/graphql/queries/getCrawls.d.ts +0 -18
- package/lumar/graphql/queries/getCrawls.js +0 -33
- package/lumar/graphql/queries/getReportDifferences.d.ts +0 -24
- package/lumar/graphql/queries/getReportDifferences.js +0 -40
- package/lumar/graphql/queries/getRows.d.ts +0 -38
- package/lumar/graphql/queries/getRows.js +0 -57
- package/lumar/graphql/queries/getTotals.d.ts +0 -25
- package/lumar/graphql/queries/getTotals.js +0 -40
- package/lumar/graphql/queries/row.d.ts +0 -157
- package/lumar/graphql/queries/row.js +0 -2
- package/lumar/graphql/reportTemplates.d.ts +0 -68
- package/lumar/graphql/reportTemplates.js +0 -70
- package/lumar/graphql/reportTypes.d.ts +0 -7
- package/lumar/graphql/reportTypes.js +0 -9
- package/myTarget/getAccessToken.d.ts +0 -9
- package/myTarget/getAccessToken.js +0 -23
- package/myTarget/request.d.ts +0 -9
- package/myTarget/request.js +0 -23
- package/nextAuth/index.d.ts +0 -5
- package/nextAuth/index.js +0 -9
- package/nextAuth/isSessionReady.d.ts +0 -4
- package/nextAuth/isSessionReady.js +0 -12
- package/nextJs/getIp.d.ts +0 -7
- package/nextJs/getIp.js +0 -13
- package/nextJs/getUserAgent.d.ts +0 -7
- package/nextJs/getUserAgent.js +0 -7
- package/number/format.d.ts +0 -11
- package/number/format.js +0 -23
- package/number/getCurrency.d.ts +0 -10
- package/number/getCurrency.js +0 -20
- package/number/getDecimal.d.ts +0 -9
- package/number/getDecimal.js +0 -16
- package/number/getDivide.d.ts +0 -11
- package/number/getDivide.js +0 -26
- package/number/getNumber.d.ts +0 -8
- package/number/getNumber.js +0 -51
- package/number/getPercentIncrease.d.ts +0 -10
- package/number/getPercentIncrease.js +0 -22
- package/object/replaceKeys.d.ts +0 -10
- package/object/replaceKeys.js +0 -30
- package/prisma/getDecimal.d.ts +0 -9
- package/prisma/getDecimal.js +0 -18
- package/prisma/initClient.d.ts +0 -6
- package/prisma/initClient.js +0 -36
- package/snapchat/getAccessToken.d.ts +0 -9
- package/snapchat/getAccessToken.js +0 -35
- package/sorting/byNumberAscending.d.ts +0 -8
- package/sorting/byNumberAscending.js +0 -17
- package/sorting/byNumberDescending.d.ts +0 -8
- package/sorting/byNumberDescending.js +0 -17
- package/sorting/byStringAscending.d.ts +0 -8
- package/sorting/byStringAscending.js +0 -21
- package/sorting/byStringDescending.d.ts +0 -8
- package/sorting/byStringDescending.js +0 -21
- package/stream/sort.d.ts +0 -14
- package/stream/sort.js +0 -50
- package/string/getCapitalised.d.ts +0 -10
- package/string/getCapitalised.js +0 -17
- package/string/getClean.d.ts +0 -18
- package/string/getClean.js +0 -65
- package/string/getDecoded.d.ts +0 -10
- package/string/getDecoded.js +0 -26
- package/string/getFolder.d.ts +0 -8
- package/string/getFolder.js +0 -14
- package/string/getProperCase.d.ts +0 -11
- package/string/getProperCase.js +0 -27
- package/string/getString.d.ts +0 -7
- package/string/getString.js +0 -34
- package/string/getStringFromStream.d.ts +0 -8
- package/string/getStringFromStream.js +0 -16
- package/string/getWithoutAccents.d.ts +0 -9
- package/string/getWithoutAccents.js +0 -16
- package/string/getWithoutHtmlTags.d.ts +0 -9
- package/string/getWithoutHtmlTags.js +0 -15
- package/string/getWithoutPunctuation.d.ts +0 -9
- package/string/getWithoutPunctuation.js +0 -16
- package/string/getWithoutUnderscores.d.ts +0 -8
- package/string/getWithoutUnderscores.js +0 -14
- package/string/getWithoutWhitespaces.d.ts +0 -9
- package/string/getWithoutWhitespaces.js +0 -16
- package/swr/isAllData.d.ts +0 -7
- package/swr/isAllData.js +0 -19
- package/swr/isAnyError.d.ts +0 -7
- package/swr/isAnyError.js +0 -19
- package/swr/isAnyLoading.d.ts +0 -7
- package/swr/isAnyLoading.js +0 -21
- package/swr/isData.d.ts +0 -7
- package/swr/isData.js +0 -9
- package/swr/isError.d.ts +0 -7
- package/swr/isError.js +0 -7
- package/swr/isLoading.d.ts +0 -7
- package/swr/isLoading.js +0 -12
- package/upTimeRobot/getMonitors.d.ts +0 -1
- package/upTimeRobot/getMonitors.js +0 -33
- package/upTimeRobot/logTypes.d.ts +0 -7
- package/upTimeRobot/logTypes.js +0 -9
- package/upTimeRobot/monitorStatuses.d.ts +0 -8
- package/upTimeRobot/monitorStatuses.js +0 -10
- package/upTimeRobot/monitorSubTypes.d.ts +0 -10
- package/upTimeRobot/monitorSubTypes.js +0 -12
- package/upTimeRobot/monitorTypes.d.ts +0 -8
- package/upTimeRobot/monitorTypes.js +0 -10
- package/upTimeRobot/requestStatuses.d.ts +0 -5
- package/upTimeRobot/requestStatuses.js +0 -7
- package/url/buildParameters.d.ts +0 -8
- package/url/buildParameters.js +0 -22
- package/url/buildRelative.d.ts +0 -8
- package/url/buildRelative.js +0 -13
- package/url/buildUrl.d.ts +0 -10
- package/url/buildUrl.js +0 -29
- package/url/isAbsolute.d.ts +0 -7
- package/url/isAbsolute.js +0 -15
- package/url/isRelative.d.ts +0 -7
- package/url/isRelative.js +0 -8
- package/url/url.d.ts +0 -6
- package/url/url.js +0 -2
- package/url/writeUrlContents.d.ts +0 -11
- package/url/writeUrlContents.js +0 -43
- package/util/defaultTo.d.ts +0 -10
- package/util/defaultTo.js +0 -43
- package/util/getBrotliCompressed.d.ts +0 -9
- package/util/getBrotliCompressed.js +0 -19
- package/util/getBrotliDecompressed.d.ts +0 -9
- package/util/getBrotliDecompressed.js +0 -20
- package/util/getClean.d.ts +0 -11
- package/util/getClean.js +0 -28
- package/util/getGzipCompressed.d.ts +0 -9
- package/util/getGzipCompressed.js +0 -19
- package/util/getGzipDecompressed.d.ts +0 -9
- package/util/getGzipDecompressed.js +0 -20
- package/util/getWithoutHash.d.ts +0 -8
- package/util/getWithoutHash.js +0 -17
- package/util/getWithoutParameter.d.ts +0 -8
- package/util/getWithoutParameter.js +0 -17
- package/util/isUndefined.d.ts +0 -9
- package/util/isUndefined.js +0 -19
- package/util/promiseChunks.d.ts +0 -10
- package/util/promiseChunks.js +0 -18
- package/util/sleep.d.ts +0 -5
- package/util/sleep.js +0 -6
- package/webWorker/index.d.ts +0 -5
- package/webWorker/index.js +0 -9
- package/xml/getXml.d.ts +0 -5
- package/xml/getXml.js +0 -22
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
type RedirectChain = {
|
|
2
|
-
"isMetaRedirect": boolean;
|
|
3
|
-
"redirectsTo": null | string;
|
|
4
|
-
"result": string;
|
|
5
|
-
"statusCode": string;
|
|
6
|
-
"url": string;
|
|
7
|
-
};
|
|
8
|
-
export type Row = {
|
|
9
|
-
"canonicalLinksInCount": number;
|
|
10
|
-
"canonicalUrlIsConsistent": boolean;
|
|
11
|
-
"canonicalizedPage": boolean;
|
|
12
|
-
"contentHtmlRatio": string;
|
|
13
|
-
"contentSize": number;
|
|
14
|
-
"crawlDatetime": string;
|
|
15
|
-
"css": boolean;
|
|
16
|
-
"customExtractionMatch": boolean;
|
|
17
|
-
"customExtraction1": any[];
|
|
18
|
-
"customExtraction2": any[];
|
|
19
|
-
"deeprank": number;
|
|
20
|
-
"description": string;
|
|
21
|
-
"descriptionLengthPx": number;
|
|
22
|
-
"descriptionLength": number;
|
|
23
|
-
"disallowedPage": boolean;
|
|
24
|
-
"duplicateBodyCount": number;
|
|
25
|
-
"duplicateBodyNonIndexable": boolean;
|
|
26
|
-
"duplicateBody": boolean;
|
|
27
|
-
"duplicateDescriptionCount": number;
|
|
28
|
-
"duplicateDescriptionNonIndexable": boolean;
|
|
29
|
-
"duplicateDescriptionPrimaryUrl": string;
|
|
30
|
-
"duplicateDescription": boolean;
|
|
31
|
-
"duplicatePageCount": number;
|
|
32
|
-
"duplicatePageNonIndexable": boolean;
|
|
33
|
-
"duplicatePage": boolean;
|
|
34
|
-
"duplicateTitleCount": number;
|
|
35
|
-
"duplicateTitleNonIndexable": boolean;
|
|
36
|
-
"duplicateTitlePrimaryUrl": string;
|
|
37
|
-
"duplicateTitle": boolean;
|
|
38
|
-
"encodingHeader": string;
|
|
39
|
-
"externalLinksCount": number;
|
|
40
|
-
"fetchTime": string;
|
|
41
|
-
"folderCount": number;
|
|
42
|
-
"followedExternalLinksOutCount": number;
|
|
43
|
-
"followedLinksInCount": number;
|
|
44
|
-
"foundAtUrl": string;
|
|
45
|
-
"foundInBacklinks": boolean;
|
|
46
|
-
"foundInGoogleAnalytics": boolean;
|
|
47
|
-
"foundInGoogleSearchConsole": boolean;
|
|
48
|
-
"foundInList": boolean;
|
|
49
|
-
"foundInLogSummary": boolean;
|
|
50
|
-
"foundInSitemap": boolean;
|
|
51
|
-
"foundInWebCrawl": boolean;
|
|
52
|
-
"h1Count": number;
|
|
53
|
-
"h1Length": number;
|
|
54
|
-
"headerContentType": string;
|
|
55
|
-
"headerNoarchive": boolean;
|
|
56
|
-
"headerNofollow": boolean;
|
|
57
|
-
"headerNoindex": boolean;
|
|
58
|
-
"headerNoodp": boolean;
|
|
59
|
-
"headerNosnippet": boolean;
|
|
60
|
-
"headerNoydir": boolean;
|
|
61
|
-
"hreflangLinksInCount": number;
|
|
62
|
-
"hreflangLinksOutCount": number;
|
|
63
|
-
"hreflangOnHeader": boolean;
|
|
64
|
-
"hreflangOnPage": boolean;
|
|
65
|
-
"hreflangOnSitemap": boolean;
|
|
66
|
-
"hreflangUrlCount": number;
|
|
67
|
-
"hsts": string;
|
|
68
|
-
"htmlSize": number;
|
|
69
|
-
"httpStatusCode": number;
|
|
70
|
-
"https": boolean;
|
|
71
|
-
"indexable": boolean;
|
|
72
|
-
"internalLinksCount": number;
|
|
73
|
-
"internal": boolean;
|
|
74
|
-
"isImage": boolean;
|
|
75
|
-
"isRedirectLoop": boolean;
|
|
76
|
-
"isRedirect": boolean;
|
|
77
|
-
"isSelfCanonical": boolean;
|
|
78
|
-
"js": boolean;
|
|
79
|
-
"level": number;
|
|
80
|
-
"linksInCount": number;
|
|
81
|
-
"linksOutCount": number;
|
|
82
|
-
"metaDisabledSitelinks": boolean;
|
|
83
|
-
"metaNoarchive": boolean;
|
|
84
|
-
"metaNofollow": boolean;
|
|
85
|
-
"metaNoindex": boolean;
|
|
86
|
-
"metaNoodp": boolean;
|
|
87
|
-
"metaNosnippet": boolean;
|
|
88
|
-
"metaNoydir": boolean;
|
|
89
|
-
"metaRedirect": boolean;
|
|
90
|
-
"mobileDesktopContentMismatch": boolean;
|
|
91
|
-
"mobileRelAlternateUrlIsConsistent": boolean;
|
|
92
|
-
"mobileRelAlternate": boolean;
|
|
93
|
-
"mobileRelAmphtml": boolean;
|
|
94
|
-
"newsarticleAuthorSchemaValue": string;
|
|
95
|
-
"noarchive": boolean;
|
|
96
|
-
"nofollowedPage": boolean;
|
|
97
|
-
"noindex": boolean;
|
|
98
|
-
"noodp": boolean;
|
|
99
|
-
"nosnippet": boolean;
|
|
100
|
-
"noydir": boolean;
|
|
101
|
-
"page1": boolean;
|
|
102
|
-
"pageTitle": string;
|
|
103
|
-
"pageTitleLengthPx": number;
|
|
104
|
-
"pageTitleLength": number;
|
|
105
|
-
"paginatedPage": boolean;
|
|
106
|
-
"productAvailabilitySchemaValue": string;
|
|
107
|
-
"productBrandSchemaValue": string;
|
|
108
|
-
"productSkuSchemaValue": string;
|
|
109
|
-
"primaryPage": boolean;
|
|
110
|
-
"primaryUrlFrom": string;
|
|
111
|
-
"primaryUrlFromStatusCode": string;
|
|
112
|
-
"paramCount": number;
|
|
113
|
-
"path0": string;
|
|
114
|
-
"path1": string;
|
|
115
|
-
"path2": string;
|
|
116
|
-
"path3": string;
|
|
117
|
-
"pathCount": number;
|
|
118
|
-
"performanceCls"?: number;
|
|
119
|
-
"performanceDcl"?: number;
|
|
120
|
-
"performanceFcp"?: number;
|
|
121
|
-
"performanceLcp"?: number;
|
|
122
|
-
"performanceTtfb"?: number;
|
|
123
|
-
"performanceTti"?: number;
|
|
124
|
-
"previousPath": string;
|
|
125
|
-
"previousPathDigest": string;
|
|
126
|
-
"rawHeader": {
|
|
127
|
-
[key: string]: string;
|
|
128
|
-
};
|
|
129
|
-
"redirectChain": RedirectChain[];
|
|
130
|
-
"redirectCount": number;
|
|
131
|
-
"redirectedToStatusCode": number;
|
|
132
|
-
"redirectedToUrlDigest": string;
|
|
133
|
-
"redirectedToUrl": string;
|
|
134
|
-
"redirectsInCount": number;
|
|
135
|
-
"relLinksInCount": number;
|
|
136
|
-
"relNextUrlIsConsistent": boolean;
|
|
137
|
-
"relPrevUrlIsConsistent": boolean;
|
|
138
|
-
"responsive": boolean;
|
|
139
|
-
"robotsNoindex": boolean;
|
|
140
|
-
"secureFormInputField": boolean;
|
|
141
|
-
"separateDesktop": boolean;
|
|
142
|
-
"separateMobile": boolean;
|
|
143
|
-
"sitemapsInCount": number;
|
|
144
|
-
"sourceUrl": string;
|
|
145
|
-
"urlAliasDigest": string;
|
|
146
|
-
"urlAlias": string;
|
|
147
|
-
"urlDigest": string;
|
|
148
|
-
"urlLength": number;
|
|
149
|
-
"url": string;
|
|
150
|
-
"urlCount": number;
|
|
151
|
-
"urlTo": string;
|
|
152
|
-
"urlToStatusCode": number;
|
|
153
|
-
"validTwitterCard": boolean;
|
|
154
|
-
"varyUserAgent": boolean;
|
|
155
|
-
"wordCount": number;
|
|
156
|
-
};
|
|
157
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
declare const reportTemplates: {
|
|
2
|
-
"200_PAGES": string;
|
|
3
|
-
"301_REDIRECTS": string;
|
|
4
|
-
"4XX_ERRORS": string;
|
|
5
|
-
"5XX_ERRORS": string;
|
|
6
|
-
ALL_PAGES: string;
|
|
7
|
-
BROKEN_EXTERNAL_LINKS: string;
|
|
8
|
-
BROKEN_INTERNAL_LINKS: string;
|
|
9
|
-
BROKEN_SITEMAP_PAGES: string;
|
|
10
|
-
CANONICAL_CONFLICTING: string;
|
|
11
|
-
CANONICAL_NON_200: string;
|
|
12
|
-
CANONICAL_NON_INDEXABLE: string;
|
|
13
|
-
CANONICAL_ORPHANED: string;
|
|
14
|
-
CUSTOM_EXTRACTION_1: string;
|
|
15
|
-
CUSTOM_EXTRACTION_2: string;
|
|
16
|
-
DUPLICATE_CONTENT: string;
|
|
17
|
-
DUPLICATE_DESCRIPTIONS: string;
|
|
18
|
-
DUPLICATE_TITLES: string;
|
|
19
|
-
EMPTY_PAGES: string;
|
|
20
|
-
INDEXABLE_PAGES: string;
|
|
21
|
-
LINKED_DOMAINS: string;
|
|
22
|
-
MAX_DESCRIPTIONS: string;
|
|
23
|
-
MAX_MOBILE_DESCRIPTIONS: string;
|
|
24
|
-
MAX_TITLES: string;
|
|
25
|
-
MISSING_DESCRIPTIONS: string;
|
|
26
|
-
MISSING_TITLES: string;
|
|
27
|
-
NON_301_REDIRECTS: string;
|
|
28
|
-
NON_INDEXABLE_PAGES: string;
|
|
29
|
-
NON_INDEXABLE_SITEMAP_PAGES: string;
|
|
30
|
-
ORPHANED_CANONICAL: string;
|
|
31
|
-
ORPHANED_ANALYTICS_PAGES: string;
|
|
32
|
-
ORPHANED_SEARCH_CONSOLE_PAGES: string;
|
|
33
|
-
ORPHANED_SITEMAP_PAGES: string;
|
|
34
|
-
PAGES_WITH_HIGH_EXTERNAL_LINKS: string;
|
|
35
|
-
PERFORMANCE_MAX_FETCH_TIME: string;
|
|
36
|
-
PERFORMANCE_POOR_CLS: string;
|
|
37
|
-
PERFORMANCE_SLOW_DCL: string;
|
|
38
|
-
PERFORMANCE_SLOW_FCP: string;
|
|
39
|
-
PERFORMANCE_SLOW_LCP: string;
|
|
40
|
-
PERFORMANCE_SLOW_TTFB: string;
|
|
41
|
-
PERFORMANCE_SLOW_TTI: string;
|
|
42
|
-
PRIMARY_PAGES: string;
|
|
43
|
-
REDIRECTS_BROKEN: string;
|
|
44
|
-
REDIRECTS_CHAIN: string;
|
|
45
|
-
REDIRECTS_LOOP: string;
|
|
46
|
-
SCHEMA_BREADCRUMB: string;
|
|
47
|
-
SCHEMA_EVENT: string;
|
|
48
|
-
SCHEMA_FAQ: string;
|
|
49
|
-
SCHEMA_HOW_TO: string;
|
|
50
|
-
SCHEMA_NEWS_ARTICLE: string;
|
|
51
|
-
SCHEMA_PRODUCT: string;
|
|
52
|
-
SCHEMA_QA: string;
|
|
53
|
-
SCHEMA_RECIPE: string;
|
|
54
|
-
SCHEMA_REVIEW: string;
|
|
55
|
-
SCHEMA_VIDEO: string;
|
|
56
|
-
SHORT_DESCRIPTIONS: string;
|
|
57
|
-
SHORT_TITLES: string;
|
|
58
|
-
SITEMAP_PAGES: string;
|
|
59
|
-
SITEMAPS_NON_INDEXABLE_PAGES: string;
|
|
60
|
-
SITEMAPS_ORPHANED_PAGES: string;
|
|
61
|
-
SITEMAPS_MISSING_PAGES: string;
|
|
62
|
-
THIN_PAGES: string;
|
|
63
|
-
TRUE_UNIQUE_PAGES: string;
|
|
64
|
-
UNIQUE_EXTERNAL_LINKS: string;
|
|
65
|
-
UNIQUE_INTERNAL_LINKS: string;
|
|
66
|
-
XML_SITEMAPS: string;
|
|
67
|
-
};
|
|
68
|
-
export default reportTemplates;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const reportTemplates = {
|
|
4
|
-
"200_PAGES": "200_pages",
|
|
5
|
-
"301_REDIRECTS": "301_redirects",
|
|
6
|
-
"4XX_ERRORS": "4xx_errors",
|
|
7
|
-
"5XX_ERRORS": "5xx_errors",
|
|
8
|
-
ALL_PAGES: 'all_pages',
|
|
9
|
-
BROKEN_EXTERNAL_LINKS: 'broken_links_external',
|
|
10
|
-
BROKEN_INTERNAL_LINKS: 'all_broken_links',
|
|
11
|
-
BROKEN_SITEMAP_PAGES: 'broken_sitemap_links',
|
|
12
|
-
CANONICAL_CONFLICTING: 'conflicting_canonical_tags',
|
|
13
|
-
CANONICAL_NON_200: 'canonical_to_non_200',
|
|
14
|
-
CANONICAL_NON_INDEXABLE: 'non_indexable_canonical_links_in',
|
|
15
|
-
CANONICAL_ORPHANED: 'unlinked_canonical_pages',
|
|
16
|
-
CUSTOM_EXTRACTION_1: 'custom_extraction_1',
|
|
17
|
-
CUSTOM_EXTRACTION_2: 'custom_extraction_2',
|
|
18
|
-
DUPLICATE_CONTENT: 'duplicate_body_content',
|
|
19
|
-
DUPLICATE_DESCRIPTIONS: 'pages_with_duplicate_descriptions',
|
|
20
|
-
DUPLICATE_TITLES: 'pages_with_duplicate_titles',
|
|
21
|
-
EMPTY_PAGES: 'empty_pages',
|
|
22
|
-
INDEXABLE_PAGES: 'indexable_pages',
|
|
23
|
-
LINKED_DOMAINS: 'linked_domains',
|
|
24
|
-
MAX_DESCRIPTIONS: 'max_description_length',
|
|
25
|
-
MAX_MOBILE_DESCRIPTIONS: 'max_mobile_description_length',
|
|
26
|
-
MAX_TITLES: 'max_title_length',
|
|
27
|
-
MISSING_DESCRIPTIONS: 'missing_descriptions',
|
|
28
|
-
MISSING_TITLES: 'missing_titles',
|
|
29
|
-
NON_301_REDIRECTS: 'non_301_redirects',
|
|
30
|
-
NON_INDEXABLE_PAGES: 'non_indexable_pages',
|
|
31
|
-
NON_INDEXABLE_SITEMAP_PAGES: 'sitemaps_non_indexable_links',
|
|
32
|
-
ORPHANED_CANONICAL: 'unlinked_canonical_pages',
|
|
33
|
-
ORPHANED_ANALYTICS_PAGES: 'orphaned_organic_landing_pages',
|
|
34
|
-
ORPHANED_SEARCH_CONSOLE_PAGES: 'orphaned_google_search_console_pages',
|
|
35
|
-
ORPHANED_SITEMAP_PAGES: 'orphaned_sitemaps_pages',
|
|
36
|
-
PAGES_WITH_HIGH_EXTERNAL_LINKS: 'max_external_links',
|
|
37
|
-
PERFORMANCE_MAX_FETCH_TIME: 'max_load_time',
|
|
38
|
-
PERFORMANCE_POOR_CLS: 'poor_cls',
|
|
39
|
-
PERFORMANCE_SLOW_DCL: 'slow_dcl',
|
|
40
|
-
PERFORMANCE_SLOW_FCP: 'slow_fcp',
|
|
41
|
-
PERFORMANCE_SLOW_LCP: 'slow_lcp',
|
|
42
|
-
PERFORMANCE_SLOW_TTFB: 'slow_server_response',
|
|
43
|
-
PERFORMANCE_SLOW_TTI: 'slow_tti',
|
|
44
|
-
PRIMARY_PAGES: 'unique_pages',
|
|
45
|
-
REDIRECTS_BROKEN: 'all_broken_redirects',
|
|
46
|
-
REDIRECTS_CHAIN: 'redirect_chains',
|
|
47
|
-
REDIRECTS_LOOP: 'redirection_loop',
|
|
48
|
-
SCHEMA_BREADCRUMB: 'pages_with_breadcrumb_schema',
|
|
49
|
-
SCHEMA_EVENT: 'pages_with_event_schema',
|
|
50
|
-
SCHEMA_FAQ: 'pages_with_faqpage_schema',
|
|
51
|
-
SCHEMA_HOW_TO: 'pages_with_howto_schema',
|
|
52
|
-
SCHEMA_NEWS_ARTICLE: 'pages_with_news_article_schema',
|
|
53
|
-
SCHEMA_PRODUCT: 'pages_with_product_schema',
|
|
54
|
-
SCHEMA_QA: 'pages_with_qapage_schema',
|
|
55
|
-
SCHEMA_RECIPE: 'pages_with_recipe_schema',
|
|
56
|
-
SCHEMA_REVIEW: 'pages_with_review_schema',
|
|
57
|
-
SCHEMA_VIDEO: 'pages_with_videoobject_schema',
|
|
58
|
-
SHORT_DESCRIPTIONS: 'short_descriptions',
|
|
59
|
-
SHORT_TITLES: 'short_titles',
|
|
60
|
-
SITEMAP_PAGES: 'all_sitemaps_links',
|
|
61
|
-
SITEMAPS_NON_INDEXABLE_PAGES: 'sitemaps_non_indexable_links',
|
|
62
|
-
SITEMAPS_ORPHANED_PAGES: 'orphaned_sitemaps_pages',
|
|
63
|
-
SITEMAPS_MISSING_PAGES: 'not_in_sitemaps_primary_indexable',
|
|
64
|
-
THIN_PAGES: 'thin_pages',
|
|
65
|
-
TRUE_UNIQUE_PAGES: 'true_uniques',
|
|
66
|
-
UNIQUE_EXTERNAL_LINKS: 'unique_external_links',
|
|
67
|
-
UNIQUE_INTERNAL_LINKS: 'unique_internal_links',
|
|
68
|
-
XML_SITEMAPS: 'xml_sitemaps',
|
|
69
|
-
};
|
|
70
|
-
exports.default = reportTemplates;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type GetAccessToken = {
|
|
2
|
-
force: boolean;
|
|
3
|
-
parameterName: string;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Retrieve the access token from SSM Parameter Store.
|
|
7
|
-
*/
|
|
8
|
-
declare const getAccessToken: ({ force, parameterName }: GetAccessToken) => Promise<void>;
|
|
9
|
-
export default getAccessToken;
|
|
@@ -1,23 +0,0 @@
|
|
|
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 getParameter_1 = __importDefault(require("../aws/ssm/getParameter"));
|
|
7
|
-
global.myTargetAccessToken = null;
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve the access token from SSM Parameter Store.
|
|
10
|
-
*/
|
|
11
|
-
const getAccessToken = async ({ force, parameterName }) => {
|
|
12
|
-
if (!global.myTargetAccessToken || force) {
|
|
13
|
-
// Get the credentials from SSM
|
|
14
|
-
const parameter = await (0, getParameter_1.default)({
|
|
15
|
-
name: parameterName,
|
|
16
|
-
withDecryption: true,
|
|
17
|
-
isJson: true,
|
|
18
|
-
});
|
|
19
|
-
global.myTargetAccessToken = parameter.accessToken;
|
|
20
|
-
}
|
|
21
|
-
return global.myTargetAccessToken;
|
|
22
|
-
};
|
|
23
|
-
exports.default = getAccessToken;
|
package/myTarget/request.d.ts
DELETED
package/myTarget/request.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 post_1 = __importDefault(require("../axios/post"));
|
|
7
|
-
/**
|
|
8
|
-
* Make the request to MyTarget API using the access token.
|
|
9
|
-
*/
|
|
10
|
-
const request = async ({ data, url }) => {
|
|
11
|
-
const response = await (0, post_1.default)({
|
|
12
|
-
config: {
|
|
13
|
-
headers: {
|
|
14
|
-
Authorization: `Bearer ${global.myTargetAccessToken}`,
|
|
15
|
-
"Content-Type": "application/json",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
data: data,
|
|
19
|
-
url: url,
|
|
20
|
-
});
|
|
21
|
-
return response;
|
|
22
|
-
};
|
|
23
|
-
exports.default = request;
|
package/nextAuth/index.d.ts
DELETED
package/nextAuth/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.State = void 0;
|
|
4
|
-
var State;
|
|
5
|
-
(function (State) {
|
|
6
|
-
State["AUTHENTICATED"] = "authenticated";
|
|
7
|
-
State["PENDING"] = "loading";
|
|
8
|
-
State["UNAUTHENTICATED"] = "unauthenticated";
|
|
9
|
-
})(State || (exports.State = State = {}));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const isSessionReady = ({ session }) => {
|
|
4
|
-
let response = false;
|
|
5
|
-
if (undefined !== session && null !== session) {
|
|
6
|
-
if (undefined !== session.user && null !== session.user) {
|
|
7
|
-
response = true;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
return response;
|
|
11
|
-
};
|
|
12
|
-
exports.default = isSessionReady;
|
package/nextJs/getIp.d.ts
DELETED
package/nextJs/getIp.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Get the user's remote IP Address
|
|
5
|
-
*/
|
|
6
|
-
const getIp = ({ req }) => {
|
|
7
|
-
let response = 'unset';
|
|
8
|
-
if (undefined !== req.headers['x-real-ip']) {
|
|
9
|
-
response = String(req.headers['x-real-ip']);
|
|
10
|
-
}
|
|
11
|
-
return response;
|
|
12
|
-
};
|
|
13
|
-
exports.default = getIp;
|
package/nextJs/getUserAgent.d.ts
DELETED
package/nextJs/getUserAgent.js
DELETED
package/number/format.d.ts
DELETED
package/number/format.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 getNumber_1 = __importDefault(require("./getNumber"));
|
|
7
|
-
/**
|
|
8
|
-
* Take a given number and format it.
|
|
9
|
-
*/
|
|
10
|
-
const format = (props) => {
|
|
11
|
-
const inputValue = (0, getNumber_1.default)({
|
|
12
|
-
input: props.input,
|
|
13
|
-
});
|
|
14
|
-
const options = {
|
|
15
|
-
minimumFractionDigits: undefined !== props?.minDp ? props?.minDp : 0,
|
|
16
|
-
maximumFractionDigits: undefined !== props?.maxDp ? props?.maxDp : 2,
|
|
17
|
-
notation: true === props?.compact ? "compact" : "standard",
|
|
18
|
-
};
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return Intl.NumberFormat('en-GB', options)
|
|
21
|
-
.format(inputValue);
|
|
22
|
-
};
|
|
23
|
-
exports.default = format;
|
package/number/getCurrency.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type GetCurrency = {
|
|
2
|
-
currency: string;
|
|
3
|
-
input: any;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Use the International number formatting to return the currency value.
|
|
7
|
-
* https://www.freecodecamp.org/news/how-to-format-number-as-currency-in-javascript-one-line-of-code/
|
|
8
|
-
*/
|
|
9
|
-
declare const getCurrency: ({ currency, input }: GetCurrency) => string;
|
|
10
|
-
export default getCurrency;
|
package/number/getCurrency.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Use the International number formatting to return the currency value.
|
|
5
|
-
* https://www.freecodecamp.org/news/how-to-format-number-as-currency-in-javascript-one-line-of-code/
|
|
6
|
-
*/
|
|
7
|
-
const getCurrency = ({ currency, input }) => {
|
|
8
|
-
const value = Number(input);
|
|
9
|
-
const currencyClean = currency.toUpperCase()
|
|
10
|
-
.trim();
|
|
11
|
-
let formatted = new Intl.NumberFormat('en-GB', {
|
|
12
|
-
style: 'currency',
|
|
13
|
-
currency: currencyClean,
|
|
14
|
-
}).format(value);
|
|
15
|
-
if ('USD' === currencyClean) {
|
|
16
|
-
formatted = formatted.replace('US$', '$');
|
|
17
|
-
}
|
|
18
|
-
return formatted;
|
|
19
|
-
};
|
|
20
|
-
exports.default = getCurrency;
|
package/number/getDecimal.d.ts
DELETED
package/number/getDecimal.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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 getNumber_1 = __importDefault(require("./getNumber"));
|
|
7
|
-
/**
|
|
8
|
-
* Return a decimal number after rounding.
|
|
9
|
-
*/
|
|
10
|
-
const getDecimal = (props) => {
|
|
11
|
-
const number = (0, getNumber_1.default)({
|
|
12
|
-
input: props.input,
|
|
13
|
-
});
|
|
14
|
-
return Number(number.toFixed(props?.dp || 2));
|
|
15
|
-
};
|
|
16
|
-
exports.default = getDecimal;
|
package/number/getDivide.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type GetDivide = {
|
|
2
|
-
defaultValue?: number;
|
|
3
|
-
dp?: number;
|
|
4
|
-
divisor: any;
|
|
5
|
-
numerator: any;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Shorthand function to divide number, but fallback if the divisor is 0.
|
|
9
|
-
*/
|
|
10
|
-
declare const getDivide: (props: GetDivide) => number;
|
|
11
|
-
export default getDivide;
|
package/number/getDivide.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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 getNumber_1 = __importDefault(require("./getNumber"));
|
|
7
|
-
const getDecimal_1 = __importDefault(require("./getDecimal"));
|
|
8
|
-
/**
|
|
9
|
-
* Shorthand function to divide number, but fallback if the divisor is 0.
|
|
10
|
-
*/
|
|
11
|
-
const getDivide = (props) => {
|
|
12
|
-
const numeratorInt = (0, getNumber_1.default)({
|
|
13
|
-
input: props.numerator
|
|
14
|
-
});
|
|
15
|
-
const divisorInt = (0, getNumber_1.default)({
|
|
16
|
-
input: props.divisor
|
|
17
|
-
});
|
|
18
|
-
if (0 === divisorInt) {
|
|
19
|
-
return props.defaultValue || 0;
|
|
20
|
-
}
|
|
21
|
-
return (0, getDecimal_1.default)({
|
|
22
|
-
dp: props?.dp,
|
|
23
|
-
input: numeratorInt / divisorInt
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
exports.default = getDivide;
|
package/number/getNumber.d.ts
DELETED
package/number/getNumber.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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 isJson_1 = __importDefault(require("../json/isJson"));
|
|
7
|
-
/**
|
|
8
|
-
* Take an input and return a number.
|
|
9
|
-
*/
|
|
10
|
-
const getNumber = ({ defaultValue = 0, input = '' }) => {
|
|
11
|
-
const actualDefaultValue = defaultValue || 0;
|
|
12
|
-
let response = input;
|
|
13
|
-
// JSON - Decode the value
|
|
14
|
-
if ((0, isJson_1.default)({ input })) {
|
|
15
|
-
// Only parse this if it's a string
|
|
16
|
-
if ('string' === typeof input) {
|
|
17
|
-
response = JSON.parse(input);
|
|
18
|
-
}
|
|
19
|
-
// Already decoded
|
|
20
|
-
else {
|
|
21
|
-
response = input;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
// Already a number
|
|
25
|
-
if ('number' === typeof response) {
|
|
26
|
-
response = response;
|
|
27
|
-
}
|
|
28
|
-
// String input
|
|
29
|
-
else if ('string' === typeof response) {
|
|
30
|
-
// Attempt to convert to number
|
|
31
|
-
response = Number(response);
|
|
32
|
-
// Not a number, try extracting the number value
|
|
33
|
-
if (isNaN(response)) {
|
|
34
|
-
const match = RegExp(/^\D*([0-9\.]*)\D*$/, 'g')
|
|
35
|
-
.exec(input);
|
|
36
|
-
if (match.length) {
|
|
37
|
-
response = Number(match[1]);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// Attempt to convert to a number
|
|
42
|
-
else {
|
|
43
|
-
response = Number(response);
|
|
44
|
-
}
|
|
45
|
-
// Trouble converting the number, use default value
|
|
46
|
-
if (isNaN(response)) {
|
|
47
|
-
response = actualDefaultValue;
|
|
48
|
-
}
|
|
49
|
-
return response;
|
|
50
|
-
};
|
|
51
|
-
exports.default = getNumber;
|