@8ms/helpers 1.1.71 → 1.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/response.js +1 -12
- package/api/states.js +1 -10
- package/api/unexpectedError.js +1 -4
- package/array/contains.js +2 -6
- package/array/getArray.js +2 -10
- package/atInternet/request.js +1 -2
- package/aws/athenaExpress/initClient.js +3 -27
- package/aws/athenaExpress/query.js +2 -9
- package/aws/getConfig.js +2 -26
- package/aws/glue/initClient.js +2 -17
- package/aws/glue/invoke.js +2 -22
- package/aws/isResponse200.js +2 -21
- package/aws/lambda/getHandlerPath.js +1 -7
- package/aws/lambda/initClient.js +2 -17
- package/aws/lambda/invoke.js +2 -39
- package/aws/s3/copyFile.js +2 -13
- package/aws/s3/deleteFile.js +2 -12
- package/aws/s3/deleteFiles.js +2 -16
- package/aws/s3/deleteFolder.js +2 -35
- package/aws/s3/getGlueJson.js +2 -15
- package/aws/s3/getPresignedPost.js +3 -16
- package/aws/s3/getSignedUrl.js +2 -15
- package/aws/s3/initClient.js +2 -17
- package/aws/s3/isFileExists.js +2 -26
- package/aws/s3/listFiles.js +2 -32
- package/aws/s3/listFolders.js +4 -31
- package/aws/s3/moveFile.js +2 -20
- package/aws/s3/readBuffer.js +2 -51
- package/aws/s3/readFile.js +2 -69
- package/aws/s3/writeFile.js +2 -15
- package/aws/s3/writePresignedPost.js +2 -30
- package/aws/s3cache/cache.js +1 -2
- package/aws/s3cache/getCache.js +2 -35
- package/aws/s3cache/getKey.js +2 -16
- package/aws/s3cache/saveCache.js +2 -12
- package/aws/s3cache/updateCache.js +2 -23
- package/aws/ses/SimpleEmail.js +2 -115
- package/aws/ses/initClient.js +2 -17
- package/aws/ssm/getParameter.js +2 -39
- package/aws/ssm/initClient.js +2 -17
- package/axios/get.js +1 -44
- package/axios/post.js +2 -46
- package/boolean/getBoolean.js +2 -15
- package/class/BaseClass.js +9 -50
- package/crud/actions.js +1 -10
- package/crypto/getDecrypt.js +2 -11
- package/crypto/getEncrypt.js +2 -11
- package/crypto/getRandom.js +2 -10
- package/crypto/getSha256.js +2 -15
- package/date/date.js +1 -2
- package/date/duration.js +1 -2
- package/date/durationComparisons.js +1 -7
- package/date/durations.js +1 -10
- package/date/financialYear.js +1 -2
- package/date/financialYearWeek.js +1 -2
- package/date/format.js +2 -18
- package/date/getDate.js +9 -96
- package/date/getDatesBetween.js +3 -25
- package/date/getDurationHours.js +2 -25
- package/date/getDurationMinutes.js +2 -24
- package/date/getFinancialYear.js +8 -48
- package/date/getFinancialYearToDate.js +2 -18
- package/date/getFinancialYearToYesterday.js +2 -18
- package/date/getFinancialYearWeeks.js +2 -29
- package/date/getLastWeek.js +2 -28
- package/date/getMax.js +2 -15
- package/date/getMidnight.js +2 -12
- package/date/getMin.js +2 -15
- package/date/getMonday.js +5 -32
- package/date/getNumber.js +2 -14
- package/date/getPredefinedTimeframe.js +2 -23
- package/date/getSunday.js +5 -32
- package/date/getThisWeek.js +2 -28
- package/date/getTimeZoned.js +5 -36
- package/date/getToday.js +2 -39
- package/date/getTwoWeeksAgo.js +2 -28
- package/date/getWeeksAgo.js +2 -16
- package/date/getYesterday.js +2 -40
- package/date/isDateValid.js +2 -22
- package/date/isLastWeek.js +2 -13
- package/date/isThisWeek.js +2 -13
- package/date/parseExcelDate.js +2 -17
- package/date/predefinedTimeframes.js +1 -9
- package/date/timeframe.js +1 -2
- package/date/timeframes.js +1 -7
- package/deepCrawl/buildRequest.js +4 -83
- package/deepCrawl/filter.js +1 -2
- package/deepCrawl/getData.js +1 -29
- package/deepCrawl/initClient.js +2 -31
- package/deepCrawl/operands.js +1 -13
- package/deepCrawl/orders.js +1 -7
- package/deepCrawl/reports.js +1 -13
- package/environment/environments.js +1 -8
- package/environment/getEnvironment.js +2 -42
- package/environment/isAws.js +2 -10
- package/environment/isDevelopment.js +1 -9
- package/environment/isLocalhost.js +2 -21
- package/environment/isProduction.js +1 -9
- package/environment/isStaging.js +1 -9
- package/environment/isVercel.js +2 -6
- package/environment/platforms.js +1 -7
- package/eskimi/ageGroups.js +1 -41
- package/eskimi/campaign.js +1 -2
- package/eskimi/devices.js +1 -13
- package/eskimi/endpoints.js +2 -17
- package/eskimi/genders.js +1 -13
- package/eskimi/getAccessToken.js +2 -22
- package/eskimi/getAgeGroup.js +2 -16
- package/eskimi/getCampaignIds.js +2 -11
- package/eskimi/getDevice.js +2 -16
- package/eskimi/getGender.js +2 -16
- package/eskimi/request.js +2 -23
- package/globals.d.js +1 -0
- package/google/bigQuery/initClient.js +2 -20
- package/google/bigQuery/query.js +2 -9
- package/google/getConfig.js +3 -21
- package/google/sheets/getAssociatedData.js +8 -52
- package/google/sheets/getBatchData.js +1 -19
- package/google/sheets/initClient.js +2 -22
- package/google/sheets/isCellNa.js +2 -6
- package/google/storage/initClient.js +2 -20
- package/google/storage/writeFile.js +2 -30
- package/googleAds/getCustomer.js +2 -14
- package/googleAds/initClient.js +2 -24
- package/initClients.js +5 -106
- package/json/isJson.js +2 -18
- package/littleWarden/getUrlStatus.js +2 -20
- package/littleWarden/isAllGood.js +2 -17
- package/littleWarden/isDanger.js +2 -17
- package/littleWarden/isWarning.js +2 -17
- package/littleWarden/states.js +1 -8
- package/myTarget/getAccessToken.js +2 -22
- package/myTarget/request.js +2 -23
- package/nextAuth/isSessionReady.js +1 -12
- package/nextAuth/states.js +2 -8
- package/nextJs/getIp.js +2 -12
- package/nextJs/getUserAgent.js +2 -6
- package/number/getDivide.js +2 -17
- package/number/getNumber.js +7 -50
- package/number/getPercent.js +2 -17
- package/number/getPercentIncrease.js +2 -17
- package/number/getRounded.js +2 -21
- package/package.json +47 -44
- package/prisma/initClient.js +3 -33
- package/snapchat/getAccessToken.js +2 -36
- package/sorting/byNumberAscending.js +2 -16
- package/sorting/byNumberDescending.js +2 -16
- package/sorting/byStringAscending.js +2 -20
- package/sorting/byStringDescending.js +2 -20
- package/string/formatCapitalise.js +2 -14
- package/string/getCleanFolder.js +2 -11
- package/string/getString.js +2 -35
- package/string/getStringFromStream.js +2 -14
- package/string/toProperCase.js +2 -17
- package/swr/isAllData.js +2 -18
- package/swr/isAnyError.js +2 -18
- package/swr/isAnyLoading.js +2 -20
- package/swr/isData.js +2 -6
- package/swr/isError.js +2 -6
- package/swr/isLoading.js +2 -11
- package/upTimeRobot/getMonitors.js +2 -31
- package/upTimeRobot/logTypes.js +1 -9
- package/upTimeRobot/monitorStatuses.js +1 -10
- package/upTimeRobot/monitorSubTypes.js +1 -12
- package/upTimeRobot/monitorTypes.js +1 -10
- package/upTimeRobot/requestStatuses.js +1 -7
- package/url/buildParameters.js +2 -21
- package/url/buildRelative.js +2 -12
- package/url/buildUrl.js +2 -28
- package/url/isAbsolute.js +2 -14
- package/url/isRelative.js +2 -7
- package/url/url.js +1 -2
- package/util/defaultTo.js +2 -34
- package/util/isUndefined.js +2 -18
- package/util/sleep.js +1 -6
- package/webWorker/states.js +1 -8
- package/xml/getXml.js +1 -14
- package/api/response.d.ts +0 -8
- package/api/states.d.ts +0 -9
- package/api/unexpectedError.d.ts +0 -2
- package/array/contains.d.ts +0 -8
- package/array/getArray.d.ts +0 -7
- package/atInternet/request.d.ts +0 -30
- package/aws/athenaExpress/initClient.d.ts +0 -12
- package/aws/athenaExpress/query.d.ts +0 -8
- package/aws/getConfig.d.ts +0 -13
- package/aws/glue/initClient.d.ts +0 -10
- package/aws/glue/invoke.d.ts +0 -9
- package/aws/isResponse200.d.ts +0 -7
- package/aws/lambda/getHandlerPath.d.ts +0 -5
- package/aws/lambda/initClient.d.ts +0 -10
- package/aws/lambda/invoke.d.ts +0 -12
- package/aws/s3/copyFile.d.ts +0 -13
- package/aws/s3/deleteFile.d.ts +0 -9
- package/aws/s3/deleteFiles.d.ts +0 -9
- package/aws/s3/deleteFolder.d.ts +0 -9
- package/aws/s3/getGlueJson.d.ts +0 -5
- package/aws/s3/getPresignedPost.d.ts +0 -20
- package/aws/s3/getSignedUrl.d.ts +0 -12
- package/aws/s3/initClient.d.ts +0 -10
- package/aws/s3/isFileExists.d.ts +0 -9
- package/aws/s3/listFiles.d.ts +0 -9
- package/aws/s3/listFolders.d.ts +0 -9
- package/aws/s3/moveFile.d.ts +0 -10
- package/aws/s3/readBuffer.d.ts +0 -13
- package/aws/s3/readFile.d.ts +0 -30
- package/aws/s3/writeFile.d.ts +0 -10
- package/aws/s3/writePresignedPost.d.ts +0 -14
- package/aws/s3cache/cache.d.ts +0 -7
- package/aws/s3cache/getCache.d.ts +0 -12
- package/aws/s3cache/getKey.d.ts +0 -10
- package/aws/s3cache/saveCache.d.ts +0 -10
- package/aws/s3cache/updateCache.d.ts +0 -10
- package/aws/ses/SimpleEmail.d.ts +0 -51
- package/aws/ses/initClient.d.ts +0 -10
- package/aws/ssm/getParameter.d.ts +0 -10
- package/aws/ssm/initClient.d.ts +0 -10
- package/axios/get.d.ts +0 -8
- package/axios/post.d.ts +0 -12
- package/boolean/getBoolean.d.ts +0 -7
- package/class/BaseClass.d.ts +0 -31
- package/crud/actions.d.ts +0 -8
- package/crypto/getDecrypt.d.ts +0 -10
- package/crypto/getEncrypt.d.ts +0 -10
- package/crypto/getRandom.d.ts +0 -8
- package/crypto/getSha256.d.ts +0 -8
- package/date/date.d.ts +0 -4
- package/date/duration.d.ts +0 -5
- package/date/durationComparisons.d.ts +0 -5
- package/date/durations.d.ts +0 -8
- package/date/financialYear.d.ts +0 -4
- package/date/financialYearWeek.d.ts +0 -6
- package/date/format.d.ts +0 -13
- package/date/getDate.d.ts +0 -12
- package/date/getDatesBetween.d.ts +0 -10
- package/date/getDurationHours.d.ts +0 -8
- package/date/getDurationMinutes.d.ts +0 -8
- package/date/getFinancialYear.d.ts +0 -9
- package/date/getFinancialYearToDate.d.ts +0 -7
- package/date/getFinancialYearToYesterday.d.ts +0 -7
- package/date/getFinancialYearWeeks.d.ts +0 -9
- package/date/getLastWeek.d.ts +0 -10
- package/date/getMax.d.ts +0 -12
- package/date/getMidnight.d.ts +0 -10
- package/date/getMin.d.ts +0 -12
- package/date/getMonday.d.ts +0 -14
- package/date/getNumber.d.ts +0 -11
- package/date/getPredefinedTimeframe.d.ts +0 -9
- package/date/getSunday.d.ts +0 -14
- package/date/getThisWeek.d.ts +0 -10
- package/date/getTimeZoned.d.ts +0 -13
- package/date/getToday.d.ts +0 -9
- package/date/getTwoWeeksAgo.d.ts +0 -10
- package/date/getWeeksAgo.d.ts +0 -12
- package/date/getYesterday.d.ts +0 -9
- package/date/isDateValid.d.ts +0 -7
- package/date/isLastWeek.d.ts +0 -6
- package/date/isThisWeek.d.ts +0 -6
- package/date/parseExcelDate.d.ts +0 -8
- package/date/predefinedTimeframes.d.ts +0 -7
- package/date/timeframe.d.ts +0 -8
- package/date/timeframes.d.ts +0 -4
- package/deepCrawl/buildRequest.d.ts +0 -15
- package/deepCrawl/filter.d.ts +0 -5
- package/deepCrawl/getData.d.ts +0 -5
- package/deepCrawl/initClient.d.ts +0 -13
- package/deepCrawl/operands.d.ts +0 -11
- package/deepCrawl/orders.d.ts +0 -9
- package/deepCrawl/reports.d.ts +0 -11
- package/environment/environments.d.ts +0 -7
- package/environment/getEnvironment.d.ts +0 -6
- package/environment/isAws.d.ts +0 -5
- package/environment/isDevelopment.d.ts +0 -2
- package/environment/isLocalhost.d.ts +0 -5
- package/environment/isProduction.d.ts +0 -2
- package/environment/isStaging.d.ts +0 -2
- package/environment/isVercel.d.ts +0 -5
- package/environment/platforms.d.ts +0 -6
- package/eskimi/ageGroups.d.ts +0 -5
- package/eskimi/campaign.d.ts +0 -19
- package/eskimi/devices.d.ts +0 -5
- package/eskimi/endpoints.d.ts +0 -16
- package/eskimi/genders.d.ts +0 -5
- package/eskimi/getAccessToken.d.ts +0 -9
- package/eskimi/getAgeGroup.d.ts +0 -7
- package/eskimi/getCampaignIds.d.ts +0 -7
- package/eskimi/getDevice.d.ts +0 -7
- package/eskimi/getGender.d.ts +0 -7
- package/eskimi/request.d.ts +0 -8
- package/google/bigQuery/initClient.d.ts +0 -11
- package/google/bigQuery/query.d.ts +0 -9
- package/google/getConfig.d.ts +0 -20
- package/google/sheets/getAssociatedData.d.ts +0 -16
- package/google/sheets/getBatchData.d.ts +0 -18
- package/google/sheets/initClient.d.ts +0 -11
- package/google/sheets/isCellNa.d.ts +0 -7
- package/google/storage/initClient.d.ts +0 -12
- package/google/storage/writeFile.d.ts +0 -12
- package/googleAds/getCustomer.d.ts +0 -7
- package/googleAds/initClient.d.ts +0 -16
- package/initClients.d.ts +0 -40
- package/json/isJson.d.ts +0 -8
- package/littleWarden/getUrlStatus.d.ts +0 -9
- package/littleWarden/isAllGood.d.ts +0 -7
- package/littleWarden/isDanger.d.ts +0 -7
- package/littleWarden/isWarning.d.ts +0 -7
- package/littleWarden/states.d.ts +0 -7
- package/myTarget/getAccessToken.d.ts +0 -9
- package/myTarget/request.d.ts +0 -8
- package/nextAuth/isSessionReady.d.ts +0 -4
- package/nextAuth/states.d.ts +0 -7
- package/nextJs/getIp.d.ts +0 -7
- package/nextJs/getUserAgent.d.ts +0 -7
- package/number/getDivide.d.ts +0 -9
- package/number/getNumber.d.ts +0 -8
- package/number/getPercent.d.ts +0 -9
- package/number/getPercentIncrease.d.ts +0 -9
- package/number/getRounded.d.ts +0 -9
- package/prisma/initClient.d.ts +0 -4
- package/snapchat/getAccessToken.d.ts +0 -9
- package/sorting/byNumberAscending.d.ts +0 -8
- package/sorting/byNumberDescending.d.ts +0 -8
- package/sorting/byStringAscending.d.ts +0 -8
- package/sorting/byStringDescending.d.ts +0 -8
- package/string/formatCapitalise.d.ts +0 -9
- package/string/getCleanFolder.d.ts +0 -7
- package/string/getString.d.ts +0 -7
- package/string/getStringFromStream.d.ts +0 -8
- package/string/toProperCase.d.ts +0 -7
- package/swr/isAllData.d.ts +0 -7
- package/swr/isAnyError.d.ts +0 -7
- package/swr/isAnyLoading.d.ts +0 -7
- package/swr/isData.d.ts +0 -7
- package/swr/isError.d.ts +0 -7
- package/swr/isLoading.d.ts +0 -7
- package/upTimeRobot/getMonitors.d.ts +0 -1
- package/upTimeRobot/logTypes.d.ts +0 -7
- package/upTimeRobot/monitorStatuses.d.ts +0 -8
- package/upTimeRobot/monitorSubTypes.d.ts +0 -10
- package/upTimeRobot/monitorTypes.d.ts +0 -8
- package/upTimeRobot/requestStatuses.d.ts +0 -5
- package/url/buildParameters.d.ts +0 -8
- package/url/buildRelative.d.ts +0 -8
- package/url/buildUrl.d.ts +0 -10
- package/url/isAbsolute.d.ts +0 -7
- package/url/isRelative.d.ts +0 -7
- package/url/url.d.ts +0 -6
- package/util/defaultTo.d.ts +0 -10
- package/util/isUndefined.d.ts +0 -9
- package/util/sleep.d.ts +0 -4
- package/webWorker/states.d.ts +0 -7
- package/xml/getXml.d.ts +0 -4
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FinancialYear } from './financialYear';
|
|
2
|
-
declare type GetFinancialYearType = {
|
|
3
|
-
year?: number;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Get the current financial year.
|
|
7
|
-
*/
|
|
8
|
-
declare const getFinancialYear: ({ year }?: GetFinancialYearType) => FinancialYear;
|
|
9
|
-
export default getFinancialYear;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FinancialYear } from './financialYear';
|
|
2
|
-
/**
|
|
3
|
-
* Return the current financial year up to yesterday.
|
|
4
|
-
* Timezone should always be London based
|
|
5
|
-
*/
|
|
6
|
-
declare const getFinancialYearToYesterday: () => FinancialYear;
|
|
7
|
-
export default getFinancialYearToYesterday;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FinancialYearWeekType } from './financialYearWeek';
|
|
2
|
-
declare type GetFinancialYearWeeks = {
|
|
3
|
-
year?: number;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Get the current financial year.
|
|
7
|
-
*/
|
|
8
|
-
declare const getFinancialYearWeeks: ({ year }?: GetFinancialYearWeeks) => FinancialYearWeekType[];
|
|
9
|
-
export default getFinancialYearWeeks;
|
package/date/getLastWeek.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
import { Timeframe } from './timeframe';
|
|
4
|
-
declare type GetLastWeek = GetTimeZoned & GetMidnight;
|
|
5
|
-
/**
|
|
6
|
-
* Return an object of start/end predefined date of Last Week.
|
|
7
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
8
|
-
*/
|
|
9
|
-
declare const getLastWeek: ({ setMidnight, setTimeZone }?: GetLastWeek) => Timeframe;
|
|
10
|
-
export default getLastWeek;
|
package/date/getMax.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type GetMax = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input: DateType;
|
|
6
|
-
max: DateType;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* If a given date is beyond the maximum, return the maximum.
|
|
10
|
-
*/
|
|
11
|
-
declare const getMax: ({ input, max, setMidnight }: GetMax) => Date;
|
|
12
|
-
export default getMax;
|
package/date/getMidnight.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type GetMidnight = {
|
|
2
|
-
setMidnight?: boolean;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Set a date's time to 0 hours, 0 minutes, 0 seconds, 0 milliseconds
|
|
6
|
-
*/
|
|
7
|
-
declare const getMidnight: ({ input, setMidnight }: GetMidnight & {
|
|
8
|
-
input: Date;
|
|
9
|
-
}) => Date;
|
|
10
|
-
export default getMidnight;
|
package/date/getMin.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type GetMin = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input: DateType;
|
|
6
|
-
min: DateType;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* If a given date is before the minimum, return the minimum.
|
|
10
|
-
*/
|
|
11
|
-
declare const getMin: ({ input, min, setMidnight }: GetMin) => Date;
|
|
12
|
-
export default getMin;
|
package/date/getMonday.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type GetMonday = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input?: DateType;
|
|
6
|
-
weeksAgo: number;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve the closest last Monday relative to the input or today.
|
|
10
|
-
* 0 weeksAgo - Tuesday (10th), return Monday (8th)
|
|
11
|
-
* 1 weeksAgo - Tuesday (10th), return Monday (1st)
|
|
12
|
-
*/
|
|
13
|
-
declare const getMonday: ({ weeksAgo, input, setMidnight, setTimeZone }: GetMonday) => Date;
|
|
14
|
-
export default getMonday;
|
package/date/getNumber.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type GetNumber = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input: DateType;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Convert a (number | string | Date) into a YYYYMMDD number.
|
|
9
|
-
*/
|
|
10
|
-
declare const getNumber: ({ input, setMidnight, setTimeZone }: GetNumber) => number;
|
|
11
|
-
export default getNumber;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PredefinedTimeframes } from './predefinedTimeframes';
|
|
2
|
-
import { Timeframe } from './timeframe';
|
|
3
|
-
/**
|
|
4
|
-
* Check to see the date matches a predefined time frame
|
|
5
|
-
*/
|
|
6
|
-
declare const getPredefinedTimeframe: ({ timeframe }: {
|
|
7
|
-
timeframe: Timeframe;
|
|
8
|
-
}) => PredefinedTimeframes;
|
|
9
|
-
export default getPredefinedTimeframe;
|
package/date/getSunday.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type GetSunday = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input?: DateType;
|
|
6
|
-
weeksAgo: number;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve the closest last Sunday relative to the input or today.
|
|
10
|
-
* 0 weeksAgo - Tuesday (17th), return Sunday (14th)
|
|
11
|
-
* 1 weeksAgo - Tuesday (17th), return Monday (7th)
|
|
12
|
-
*/
|
|
13
|
-
declare const getSunday: ({ weeksAgo, input, setMidnight, setTimeZone }: GetSunday) => Date;
|
|
14
|
-
export default getSunday;
|
package/date/getThisWeek.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
import { Timeframe } from './timeframe';
|
|
4
|
-
declare type GetThisWeek = GetTimeZoned & GetMidnight;
|
|
5
|
-
/**
|
|
6
|
-
* Return an object of start/end predefined date of This Week.
|
|
7
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
8
|
-
*/
|
|
9
|
-
declare const getThisWeek: ({ setMidnight, setTimeZone }?: GetThisWeek) => Timeframe;
|
|
10
|
-
export default getThisWeek;
|
package/date/getTimeZoned.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare type GetTimeZoned = {
|
|
2
|
-
setTimeZone?: string | false;
|
|
3
|
-
};
|
|
4
|
-
export declare const timeZoneLondon = "Europe/London";
|
|
5
|
-
/**
|
|
6
|
-
* Convert an input into a given timezone.
|
|
7
|
-
* We can't use getDate here as it becomes a circular issue.
|
|
8
|
-
* Returns a new Date instance.
|
|
9
|
-
*/
|
|
10
|
-
declare const getTimeZoned: ({ input, setTimeZone }: GetTimeZoned & {
|
|
11
|
-
input: Date;
|
|
12
|
-
}) => Date;
|
|
13
|
-
export default getTimeZoned;
|
package/date/getToday.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
declare type GetToday = GetTimeZoned & GetMidnight;
|
|
4
|
-
/**
|
|
5
|
-
* Shortcut to get today's date.
|
|
6
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
7
|
-
*/
|
|
8
|
-
declare const getToday: ({ setMidnight, setTimeZone }?: GetToday) => Date;
|
|
9
|
-
export default getToday;
|
package/date/getTwoWeeksAgo.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
import { Timeframe } from './timeframe';
|
|
4
|
-
declare type GetTwoWeeksAgo = GetTimeZoned & GetMidnight;
|
|
5
|
-
/**
|
|
6
|
-
* Return an object of start/end predefined date of Two Weeks Ago.
|
|
7
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
8
|
-
*/
|
|
9
|
-
declare const getTwoWeeksAgo: ({ setMidnight, setTimeZone }?: GetTwoWeeksAgo) => Timeframe;
|
|
10
|
-
export default getTwoWeeksAgo;
|
package/date/getWeeksAgo.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
declare type GetWeeksAgo = GetTimeZoned & {
|
|
4
|
-
input: DateType;
|
|
5
|
-
weeksAgo: number;
|
|
6
|
-
setMidnight?: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* From a given input, move the date back X weeksAgo
|
|
10
|
-
*/
|
|
11
|
-
declare const getWeeksAgo: ({ input, weeksAgo, setMidnight, setTimeZone }: GetWeeksAgo) => number;
|
|
12
|
-
export default getWeeksAgo;
|
package/date/getYesterday.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
declare type GetYesterday = GetTimeZoned & GetMidnight;
|
|
4
|
-
/**
|
|
5
|
-
* Shortcut to get yesterday's date.
|
|
6
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
7
|
-
*/
|
|
8
|
-
declare const getYesterday: ({ setMidnight, setTimeZone }?: GetYesterday) => Date;
|
|
9
|
-
export default getYesterday;
|
package/date/isDateValid.d.ts
DELETED
package/date/isLastWeek.d.ts
DELETED
package/date/isThisWeek.d.ts
DELETED
package/date/parseExcelDate.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert an excel date "e.g. 44216" into a JavaScript date object.
|
|
3
|
-
* https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
|
|
4
|
-
*/
|
|
5
|
-
declare const parseExcelDate: ({ serial }: {
|
|
6
|
-
serial: number;
|
|
7
|
-
}) => Date;
|
|
8
|
-
export default parseExcelDate;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const predefinedTimeframes: {
|
|
2
|
-
NONE: string;
|
|
3
|
-
CUSTOM: string;
|
|
4
|
-
THIS_WEEK: string;
|
|
5
|
-
LAST_WEEK: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type PredefinedTimeframes = typeof predefinedTimeframes.NONE | typeof predefinedTimeframes.CUSTOM | typeof predefinedTimeframes.LAST_WEEK | typeof predefinedTimeframes.THIS_WEEK;
|
package/date/timeframe.d.ts
DELETED
package/date/timeframes.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Filter } from './filter';
|
|
2
|
-
import { Order } from './orders';
|
|
3
|
-
export declare type Request = {
|
|
4
|
-
crawlId?: number;
|
|
5
|
-
customPath?: string;
|
|
6
|
-
filters?: Filter[];
|
|
7
|
-
limit?: number;
|
|
8
|
-
orders?: Order[];
|
|
9
|
-
page?: number;
|
|
10
|
-
projectId?: number;
|
|
11
|
-
report?: string;
|
|
12
|
-
subReport?: string;
|
|
13
|
-
};
|
|
14
|
-
declare const buildRequest: ({ crawlId, customPath, filters, limit, orders, page, projectId, report, subReport, }: Request) => string;
|
|
15
|
-
export default buildRequest;
|
package/deepCrawl/filter.d.ts
DELETED
package/deepCrawl/getData.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare type InitClient = {
|
|
2
|
-
auth: {
|
|
3
|
-
apiId: string;
|
|
4
|
-
apiKey: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* http://api-docs.deepcrawl.com/
|
|
9
|
-
* Renew the DeepCrawl user token.
|
|
10
|
-
* Token lasts for 6 hours.
|
|
11
|
-
*/
|
|
12
|
-
declare const initClient: ({ auth }: InitClient) => Promise<void>;
|
|
13
|
-
export default initClient;
|
package/deepCrawl/operands.d.ts
DELETED
package/deepCrawl/orders.d.ts
DELETED
package/deepCrawl/reports.d.ts
DELETED
package/environment/isAws.d.ts
DELETED
package/eskimi/ageGroups.d.ts
DELETED
package/eskimi/campaign.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare type Campaign = {
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
type: number;
|
|
5
|
-
user_id: number;
|
|
6
|
-
ad_domain: string;
|
|
7
|
-
click_url: string;
|
|
8
|
-
bid: string;
|
|
9
|
-
budget: any;
|
|
10
|
-
dates: any;
|
|
11
|
-
creative_set_ids: any;
|
|
12
|
-
audience_ids: any;
|
|
13
|
-
ad_placement_type_ids: any;
|
|
14
|
-
ad_placement_position_ids: any;
|
|
15
|
-
operator_ids: any;
|
|
16
|
-
devices: any;
|
|
17
|
-
auto_start: number;
|
|
18
|
-
created_at: string;
|
|
19
|
-
};
|
package/eskimi/devices.d.ts
DELETED
package/eskimi/endpoints.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
|
|
3
|
-
*/
|
|
4
|
-
declare const endpoints: {
|
|
5
|
-
campaign: {
|
|
6
|
-
age: string;
|
|
7
|
-
gender: string;
|
|
8
|
-
list: string;
|
|
9
|
-
performance: string;
|
|
10
|
-
video: string;
|
|
11
|
-
};
|
|
12
|
-
site: {
|
|
13
|
-
list: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default endpoints;
|
package/eskimi/genders.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare 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;
|
package/eskimi/getAgeGroup.d.ts
DELETED
package/eskimi/getDevice.d.ts
DELETED
package/eskimi/getGender.d.ts
DELETED
package/eskimi/request.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
parameter: Config;
|
|
4
|
-
projectId: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Initialise the Big Query client.
|
|
8
|
-
* It's possible to use multiple clients, so we set one up per project id.
|
|
9
|
-
*/
|
|
10
|
-
declare const initClient: ({ parameter, projectId }: InitClient) => void;
|
|
11
|
-
export default initClient;
|
package/google/getConfig.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare type Config = {
|
|
2
|
-
type: string;
|
|
3
|
-
project_id: string;
|
|
4
|
-
private_key_id: string;
|
|
5
|
-
private_key: string;
|
|
6
|
-
client_email: string;
|
|
7
|
-
client_id: string;
|
|
8
|
-
auth_uri: string;
|
|
9
|
-
token_uri: string;
|
|
10
|
-
auth_provider_x509_cert_url: string;
|
|
11
|
-
client_x509_cert_url: string;
|
|
12
|
-
};
|
|
13
|
-
export declare type GetConfig = {
|
|
14
|
-
parameter: Config;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Using the response from Parameter Store and format it ready to be used with Google API.
|
|
18
|
-
*/
|
|
19
|
-
declare const getConfig: (parameter: GetConfig) => Config;
|
|
20
|
-
export default getConfig;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare type GetAssociatedData = {
|
|
2
|
-
spreadsheetId: string;
|
|
3
|
-
ranges: [
|
|
4
|
-
format: string,
|
|
5
|
-
defaultRange: string,
|
|
6
|
-
heading: string,
|
|
7
|
-
data: string
|
|
8
|
-
];
|
|
9
|
-
dateTimeRender: 'FORMATTED_STRING' | 'SERIAL_NUMBER';
|
|
10
|
-
valueRender: 'FORMATTED_VALUE' | 'UNFORMATTED_VALUE' | 'FORMULA';
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Make a batch get to Google Sheets to retrieve the data correctly formatted, with default values provided.
|
|
14
|
-
*/
|
|
15
|
-
declare const getAssociatedData: ({ dateTimeRender, ranges, spreadsheetId, valueRender }: GetAssociatedData) => Promise<object[]>;
|
|
16
|
-
export default getAssociatedData;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare type BatchData = {
|
|
2
|
-
spreadsheetId: string;
|
|
3
|
-
valueRanges: {
|
|
4
|
-
range: string;
|
|
5
|
-
majorDimension: 'rows' | 'dimension';
|
|
6
|
-
values: [
|
|
7
|
-
any[]
|
|
8
|
-
];
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
declare type GetBatchData = {
|
|
12
|
-
spreadsheetId: string;
|
|
13
|
-
ranges: string[];
|
|
14
|
-
dateTimeRender?: string;
|
|
15
|
-
valueRender?: string;
|
|
16
|
-
};
|
|
17
|
-
declare const getBatchData: ({ spreadsheetId, ranges, dateTimeRender, valueRender, }: GetBatchData) => Promise<BatchData>;
|
|
18
|
-
export default getBatchData;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
parameter: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Initialise the Google Sheets instance using the separate service method.
|
|
7
|
-
* https://github.com/googleapis/google-api-nodejs-client
|
|
8
|
-
* Library: @googleapis/sheets
|
|
9
|
-
*/
|
|
10
|
-
declare const initClient: ({ parameter }: InitClient) => void;
|
|
11
|
-
export default initClient;
|