@8ms/helpers 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deploy_npmjs.yml +0 -3
- package/.yarn/install-state.gz +0 -0
- package/dist/_class/index.d.mts +2 -0
- package/dist/_class/index.mjs +62 -0
- package/dist/adverity/index.d.mts +2 -0
- package/dist/adverity/index.mjs +64 -0
- package/{adverity/server/getJobs.d.ts → dist/adverity/server/index.d.mts} +11 -8
- package/dist/adverity/server/index.mjs +25 -0
- package/dist/api/index.d.mts +2 -0
- package/dist/api/index.mjs +3 -0
- package/dist/api-DGKJDAfb.mjs +139 -0
- package/dist/array/index.d.mts +11 -0
- package/dist/array/index.mjs +14 -0
- package/dist/atInternet/index.d.mts +20 -0
- package/dist/atInternet/index.mjs +18 -0
- package/dist/aws/ec2/server/index.d.mts +18 -0
- package/dist/aws/ec2/server/index.mjs +48 -0
- package/dist/aws/ecs/server/index.d.mts +59 -0
- package/dist/aws/ecs/server/index.mjs +113 -0
- package/dist/aws/glue/server/index.d.mts +19 -0
- package/dist/aws/glue/server/index.mjs +36 -0
- package/dist/aws/lambda/server/index.d.mts +28 -0
- package/dist/aws/lambda/server/index.mjs +57 -0
- package/dist/aws/s3/server/index.d.mts +124 -0
- package/dist/aws/s3/server/index.mjs +361 -0
- package/dist/aws/server/index.d.mts +2 -0
- package/dist/aws/server/index.mjs +3 -0
- package/dist/aws/ses/server/index.d.mts +105 -0
- package/dist/aws/ses/server/index.mjs +269 -0
- package/dist/aws/sqs/server/index.d.mts +41 -0
- package/dist/aws/sqs/server/index.mjs +56 -0
- package/dist/aws/ssm/server/index.d.mts +18 -0
- package/dist/aws/ssm/server/index.mjs +47 -0
- package/dist/axios/index.d.mts +22 -0
- package/dist/axios/index.mjs +50 -0
- package/dist/boolean/index.d.mts +7 -0
- package/dist/boolean/index.mjs +15 -0
- package/dist/brightData/serpApi/server/index.d.mts +93 -0
- package/dist/brightData/serpApi/server/index.mjs +229 -0
- package/dist/brightData/server/index.d.mts +2 -0
- package/dist/brightData/server/index.mjs +18 -0
- package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
- package/dist/brightData/webScraperIde/server/index.mjs +50 -0
- package/dist/cache/server/index.d.mts +10 -0
- package/dist/cache/server/index.mjs +31 -0
- package/dist/chunk-CgI6uo-e.mjs +32 -0
- package/dist/crud/index.d.mts +10 -0
- package/dist/crud/index.mjs +10 -0
- package/dist/crypto/index.d.mts +28 -0
- package/dist/crypto/index.mjs +47 -0
- package/dist/date/index.d.mts +2 -0
- package/dist/date/index.mjs +471 -0
- package/dist/environment/index.d.mts +37 -0
- package/dist/environment/index.mjs +60 -0
- package/dist/eskimi/index.d.mts +52 -0
- package/dist/eskimi/index.mjs +90 -0
- package/dist/eskimi/server/index.d.mts +25 -0
- package/dist/eskimi/server/index.mjs +50 -0
- package/dist/file/index.d.mts +7 -0
- package/dist/file/index.mjs +20 -0
- package/dist/file/server/index.d.mts +8 -0
- package/dist/file/server/index.mjs +16 -0
- package/dist/from-9s4TjsYv.mjs +3878 -0
- package/dist/geo/index.d.mts +26 -0
- package/dist/geo/index.mjs +1591 -0
- package/dist/getDecimal-CafxtLhH.mjs +40 -0
- package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
- package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
- package/dist/googleAds/server/index.d.mts +27 -0
- package/dist/googleAds/server/index.mjs +48 -0
- package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
- package/dist/googleCloud/bigquery/server/index.mjs +127 -0
- package/dist/googleCloud/server/index.d.mts +2 -0
- package/dist/googleCloud/server/index.mjs +24 -0
- package/dist/googleCloud/sheets/server/index.d.mts +22 -0
- package/dist/googleCloud/sheets/server/index.mjs +31 -0
- package/dist/googleCloud/storage/server/index.d.mts +31 -0
- package/dist/googleCloud/storage/server/index.mjs +79 -0
- package/dist/googlePageSpeed/server/index.d.mts +34 -0
- package/dist/googlePageSpeed/server/index.mjs +53 -0
- package/dist/googleSearchIncidents/server/index.d.mts +73 -0
- package/dist/googleSearchIncidents/server/index.mjs +55 -0
- package/dist/greenDomain/server/index.d.mts +25 -0
- package/dist/greenDomain/server/index.mjs +31 -0
- package/dist/index-B20FTOvk.d.mts +67 -0
- package/dist/index-B4K9Z1U-.d.mts +17 -0
- package/dist/index-CFaAdPAh.d.mts +32 -0
- package/dist/index-CIG08fpw.d.mts +32 -0
- package/dist/index-CMfxuwL1.d.mts +246 -0
- package/dist/index-DEm1Wodf.d.mts +116 -0
- package/dist/index-sfVt7tI_.d.mts +18 -0
- package/dist/inngest/index.d.mts +10 -0
- package/dist/inngest/index.mjs +10 -0
- package/dist/json/index.d.mts +7 -0
- package/dist/json/index.mjs +27 -0
- package/dist/littleWarden/server/index.d.mts +56 -0
- package/dist/littleWarden/server/index.mjs +79 -0
- package/dist/lumar/api/server/index.d.mts +66 -0
- package/dist/lumar/api/server/index.mjs +111 -0
- package/dist/lumar/graphql/server/index.d.mts +308 -0
- package/dist/lumar/graphql/server/index.mjs +172 -0
- package/dist/multipart-parser-BC14QSvI.mjs +290 -0
- package/dist/myTarget/server/index.d.mts +9 -0
- package/dist/myTarget/server/index.mjs +16 -0
- package/dist/nextAuth/index.d.mts +12 -0
- package/dist/nextAuth/index.mjs +15 -0
- package/dist/nextJs/index.d.mts +19 -0
- package/dist/nextJs/index.mjs +12 -0
- package/dist/number/index.d.mts +54 -0
- package/dist/number/index.mjs +75 -0
- package/{object/replaceKeys.d.ts → dist/object/index.d.mts} +4 -1
- package/dist/object/index.mjs +22 -0
- package/dist/onePassword/server/index.d.mts +24 -0
- package/dist/onePassword/server/index.mjs +50 -0
- package/dist/openAi/server/index.d.mts +20 -0
- package/dist/openAi/server/index.mjs +46 -0
- package/dist/prisma/index.d.mts +7 -0
- package/dist/prisma/index.mjs +16 -0
- package/dist/prisma/server/index.d.mts +31 -0
- package/dist/prisma/server/index.mjs +72 -0
- package/dist/server-Bwy4JI8Z.mjs +33 -0
- package/dist/snapchat/server/index.d.mts +25 -0
- package/dist/snapchat/server/index.mjs +39 -0
- package/dist/sorting/index.d.mts +25 -0
- package/dist/sorting/index.mjs +50 -0
- package/dist/src-BeXFXTgz.mjs +1272 -0
- package/dist/stream/server/index.d.mts +15 -0
- package/dist/stream/server/index.mjs +48 -0
- package/dist/string/index.d.mts +107 -0
- package/dist/string/index.mjs +191 -0
- package/dist/swr/client/index.d.mts +46 -0
- package/dist/swr/client/index.mjs +40 -0
- package/dist/upTimeRobot/server/index.d.mts +72 -0
- package/dist/upTimeRobot/server/index.mjs +83 -0
- package/dist/url/index.d.mts +29 -0
- package/dist/url/index.mjs +52 -0
- package/dist/url/server/index.d.mts +9 -0
- package/dist/url/server/index.mjs +35 -0
- package/dist/util/index.d.mts +47 -0
- package/dist/util/index.mjs +99 -0
- package/dist/util/server/index.d.mts +27 -0
- package/dist/util/server/index.mjs +61 -0
- package/dist/webWorker/index.d.mts +11 -0
- package/dist/webWorker/index.mjs +11 -0
- package/dist/xml/server/index.d.mts +4 -0
- package/dist/xml/server/index.mjs +17 -0
- package/package.json +70 -1066
- package/tsdown.config.ts +10 -0
- package/.github/generate-exports.js +0 -69
- package/_class/BaseClass.d.ts +0 -18
- package/_class/BaseClass.js +0 -44
- package/_class/BaseNamespace.d.ts +0 -9
- package/_class/BaseNamespace.js +0 -24
- package/_class/index.d.ts +0 -2
- package/_class/index.js +0 -2
- package/adverity/adverity.d.ts +0 -112
- package/adverity/adverity.js +0 -58
- package/adverity/index.d.ts +0 -1
- package/adverity/index.js +0 -1
- package/adverity/server/getJobs.js +0 -26
- package/adverity/server/index.d.ts +0 -1
- package/adverity/server/index.js +0 -1
- package/api/ApiResponseClass.d.ts +0 -35
- package/api/ApiResponseClass.js +0 -93
- package/api/api.d.ts +0 -17
- package/api/api.js +0 -15
- package/api/functions.d.ts +0 -7
- package/api/functions.js +0 -19
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -3
- package/array/array.d.ts +0 -8
- package/array/array.js +0 -9
- package/array/index.d.ts +0 -1
- package/array/index.js +0 -1
- package/atInternet/atInternet.d.ts +0 -16
- package/atInternet/atInternet.js +0 -15
- package/atInternet/index.d.ts +0 -1
- package/atInternet/index.js +0 -1
- package/aws/ec2/server/AwsEc2Namespace.d.ts +0 -10
- package/aws/ec2/server/AwsEc2Namespace.js +0 -37
- package/aws/ec2/server/awsEc2.d.ts +0 -3
- package/aws/ec2/server/awsEc2.js +0 -12
- package/aws/ec2/server/index.d.ts +0 -2
- package/aws/ec2/server/index.js +0 -2
- package/aws/ecs/server/AwsEcsNamespace.d.ts +0 -53
- package/aws/ecs/server/AwsEcsNamespace.js +0 -118
- package/aws/ecs/server/awsEcs.d.ts +0 -3
- package/aws/ecs/server/awsEcs.js +0 -12
- package/aws/ecs/server/index.d.ts +0 -2
- package/aws/ecs/server/index.js +0 -2
- package/aws/glue/server/AwsGlueNamespace.d.ts +0 -12
- package/aws/glue/server/AwsGlueNamespace.js +0 -29
- package/aws/glue/server/awsGlue.d.ts +0 -3
- package/aws/glue/server/awsGlue.js +0 -12
- package/aws/glue/server/index.d.ts +0 -2
- package/aws/glue/server/index.js +0 -2
- package/aws/lambda/server/AwsLambdaNamespace.d.ts +0 -21
- package/aws/lambda/server/AwsLambdaNamespace.js +0 -69
- package/aws/lambda/server/awsLambda.d.ts +0 -4
- package/aws/lambda/server/awsLambda.js +0 -16
- package/aws/lambda/server/index.d.ts +0 -2
- package/aws/lambda/server/index.js +0 -2
- package/aws/s3/server/AwsS3Namespace.d.ts +0 -65
- package/aws/s3/server/AwsS3Namespace.js +0 -364
- package/aws/s3/server/awsS3.d.ts +0 -13
- package/aws/s3/server/awsS3.js +0 -20
- package/aws/s3/server/index.d.ts +0 -3
- package/aws/s3/server/index.js +0 -3
- package/aws/s3/server/payload.d.ts +0 -42
- package/aws/s3/server/payload.js +0 -43
- package/aws/server/aws.d.ts +0 -9
- package/aws/server/aws.js +0 -29
- package/aws/server/index.d.ts +0 -2
- package/aws/server/index.js +0 -2
- package/aws/server/isResponse200.d.ts +0 -4
- package/aws/server/isResponse200.js +0 -12
- package/aws/ses/server/AwsSesNamespace.d.ts +0 -9
- package/aws/ses/server/AwsSesNamespace.js +0 -41
- package/aws/ses/server/SimpleEmail.d.ts +0 -81
- package/aws/ses/server/SimpleEmail.js +0 -296
- package/aws/ses/server/awsSes.d.ts +0 -4
- package/aws/ses/server/awsSes.js +0 -13
- package/aws/ses/server/index.d.ts +0 -3
- package/aws/ses/server/index.js +0 -3
- package/aws/sqs/server/AwsSqsNamespace.d.ts +0 -34
- package/aws/sqs/server/AwsSqsNamespace.js +0 -55
- package/aws/sqs/server/awsSqs.d.ts +0 -3
- package/aws/sqs/server/awsSqs.js +0 -12
- package/aws/sqs/server/index.d.ts +0 -2
- package/aws/sqs/server/index.js +0 -2
- package/aws/ssm/server/AwsSsmNamespace.d.ts +0 -11
- package/aws/ssm/server/AwsSsmNamespace.js +0 -52
- package/aws/ssm/server/awsSsm.d.ts +0 -3
- package/aws/ssm/server/awsSsm.js +0 -12
- package/aws/ssm/server/index.d.ts +0 -2
- package/aws/ssm/server/index.js +0 -2
- package/axios/deleteRequest.d.ts +0 -6
- package/axios/deleteRequest.js +0 -26
- package/axios/get.d.ts +0 -5
- package/axios/get.js +0 -24
- package/axios/index.d.ts +0 -3
- package/axios/index.js +0 -3
- package/axios/post.d.ts +0 -5
- package/axios/post.js +0 -25
- package/boolean/boolean.d.ts +0 -4
- package/boolean/boolean.js +0 -16
- package/boolean/index.d.ts +0 -1
- package/boolean/index.js +0 -1
- package/brightData/serpApi/server/brightDataSerpApi.d.ts +0 -10
- package/brightData/serpApi/server/brightDataSerpApi.js +0 -9
- package/brightData/serpApi/server/buildGoogleSerpUrl.d.ts +0 -32
- package/brightData/serpApi/server/buildGoogleSerpUrl.js +0 -112
- package/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts +0 -22
- package/brightData/serpApi/server/buildGoogleTrendsUrl.js +0 -57
- package/brightData/serpApi/server/getAsyncRequestId.d.ts +0 -8
- package/brightData/serpApi/server/getAsyncRequestId.js +0 -32
- package/brightData/serpApi/server/getAsyncResults.d.ts +0 -7
- package/brightData/serpApi/server/getAsyncResults.js +0 -31
- package/brightData/serpApi/server/getRealtime.d.ts +0 -5
- package/brightData/serpApi/server/getRealtime.js +0 -26
- package/brightData/serpApi/server/index.d.ts +0 -6
- package/brightData/serpApi/server/index.js +0 -6
- package/brightData/server/brightData.d.ts +0 -15
- package/brightData/server/brightData.js +0 -15
- package/brightData/server/index.d.ts +0 -1
- package/brightData/server/index.js +0 -1
- package/brightData/webScraperIde/server/getBatch.d.ts +0 -7
- package/brightData/webScraperIde/server/getBatch.js +0 -24
- package/brightData/webScraperIde/server/getRealtime.d.ts +0 -7
- package/brightData/webScraperIde/server/getRealtime.js +0 -45
- package/brightData/webScraperIde/server/index.d.ts +0 -2
- package/brightData/webScraperIde/server/index.js +0 -2
- package/cache/server/cache.d.ts +0 -7
- package/cache/server/cache.js +0 -43
- package/cache/server/index.d.ts +0 -1
- package/cache/server/index.js +0 -1
- package/cache/server/test/cache.test.d.ts +0 -1
- package/cache/server/test/cache.test.js +0 -8
- package/crud/crud.d.ts +0 -7
- package/crud/crud.js +0 -6
- package/crud/index.d.ts +0 -1
- package/crud/index.js +0 -1
- package/crypto/getDecrypt.d.ts +0 -5
- package/crypto/getDecrypt.js +0 -10
- package/crypto/getEncrypt.d.ts +0 -5
- package/crypto/getEncrypt.js +0 -10
- package/crypto/getRandom.d.ts +0 -4
- package/crypto/getRandom.js +0 -8
- package/crypto/getSha256.d.ts +0 -5
- package/crypto/getSha256.js +0 -11
- package/crypto/index.d.ts +0 -4
- package/crypto/index.js +0 -4
- package/date/calculation.d.ts +0 -102
- package/date/calculation.js +0 -272
- package/date/date.d.ts +0 -36
- package/date/date.js +0 -20
- package/date/financialYear.d.ts +0 -19
- package/date/financialYear.js +0 -78
- package/date/format.d.ts +0 -85
- package/date/format.js +0 -160
- package/date/index.d.ts +0 -4
- package/date/index.js +0 -4
- package/environment/environment.d.ts +0 -34
- package/environment/environment.js +0 -79
- package/environment/index.d.ts +0 -1
- package/environment/index.js +0 -1
- package/eskimi/eskimi.d.ts +0 -49
- package/eskimi/eskimi.js +0 -93
- package/eskimi/index.d.ts +0 -1
- package/eskimi/index.js +0 -1
- package/eskimi/server/getAgeGroup.d.ts +0 -4
- package/eskimi/server/getAgeGroup.js +0 -11
- package/eskimi/server/getData.d.ts +0 -4
- package/eskimi/server/getData.js +0 -13
- package/eskimi/server/getDevice.d.ts +0 -4
- package/eskimi/server/getDevice.js +0 -11
- package/eskimi/server/getGender.d.ts +0 -4
- package/eskimi/server/getGender.js +0 -11
- package/eskimi/server/index.d.ts +0 -4
- package/eskimi/server/index.js +0 -4
- package/file/getFileKey.d.ts +0 -4
- package/file/getFileKey.js +0 -23
- package/file/index.d.ts +0 -1
- package/file/index.js +0 -1
- package/file/server/createDirectory.d.ts +0 -5
- package/file/server/createDirectory.js +0 -13
- package/file/server/index.d.ts +0 -1
- package/file/server/index.js +0 -1
- package/geo/countries.d.ts +0 -12
- package/geo/countries.js +0 -219
- package/geo/index.d.ts +0 -2
- package/geo/index.js +0 -2
- package/geo/languages.d.ts +0 -9
- package/geo/languages.js +0 -55
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +0 -41
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +0 -55
- package/googleAds/keywordPlanner/server/index.d.ts +0 -1
- package/googleAds/keywordPlanner/server/index.js +0 -1
- package/googleAds/server/GoogleAdsNamespace.d.ts +0 -11
- package/googleAds/server/GoogleAdsNamespace.js +0 -30
- package/googleAds/server/googleAds.d.ts +0 -11
- package/googleAds/server/googleAds.js +0 -26
- package/googleAds/server/index.d.ts +0 -2
- package/googleAds/server/index.js +0 -2
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts +0 -50
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js +0 -115
- package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +0 -5
- package/googleCloud/bigquery/server/googleCloudBigquery.js +0 -41
- package/googleCloud/bigquery/server/index.d.ts +0 -3
- package/googleCloud/bigquery/server/index.js +0 -3
- package/googleCloud/bigquery/server/loadData.d.ts +0 -19
- package/googleCloud/bigquery/server/loadData.js +0 -14
- package/googleCloud/server/googleCloud.d.ts +0 -29
- package/googleCloud/server/googleCloud.js +0 -25
- package/googleCloud/server/index.d.ts +0 -1
- package/googleCloud/server/index.js +0 -1
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts +0 -18
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.js +0 -37
- package/googleCloud/sheets/server/getAssociatedData.d.ts +0 -10
- package/googleCloud/sheets/server/getAssociatedData.js +0 -39
- package/googleCloud/sheets/server/index.d.ts +0 -1
- package/googleCloud/sheets/server/index.js +0 -1
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.d.ts +0 -22
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.js +0 -66
- package/googleCloud/storage/server/googleCloudStorage.d.ts +0 -3
- package/googleCloud/storage/server/googleCloudStorage.js +0 -37
- package/googleCloud/storage/server/index.d.ts +0 -2
- package/googleCloud/storage/server/index.js +0 -2
- package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +0 -11
- package/googlePageSpeed/server/GooglePageSpeedNamespace.js +0 -27
- package/googlePageSpeed/server/googlePageSpeed.d.ts +0 -19
- package/googlePageSpeed/server/googlePageSpeed.js +0 -38
- package/googlePageSpeed/server/index.d.ts +0 -2
- package/googlePageSpeed/server/index.js +0 -2
- package/googleSearchIncidents/server/googleSearchIncidents.d.ts +0 -69
- package/googleSearchIncidents/server/googleSearchIncidents.js +0 -42
- package/googleSearchIncidents/server/index.d.ts +0 -1
- package/googleSearchIncidents/server/index.js +0 -1
- package/greenDomain/server/greenDomain.d.ts +0 -21
- package/greenDomain/server/greenDomain.js +0 -37
- package/greenDomain/server/index.d.ts +0 -1
- package/greenDomain/server/index.js +0 -1
- package/inngest/index.d.ts +0 -1
- package/inngest/index.js +0 -1
- package/inngest/inngest.d.ts +0 -7
- package/inngest/inngest.js +0 -6
- package/json/getJsonNewline.d.ts +0 -1
- package/json/getJsonNewline.js +0 -9
- package/json/index.d.ts +0 -2
- package/json/index.js +0 -2
- package/json/isJson.d.ts +0 -1
- package/json/isJson.js +0 -22
- package/littleWarden/server/LittleWardenNamespace.d.ts +0 -11
- package/littleWarden/server/LittleWardenNamespace.js +0 -30
- package/littleWarden/server/getUrlStatus.d.ts +0 -4
- package/littleWarden/server/getUrlStatus.js +0 -12
- package/littleWarden/server/index.d.ts +0 -2
- package/littleWarden/server/index.js +0 -2
- package/littleWarden/server/littleWarden.d.ts +0 -30
- package/littleWarden/server/littleWarden.js +0 -65
- package/lumar/api/server/buildRequest.d.ts +0 -13
- package/lumar/api/server/buildRequest.js +0 -76
- package/lumar/api/server/getData.d.ts +0 -1
- package/lumar/api/server/getData.js +0 -9
- package/lumar/api/server/index.d.ts +0 -4
- package/lumar/api/server/index.js +0 -4
- package/lumar/api/server/initClient.d.ts +0 -6
- package/lumar/api/server/initClient.js +0 -22
- package/lumar/api/server/lumarApi.d.ts +0 -36
- package/lumar/api/server/lumarApi.js +0 -24
- package/lumar/graphql/server/columns.d.ts +0 -29
- package/lumar/graphql/server/columns.js +0 -28
- package/lumar/graphql/server/getData.d.ts +0 -1
- package/lumar/graphql/server/getData.js +0 -15
- package/lumar/graphql/server/index.d.ts +0 -11
- package/lumar/graphql/server/index.js +0 -11
- package/lumar/graphql/server/initClient.d.ts +0 -5
- package/lumar/graphql/server/initClient.js +0 -21
- package/lumar/graphql/server/lumarGraphql.d.ts +0 -27
- package/lumar/graphql/server/lumarGraphql.js +0 -27
- package/lumar/graphql/server/queries/crawl.d.ts +0 -5
- package/lumar/graphql/server/queries/crawl.js +0 -1
- package/lumar/graphql/server/queries/getCrawls.d.ts +0 -18
- package/lumar/graphql/server/queries/getCrawls.js +0 -31
- package/lumar/graphql/server/queries/getReportDifferences.d.ts +0 -24
- package/lumar/graphql/server/queries/getReportDifferences.js +0 -35
- package/lumar/graphql/server/queries/getRows.d.ts +0 -38
- package/lumar/graphql/server/queries/getRows.js +0 -55
- package/lumar/graphql/server/queries/getTotals.d.ts +0 -25
- package/lumar/graphql/server/queries/getTotals.js +0 -38
- package/lumar/graphql/server/queries/row.d.ts +0 -157
- package/lumar/graphql/server/queries/row.js +0 -1
- package/lumar/graphql/server/reportTemplates.d.ts +0 -68
- package/lumar/graphql/server/reportTemplates.js +0 -67
- package/myTarget/server/index.d.ts +0 -1
- package/myTarget/server/index.js +0 -1
- package/myTarget/server/myTarget.d.ts +0 -5
- package/myTarget/server/myTarget.js +0 -13
- package/nextAuth/index.d.ts +0 -2
- package/nextAuth/index.js +0 -2
- package/nextAuth/isSessionReady.d.ts +0 -1
- package/nextAuth/isSessionReady.js +0 -3
- package/nextAuth/nextAuth.d.ts +0 -7
- package/nextAuth/nextAuth.js +0 -6
- package/nextJs/client/LazyLoad.d.ts +0 -8
- package/nextJs/client/LazyLoad.js +0 -7
- package/nextJs/client/index.d.ts +0 -1
- package/nextJs/client/index.js +0 -1
- package/nextJs/index.d.ts +0 -1
- package/nextJs/index.js +0 -1
- package/nextJs/nextJs.d.ts +0 -12
- package/nextJs/nextJs.js +0 -8
- package/number/format.d.ts +0 -12
- package/number/format.js +0 -16
- package/number/formatCurrency.d.ts +0 -5
- package/number/formatCurrency.js +0 -17
- package/number/getDecimal.d.ts +0 -4
- package/number/getDecimal.js +0 -8
- package/number/getNumber.d.ts +0 -4
- package/number/getNumber.js +0 -44
- package/number/getPercent.d.ts +0 -1
- package/number/getPercent.js +0 -11
- package/number/getPercentIncrease.d.ts +0 -4
- package/number/getPercentIncrease.js +0 -12
- package/number/getSafeDivide.d.ts +0 -11
- package/number/getSafeDivide.js +0 -16
- package/number/index.d.ts +0 -7
- package/number/index.js +0 -7
- package/object/index.d.ts +0 -1
- package/object/index.js +0 -1
- package/object/replaceKeys.js +0 -21
- package/onePassword/server/OnePasswordNamespace.d.ts +0 -12
- package/onePassword/server/OnePasswordNamespace.js +0 -39
- package/onePassword/server/index.d.ts +0 -2
- package/onePassword/server/index.js +0 -2
- package/onePassword/server/onePassword.d.ts +0 -8
- package/onePassword/server/onePassword.js +0 -21
- package/openAi/server/OpenAiNamespace.d.ts +0 -11
- package/openAi/server/OpenAiNamespace.js +0 -35
- package/openAi/server/index.d.ts +0 -2
- package/openAi/server/index.js +0 -2
- package/openAi/server/openAi.d.ts +0 -6
- package/openAi/server/openAi.js +0 -26
- package/prisma/getDecimal.d.ts +0 -4
- package/prisma/getDecimal.js +0 -16
- package/prisma/index.d.ts +0 -1
- package/prisma/index.js +0 -1
- package/prisma/server/PrismaNamespace.d.ts +0 -7
- package/prisma/server/PrismaNamespace.js +0 -62
- package/prisma/server/index.d.ts +0 -2
- package/prisma/server/index.js +0 -2
- package/prisma/server/prisma.d.ts +0 -20
- package/prisma/server/prisma.js +0 -26
- package/snapchat/server/SnapchatNamespace.d.ts +0 -15
- package/snapchat/server/SnapchatNamespace.js +0 -22
- package/snapchat/server/index.d.ts +0 -2
- package/snapchat/server/index.js +0 -2
- package/snapchat/server/snapchat.d.ts +0 -7
- package/snapchat/server/snapchat.js +0 -26
- package/sorting/byNumberAscending.d.ts +0 -4
- package/sorting/byNumberAscending.js +0 -15
- package/sorting/byNumberDescending.d.ts +0 -4
- package/sorting/byNumberDescending.js +0 -18
- package/sorting/byStringAscending.d.ts +0 -4
- package/sorting/byStringAscending.js +0 -12
- package/sorting/byStringDescending.d.ts +0 -4
- package/sorting/byStringDescending.js +0 -12
- package/sorting/index.d.ts +0 -1
- package/sorting/index.js +0 -1
- package/sorting/sorting.d.ts +0 -4
- package/sorting/sorting.js +0 -4
- package/stream/server/index.d.ts +0 -1
- package/stream/server/index.js +0 -1
- package/stream/server/sort.d.ts +0 -13
- package/stream/server/sort.js +0 -47
- package/string/getCapitalised.d.ts +0 -5
- package/string/getCapitalised.js +0 -21
- package/string/getClean.d.ts +0 -18
- package/string/getClean.js +0 -47
- package/string/getFolder.d.ts +0 -4
- package/string/getFolder.js +0 -8
- package/string/getProperCase.d.ts +0 -11
- package/string/getProperCase.js +0 -43
- package/string/getString.d.ts +0 -4
- package/string/getString.js +0 -27
- package/string/getStringFromStream.d.ts +0 -5
- package/string/getStringFromStream.js +0 -13
- package/string/getUnescaped.d.ts +0 -6
- package/string/getUnescaped.js +0 -19
- package/string/getWithoutAccents.d.ts +0 -5
- package/string/getWithoutAccents.js +0 -9
- package/string/getWithoutHtmlTags.d.ts +0 -5
- package/string/getWithoutHtmlTags.js +0 -8
- package/string/getWithoutPunctuation.d.ts +0 -5
- package/string/getWithoutPunctuation.js +0 -9
- package/string/getWithoutUnderscores.d.ts +0 -4
- package/string/getWithoutUnderscores.js +0 -7
- package/string/getWithoutWhitespaces.d.ts +0 -5
- package/string/getWithoutWhitespaces.js +0 -9
- package/string/index.d.ts +0 -13
- package/string/index.js +0 -13
- package/string/reservedWords.d.ts +0 -5
- package/string/reservedWords.js +0 -22
- package/swr/client/index.d.ts +0 -1
- package/swr/client/index.js +0 -1
- package/swr/client/swr.d.ts +0 -42
- package/swr/client/swr.js +0 -50
- package/upTimeRobot/server/UpTimeRobotNamespace.d.ts +0 -31
- package/upTimeRobot/server/UpTimeRobotNamespace.js +0 -40
- package/upTimeRobot/server/index.d.ts +0 -2
- package/upTimeRobot/server/index.js +0 -2
- package/upTimeRobot/server/upTimeRobot.d.ts +0 -38
- package/upTimeRobot/server/upTimeRobot.js +0 -59
- package/url/index.d.ts +0 -1
- package/url/index.js +0 -1
- package/url/server/index.d.ts +0 -1
- package/url/server/index.js +0 -1
- package/url/server/writeUrlContents.d.ts +0 -6
- package/url/server/writeUrlContents.js +0 -35
- package/url/url.d.ts +0 -26
- package/url/url.js +0 -59
- package/util/defaultTo.d.ts +0 -4
- package/util/defaultTo.js +0 -37
- package/util/getClean.d.ts +0 -11
- package/util/getClean.js +0 -19
- package/util/getError.d.ts +0 -1
- package/util/getError.js +0 -10
- package/util/getWithoutHash.d.ts +0 -4
- package/util/getWithoutHash.js +0 -14
- package/util/getWithoutParameter.d.ts +0 -4
- package/util/getWithoutParameter.js +0 -14
- package/util/index.d.ts +0 -7
- package/util/index.js +0 -7
- package/util/isUndefined.d.ts +0 -4
- package/util/isUndefined.js +0 -9
- package/util/promiseChunks.d.ts +0 -5
- package/util/promiseChunks.js +0 -21
- package/util/server/getBrotliCompressed.d.ts +0 -5
- package/util/server/getBrotliCompressed.js +0 -16
- package/util/server/getBrotliDecompressed.d.ts +0 -5
- package/util/server/getBrotliDecompressed.js +0 -17
- package/util/server/getGzipCompressed.d.ts +0 -5
- package/util/server/getGzipCompressed.js +0 -16
- package/util/server/getGzipDecompressed.d.ts +0 -5
- package/util/server/getGzipDecompressed.js +0 -17
- package/util/server/index.d.ts +0 -4
- package/util/server/index.js +0 -4
- package/util/sleep.d.ts +0 -1
- package/util/sleep.js +0 -3
- package/webWorker/index.d.ts +0 -1
- package/webWorker/index.js +0 -1
- package/webWorker/webWorker.d.ts +0 -8
- package/webWorker/webWorker.js +0 -7
- package/xml/server/getXml.d.ts +0 -1
- package/xml/server/getXml.js +0 -14
- package/xml/server/index.d.ts +0 -1
- package/xml/server/index.js +0 -1
package/date/financialYear.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { getLuxonDate, getToday, getYesterday } from "./calculation";
|
|
2
|
-
import { Interval } from "luxon";
|
|
3
|
-
/**
|
|
4
|
-
* Get the financial year based on an optional year.
|
|
5
|
-
*/
|
|
6
|
-
export const getFinancialYear = (year) => {
|
|
7
|
-
// Either use the current year or a specified year
|
|
8
|
-
let financialYear = year;
|
|
9
|
-
if ("undefined" === typeof year) {
|
|
10
|
-
const todayInstance = getToday();
|
|
11
|
-
// If today is before 1st of April, then use last year
|
|
12
|
-
if (todayInstance < getLuxonDate(`${todayInstance.toFormat("yyyy")}-04-01`)) {
|
|
13
|
-
financialYear = Number(todayInstance.toFormat("yyyy")) - 1;
|
|
14
|
-
}
|
|
15
|
-
// On or after 1st of April, use this year
|
|
16
|
-
else {
|
|
17
|
-
financialYear = Number(todayInstance.toFormat("yyyy"));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
// The year start needs to be 1st April this year - if its not a monday we need to shift this to the next monday.
|
|
21
|
-
let yearStartInstance = getLuxonDate(`${financialYear}-04-01`);
|
|
22
|
-
// Get the previous Monday if the 1st of April isn't a Monday
|
|
23
|
-
if ("Mon" !== yearStartInstance.toFormat("EEE")) {
|
|
24
|
-
// Get the ISO Day of the week (Monday - 1 to Sunday - 7)
|
|
25
|
-
const dayOfWeek = Number(yearStartInstance.toFormat("E"));
|
|
26
|
-
// Calculate days to subtract to get to previous Monday
|
|
27
|
-
const daysToSubtract = dayOfWeek - 1;
|
|
28
|
-
yearStartInstance = yearStartInstance.minus({ days: daysToSubtract });
|
|
29
|
-
}
|
|
30
|
-
// The year-end needs to be 31st March next year
|
|
31
|
-
// We are specifying the date, so don't change the timezone
|
|
32
|
-
let yearEndInstance = getLuxonDate(`${(financialYear + 1)}-03-31`);
|
|
33
|
-
// Get the next Sunday if the 31st of March isn't a Sunday
|
|
34
|
-
if ("Sun" !== yearEndInstance.toFormat("EEE")) {
|
|
35
|
-
// Get the ISO Day of the week (Monday - 1 to Sunday - 7)
|
|
36
|
-
const dayOfWeek = Number(yearEndInstance.toFormat("E"));
|
|
37
|
-
// Calculate days to add to get to next Sunday
|
|
38
|
-
const daysToAdd = 7 - dayOfWeek;
|
|
39
|
-
yearEndInstance = yearEndInstance.plus({ days: daysToAdd });
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
end: yearEndInstance,
|
|
43
|
-
start: yearStartInstance,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Return the current financial year up to today.
|
|
48
|
-
*/
|
|
49
|
-
export const getFinancialYearToDate = () => {
|
|
50
|
-
const todayInstance = getToday();
|
|
51
|
-
const thisFinancialYear = getFinancialYear();
|
|
52
|
-
return {
|
|
53
|
-
end: todayInstance,
|
|
54
|
-
start: thisFinancialYear.start,
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Return the current financial year up to yesterday.
|
|
59
|
-
* Timezone should always be London based
|
|
60
|
-
*/
|
|
61
|
-
export const getFinancialYearToYesterday = () => {
|
|
62
|
-
const yesterdayInstance = getYesterday();
|
|
63
|
-
const thisFinancialYear = getFinancialYear();
|
|
64
|
-
return {
|
|
65
|
-
end: yesterdayInstance,
|
|
66
|
-
start: thisFinancialYear.start,
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Get the current financial year.
|
|
71
|
-
*/
|
|
72
|
-
export const getFinancialYearWeeks = (year) => {
|
|
73
|
-
const financialYear = getFinancialYear(year);
|
|
74
|
-
const response = Interval
|
|
75
|
-
.fromDateTimes(financialYear.start, financialYear.end)
|
|
76
|
-
.splitBy({ weeks: 1 });
|
|
77
|
-
return response;
|
|
78
|
-
};
|
package/date/format.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { InputDate } from "./date";
|
|
2
|
-
import { DateTime } from "luxon";
|
|
3
|
-
/**
|
|
4
|
-
* Convert a number of seconds into HH:MM:SS
|
|
5
|
-
* https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
|
|
6
|
-
*/
|
|
7
|
-
export declare const getDurationHours: (seconds: number) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Convert a number of seconds into MM:SS
|
|
10
|
-
* https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
|
|
11
|
-
*/
|
|
12
|
-
export declare const getDurationMinutes: (seconds: number) => string;
|
|
13
|
-
/**
|
|
14
|
-
* Simple function takes any DateTime, String or Number and formats it.
|
|
15
|
-
*/
|
|
16
|
-
export declare const format: (input: InputDate, dateFormat: string) => string;
|
|
17
|
-
/**
|
|
18
|
-
* Convert a Date into a dd number.
|
|
19
|
-
*/
|
|
20
|
-
export declare const getDayNumber: (input: InputDate) => number;
|
|
21
|
-
/**
|
|
22
|
-
* Whenever we are displaying a month and year date in Codex, this will be the standardised format.
|
|
23
|
-
* Example: 1901-02-03 → 3 Feb 1901
|
|
24
|
-
*/
|
|
25
|
-
export declare const getFullDate: (input: InputDate) => string;
|
|
26
|
-
/**
|
|
27
|
-
* Whenever we are displaying a month and year date in Codex, this will be the standardised format.
|
|
28
|
-
* Example: 1901-02-03 01:23:45 → 1:23am 3 Feb 1901
|
|
29
|
-
*/
|
|
30
|
-
export declare const getFullDateTime: (input: InputDate) => string;
|
|
31
|
-
/**
|
|
32
|
-
* Returns a MMM YYYY value as a number for a given year.
|
|
33
|
-
* Example: 1901-02-03 → Feb 1901
|
|
34
|
-
*/
|
|
35
|
-
export declare const getMonthYearString: (input: InputDate) => string;
|
|
36
|
-
/**
|
|
37
|
-
* Returns a YYYY MMM value as a number for a given year.
|
|
38
|
-
* Example: 1901-02-03 → 1901 Feb
|
|
39
|
-
*/
|
|
40
|
-
export declare const getYearMonthString: (input: InputDate) => string;
|
|
41
|
-
/**
|
|
42
|
-
* Shorthand to get the current date.
|
|
43
|
-
*/
|
|
44
|
-
export declare const getTodayYmdString: (setMidnight?: boolean) => string;
|
|
45
|
-
/**
|
|
46
|
-
* Shorthand to get the current date.
|
|
47
|
-
*/
|
|
48
|
-
export declare const getTodayYmdHisString: (setMidnight?: boolean) => string;
|
|
49
|
-
/**
|
|
50
|
-
* Shorthand to get the current date.
|
|
51
|
-
*/
|
|
52
|
-
export declare const getTodayYmdNumber: (setMidnight?: boolean) => number;
|
|
53
|
-
/**
|
|
54
|
-
* Shorthand to get the current date.
|
|
55
|
-
*/
|
|
56
|
-
export declare const getTodayYmdHisNumber: (setMidnight?: boolean) => number;
|
|
57
|
-
/**
|
|
58
|
-
* Convert a Date into a YYYY number.
|
|
59
|
-
*/
|
|
60
|
-
export declare const getYearNumber: (input: InputDate) => number;
|
|
61
|
-
/**
|
|
62
|
-
* Returns a YYYYMMDDHHIISS value as a number.
|
|
63
|
-
* Example: 1901-02-03 01:23:45 → 19010203012345
|
|
64
|
-
*/
|
|
65
|
-
export declare const getYmdHisNumber: (input: InputDate) => number;
|
|
66
|
-
/**
|
|
67
|
-
* Returns a YYYY-MM-DD HH:MM:SS value as a string.
|
|
68
|
-
* Example: 1901-02-03 → 1901-02-03 00:00:00
|
|
69
|
-
*/
|
|
70
|
-
export declare const getYmdHisString: (input: InputDate) => string;
|
|
71
|
-
/**
|
|
72
|
-
* Returns a YYYYMMDD value as a number.
|
|
73
|
-
* Example: 1901-02-03 → 19010203
|
|
74
|
-
*/
|
|
75
|
-
export declare const getYmdNumber: (input: InputDate) => number;
|
|
76
|
-
/**
|
|
77
|
-
* Whenever we are displaying a YYYY-MM-DD date in Codex
|
|
78
|
-
* Example: 1901-02-03 → 1901-02-03
|
|
79
|
-
*/
|
|
80
|
-
export declare const getYmdString: (input: InputDate) => string;
|
|
81
|
-
/**
|
|
82
|
-
* Convert an Excel date "e.g. 44216" into a JavaScript date object.
|
|
83
|
-
* https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
|
|
84
|
-
*/
|
|
85
|
-
export declare const getLuxonDateFromExcel: (serial: number) => DateTime<true> | DateTime<false>;
|
package/date/format.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { getLuxonDate, getToday } from "./calculation";
|
|
2
|
-
import { DateTime } from "luxon";
|
|
3
|
-
/**
|
|
4
|
-
* Convert a number of seconds into HH:MM:SS
|
|
5
|
-
* https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
|
|
6
|
-
*/
|
|
7
|
-
export const getDurationHours = (seconds) => {
|
|
8
|
-
let response = "00:00:00";
|
|
9
|
-
if (seconds > 0) {
|
|
10
|
-
const calculated = {
|
|
11
|
-
hours: Math.floor(seconds / 3600),
|
|
12
|
-
minutes: Math.floor((seconds % 3600) / 60),
|
|
13
|
-
seconds: seconds % 60,
|
|
14
|
-
};
|
|
15
|
-
const output = {
|
|
16
|
-
hours: calculated.hours < 10 ? "0" + calculated.hours : calculated.hours,
|
|
17
|
-
minutes: calculated.minutes < 10 ? "0" + calculated.minutes : calculated.minutes,
|
|
18
|
-
seconds: calculated.seconds < 10 ? "0" + calculated.seconds : calculated.seconds,
|
|
19
|
-
};
|
|
20
|
-
response = `${output.hours}:${output.minutes}:${output.seconds}`;
|
|
21
|
-
}
|
|
22
|
-
return response;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Convert a number of seconds into MM:SS
|
|
26
|
-
* https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
|
|
27
|
-
*/
|
|
28
|
-
export const getDurationMinutes = (seconds) => {
|
|
29
|
-
let response = "00:00";
|
|
30
|
-
if (seconds > 0) {
|
|
31
|
-
const calculated = {
|
|
32
|
-
minutes: Math.floor((seconds % 3600) / 60),
|
|
33
|
-
seconds: seconds % 60,
|
|
34
|
-
};
|
|
35
|
-
const output = {
|
|
36
|
-
minutes: calculated.minutes < 10 ? "0" + calculated.minutes : calculated.minutes,
|
|
37
|
-
seconds: calculated.seconds < 10 ? "0" + calculated.seconds : calculated.seconds,
|
|
38
|
-
};
|
|
39
|
-
response = `${output.minutes}:${output.seconds}`;
|
|
40
|
-
}
|
|
41
|
-
return response;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Simple function takes any DateTime, String or Number and formats it.
|
|
45
|
-
*/
|
|
46
|
-
export const format = (input, dateFormat) => {
|
|
47
|
-
return getLuxonDate(input).toFormat(dateFormat);
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Convert a Date into a dd number.
|
|
51
|
-
*/
|
|
52
|
-
export const getDayNumber = (input) => {
|
|
53
|
-
return Number(format(input, "dd"));
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Whenever we are displaying a month and year date in Codex, this will be the standardised format.
|
|
57
|
-
* Example: 1901-02-03 → 3 Feb 1901
|
|
58
|
-
*/
|
|
59
|
-
export const getFullDate = (input) => {
|
|
60
|
-
return format(input, "d MMM yyyy");
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Whenever we are displaying a month and year date in Codex, this will be the standardised format.
|
|
64
|
-
* Example: 1901-02-03 01:23:45 → 1:23am 3 Feb 1901
|
|
65
|
-
*/
|
|
66
|
-
export const getFullDateTime = (input) => {
|
|
67
|
-
return format(input, "d MMM yyyy h:mm:ss");
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Returns a MMM YYYY value as a number for a given year.
|
|
71
|
-
* Example: 1901-02-03 → Feb 1901
|
|
72
|
-
*/
|
|
73
|
-
export const getMonthYearString = (input) => {
|
|
74
|
-
return format(input, "MMM yyyy");
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Returns a YYYY MMM value as a number for a given year.
|
|
78
|
-
* Example: 1901-02-03 → 1901 Feb
|
|
79
|
-
*/
|
|
80
|
-
export const getYearMonthString = (input) => {
|
|
81
|
-
return format(input, "yyyy MMM");
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Shorthand to get the current date.
|
|
85
|
-
*/
|
|
86
|
-
export const getTodayYmdString = (setMidnight) => {
|
|
87
|
-
const today = getToday(setMidnight);
|
|
88
|
-
return getYmdString(today);
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Shorthand to get the current date.
|
|
92
|
-
*/
|
|
93
|
-
export const getTodayYmdHisString = (setMidnight) => {
|
|
94
|
-
const today = getToday(setMidnight);
|
|
95
|
-
return getYmdHisString(today);
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Shorthand to get the current date.
|
|
99
|
-
*/
|
|
100
|
-
export const getTodayYmdNumber = (setMidnight) => {
|
|
101
|
-
const today = getToday(setMidnight);
|
|
102
|
-
return getYmdNumber(today);
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Shorthand to get the current date.
|
|
106
|
-
*/
|
|
107
|
-
export const getTodayYmdHisNumber = (setMidnight) => {
|
|
108
|
-
const today = getToday(setMidnight);
|
|
109
|
-
return getYmdHisNumber(today);
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Convert a Date into a YYYY number.
|
|
113
|
-
*/
|
|
114
|
-
export const getYearNumber = (input) => {
|
|
115
|
-
return Number(format(input, "yyyy"));
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Returns a YYYYMMDDHHIISS value as a number.
|
|
119
|
-
* Example: 1901-02-03 01:23:45 → 19010203012345
|
|
120
|
-
*/
|
|
121
|
-
export const getYmdHisNumber = (input) => {
|
|
122
|
-
return Number(format(input, "yyyyMMddHHmmss"));
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Returns a YYYY-MM-DD HH:MM:SS value as a string.
|
|
126
|
-
* Example: 1901-02-03 → 1901-02-03 00:00:00
|
|
127
|
-
*/
|
|
128
|
-
export const getYmdHisString = (input) => {
|
|
129
|
-
return format(input, "yyyy-MM-dd HH:mm:ss");
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Returns a YYYYMMDD value as a number.
|
|
133
|
-
* Example: 1901-02-03 → 19010203
|
|
134
|
-
*/
|
|
135
|
-
export const getYmdNumber = (input) => {
|
|
136
|
-
return Number(format(input, "yyyyMMdd"));
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Whenever we are displaying a YYYY-MM-DD date in Codex
|
|
140
|
-
* Example: 1901-02-03 → 1901-02-03
|
|
141
|
-
*/
|
|
142
|
-
export const getYmdString = (input) => {
|
|
143
|
-
return format(input, "yyyy-MM-dd");
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Convert an Excel date "e.g. 44216" into a JavaScript date object.
|
|
147
|
-
* https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
|
|
148
|
-
*/
|
|
149
|
-
export const getLuxonDateFromExcel = (serial) => {
|
|
150
|
-
const utcDates = Math.floor(serial - 25569);
|
|
151
|
-
const utcValue = utcDates * 86400;
|
|
152
|
-
const dateInfo = new Date(utcValue * 1000);
|
|
153
|
-
const fractionalDay = serial - Math.floor(serial) + 0.0000001;
|
|
154
|
-
let totalSeconds = Math.floor(86400 * fractionalDay);
|
|
155
|
-
const seconds = totalSeconds % 60;
|
|
156
|
-
totalSeconds -= seconds;
|
|
157
|
-
const hours = Math.floor(totalSeconds / (60 * 60));
|
|
158
|
-
const minutes = Math.floor(totalSeconds / 60) % 60;
|
|
159
|
-
return DateTime.fromISO(`${dateInfo.getFullYear()}-${dateInfo.getMonth()}-${dateInfo.getDate()}T${hours}:${minutes}:${seconds}Z`);
|
|
160
|
-
};
|
package/date/index.d.ts
DELETED
package/date/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const environment: {
|
|
2
|
-
readonly DEVELOPMENT: "development";
|
|
3
|
-
readonly STAGING: "staging";
|
|
4
|
-
readonly PRODUCTION: "production";
|
|
5
|
-
};
|
|
6
|
-
export type Environment = typeof environment[keyof typeof environment];
|
|
7
|
-
export declare const platform: {
|
|
8
|
-
readonly AWS: "AWS";
|
|
9
|
-
readonly VERCEL: "VERCEL";
|
|
10
|
-
};
|
|
11
|
-
export type Platform = typeof platform[keyof typeof platform];
|
|
12
|
-
/**
|
|
13
|
-
* Determine the environment we're using.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getEnvironment: () => Environment;
|
|
16
|
-
/**
|
|
17
|
-
* Check to see if we are working on AWS Lambda.
|
|
18
|
-
*/
|
|
19
|
-
export declare const isAws: () => boolean;
|
|
20
|
-
export declare const isVercel: () => boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Some code should only run on the server side to protect the data.
|
|
23
|
-
*/
|
|
24
|
-
export declare const isServer: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Check the environment currently running.
|
|
27
|
-
*/
|
|
28
|
-
export declare const isDevelopment: () => boolean;
|
|
29
|
-
export declare const isStaging: () => boolean;
|
|
30
|
-
export declare const isProduction: () => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Check to see if we are developing locally or on the hosted platform.
|
|
33
|
-
*/
|
|
34
|
-
export declare const isLocalhost: () => boolean;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export const environment = {
|
|
2
|
-
DEVELOPMENT: "development",
|
|
3
|
-
STAGING: "staging",
|
|
4
|
-
PRODUCTION: "production",
|
|
5
|
-
};
|
|
6
|
-
export const platform = {
|
|
7
|
-
AWS: "AWS",
|
|
8
|
-
VERCEL: "VERCEL",
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Determine the environment we're using.
|
|
12
|
-
*/
|
|
13
|
-
export const getEnvironment = () => {
|
|
14
|
-
let platformEnvironment = process.env.ENVIRONMENT;
|
|
15
|
-
let response;
|
|
16
|
-
// Custom - Backend/AWS
|
|
17
|
-
if (process.env.EMS_ENVIRONMENT) {
|
|
18
|
-
platformEnvironment = process.env.EMS_ENVIRONMENT;
|
|
19
|
-
}
|
|
20
|
-
// Custom - Frontend
|
|
21
|
-
else if (process.env.NEXT_PUBLIC_EMS_ENVIRONMENT) {
|
|
22
|
-
platformEnvironment = process.env.NEXT_PUBLIC_EMS_ENVIRONMENT;
|
|
23
|
-
}
|
|
24
|
-
// Vercel - Frontend
|
|
25
|
-
else if (process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF) {
|
|
26
|
-
platformEnvironment = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF;
|
|
27
|
-
}
|
|
28
|
-
// Vercel - Backend
|
|
29
|
-
else if (process.env.VERCEL_GIT_COMMIT_REF) {
|
|
30
|
-
platformEnvironment = process.env.VERCEL_GIT_COMMIT_REF;
|
|
31
|
-
}
|
|
32
|
-
const platformEnvironmentClean = platformEnvironment
|
|
33
|
-
.toLowerCase()
|
|
34
|
-
.trim();
|
|
35
|
-
switch (platformEnvironmentClean) {
|
|
36
|
-
case "production":
|
|
37
|
-
response = environment.PRODUCTION;
|
|
38
|
-
break;
|
|
39
|
-
case "demo":
|
|
40
|
-
case "preview":
|
|
41
|
-
case "staging":
|
|
42
|
-
response = environment.STAGING;
|
|
43
|
-
break;
|
|
44
|
-
default:
|
|
45
|
-
response = environment.DEVELOPMENT;
|
|
46
|
-
}
|
|
47
|
-
return response;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Check to see if we are working on AWS Lambda.
|
|
51
|
-
*/
|
|
52
|
-
export const isAws = () => platform.AWS === process.env["EMS_PLATFORM"];
|
|
53
|
-
export const isVercel = () => undefined !== process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF;
|
|
54
|
-
/**
|
|
55
|
-
* Some code should only run on the server side to protect the data.
|
|
56
|
-
*/
|
|
57
|
-
export const isServer = typeof window === "undefined";
|
|
58
|
-
/**
|
|
59
|
-
* Check the environment currently running.
|
|
60
|
-
*/
|
|
61
|
-
export const isDevelopment = () => environment.DEVELOPMENT === getEnvironment();
|
|
62
|
-
export const isStaging = () => environment.STAGING === getEnvironment();
|
|
63
|
-
export const isProduction = () => environment.PRODUCTION === getEnvironment();
|
|
64
|
-
/**
|
|
65
|
-
* Check to see if we are developing locally or on the hosted platform.
|
|
66
|
-
*/
|
|
67
|
-
export const isLocalhost = () => {
|
|
68
|
-
if ("true" === process.env["IS_LOCAL"]) {
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
if (isAws()) {
|
|
72
|
-
return "true" === process.env["AWS_SAM_LOCAL"];
|
|
73
|
-
}
|
|
74
|
-
// This value needs to only be included in Vercel but undefined in locally
|
|
75
|
-
if (isVercel()) {
|
|
76
|
-
return undefined === process.env["NEXT_PUBLIC_VERCEL_GIT_REPO_ID"];
|
|
77
|
-
}
|
|
78
|
-
return false;
|
|
79
|
-
};
|
package/environment/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./environment";
|
package/environment/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./environment";
|
package/eskimi/eskimi.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
/**
|
|
3
|
-
* https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
|
|
4
|
-
*/
|
|
5
|
-
export declare const endpoints: {
|
|
6
|
-
campaign: {
|
|
7
|
-
age: string;
|
|
8
|
-
gender: string;
|
|
9
|
-
list: string;
|
|
10
|
-
performance: string;
|
|
11
|
-
video: string;
|
|
12
|
-
};
|
|
13
|
-
site: {
|
|
14
|
-
list: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
declare const campaignSchema: z.ZodObject<{
|
|
18
|
-
id: z.ZodNumber;
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
type: z.ZodNumber;
|
|
21
|
-
user_id: z.ZodNumber;
|
|
22
|
-
ad_domain: z.ZodString;
|
|
23
|
-
click_url: z.ZodString;
|
|
24
|
-
bid: z.ZodString;
|
|
25
|
-
budget: z.ZodAny;
|
|
26
|
-
dates: z.ZodAny;
|
|
27
|
-
creative_set_ids: z.ZodAny;
|
|
28
|
-
audience_ids: z.ZodAny;
|
|
29
|
-
ad_placement_type_ids: z.ZodAny;
|
|
30
|
-
ad_placement_position_ids: z.ZodAny;
|
|
31
|
-
operator_ids: z.ZodAny;
|
|
32
|
-
devices: z.ZodAny;
|
|
33
|
-
auto_start: z.ZodNumber;
|
|
34
|
-
created_at: z.ZodString;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
|
-
export type CampaignSchemaType = z.infer<typeof campaignSchema>;
|
|
37
|
-
export declare const ageGroups: {
|
|
38
|
-
id: number;
|
|
39
|
-
name: string;
|
|
40
|
-
}[];
|
|
41
|
-
export declare const devices: {
|
|
42
|
-
id: number;
|
|
43
|
-
name: string;
|
|
44
|
-
}[];
|
|
45
|
-
export declare const genders: {
|
|
46
|
-
id: number;
|
|
47
|
-
name: string;
|
|
48
|
-
}[];
|
|
49
|
-
export {};
|
package/eskimi/eskimi.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
/**
|
|
3
|
-
* https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
|
|
4
|
-
*/
|
|
5
|
-
export const endpoints = {
|
|
6
|
-
campaign: {
|
|
7
|
-
age: "https://dsp-api.eskimi.com/api/v1/report/ageGroups/get",
|
|
8
|
-
gender: "https://dsp-api.eskimi.com/api/v1/report/genders/get",
|
|
9
|
-
list: "https://dsp-api.eskimi.com/api/v1/campaign/get",
|
|
10
|
-
performance: "https://dsp-api.eskimi.com/api/v1/report/campaigns/get",
|
|
11
|
-
video: "https://dsp-api.eskimi.com/api/v1/report/videoCampaigns/get",
|
|
12
|
-
},
|
|
13
|
-
site: {
|
|
14
|
-
list: "https://dsp-api.eskimi.com/api/v1/report/sites/get",
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
const campaignSchema = z.object({
|
|
18
|
-
id: z.number(),
|
|
19
|
-
name: z.string(),
|
|
20
|
-
type: z.number(),
|
|
21
|
-
user_id: z.number(),
|
|
22
|
-
ad_domain: z.string(),
|
|
23
|
-
click_url: z.string(),
|
|
24
|
-
bid: z.string(),
|
|
25
|
-
budget: z.any(),
|
|
26
|
-
dates: z.any(),
|
|
27
|
-
creative_set_ids: z.any(),
|
|
28
|
-
audience_ids: z.any(),
|
|
29
|
-
ad_placement_type_ids: z.any(),
|
|
30
|
-
ad_placement_position_ids: z.any(),
|
|
31
|
-
operator_ids: z.any(),
|
|
32
|
-
devices: z.any(),
|
|
33
|
-
auto_start: z.number(),
|
|
34
|
-
created_at: z.string(),
|
|
35
|
-
});
|
|
36
|
-
export const ageGroups = [
|
|
37
|
-
{
|
|
38
|
-
"id": 0,
|
|
39
|
-
"name": "0-17",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"id": 1,
|
|
43
|
-
"name": "18-24",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"id": 2,
|
|
47
|
-
"name": "25-29",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": 3,
|
|
51
|
-
"name": "30-34",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"id": 4,
|
|
55
|
-
"name": "35-39",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"id": 5,
|
|
59
|
-
"name": "40-44",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"id": 6,
|
|
63
|
-
"name": "45-54",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": 7,
|
|
67
|
-
"name": "55-64",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": 8,
|
|
71
|
-
"name": "65+",
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
export const devices = [
|
|
75
|
-
{
|
|
76
|
-
"id": 2,
|
|
77
|
-
"name": "Personal Computer",
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"id": 3,
|
|
81
|
-
"name": "Connected TV",
|
|
82
|
-
},
|
|
83
|
-
];
|
|
84
|
-
export const genders = [
|
|
85
|
-
{
|
|
86
|
-
"id": 1,
|
|
87
|
-
"name": "Male",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"id": 2,
|
|
91
|
-
"name": "Female",
|
|
92
|
-
},
|
|
93
|
-
];
|
package/eskimi/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./eskimi";
|
package/eskimi/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./eskimi";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ageGroups } from "../";
|
|
2
|
-
/**
|
|
3
|
-
* Map the Age Group and return the user-friendly string.
|
|
4
|
-
*/
|
|
5
|
-
export const getAgeGroup = (input) => {
|
|
6
|
-
const matches = ageGroups.filter(group => group.id === input);
|
|
7
|
-
if (1 === matches.length) {
|
|
8
|
-
return matches[0].name;
|
|
9
|
-
}
|
|
10
|
-
return "Undefined";
|
|
11
|
-
};
|
package/eskimi/server/getData.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { post } from "../../axios";
|
|
2
|
-
/**
|
|
3
|
-
* Make the request to Eskimi API using the access token.
|
|
4
|
-
*/
|
|
5
|
-
export const getData = async (accessToken, data, url) => {
|
|
6
|
-
const response = await post(url, data, {
|
|
7
|
-
headers: {
|
|
8
|
-
Authorization: `Bearer ${accessToken}`,
|
|
9
|
-
"Content-Type": "application/json",
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
return response.getBodyDefaultTo(["data"], null);
|
|
13
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { devices } from "../";
|
|
2
|
-
/**
|
|
3
|
-
* Map the Devices and return the user-friendly string.
|
|
4
|
-
*/
|
|
5
|
-
export const getDevice = (input) => {
|
|
6
|
-
const matches = devices.filter(device => device.id === input);
|
|
7
|
-
if (1 === matches.length) {
|
|
8
|
-
return matches[0].name;
|
|
9
|
-
}
|
|
10
|
-
return "Undefined";
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { genders } from "../";
|
|
2
|
-
/**
|
|
3
|
-
* Map the Gender and return the user-friendly string.
|
|
4
|
-
*/
|
|
5
|
-
export const getGender = (input) => {
|
|
6
|
-
const matches = genders.filter(gender => gender.id === input);
|
|
7
|
-
if (1 === matches.length) {
|
|
8
|
-
return matches[0].name;
|
|
9
|
-
}
|
|
10
|
-
return "Undefined";
|
|
11
|
-
};
|