@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
package/aws/getConfig.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare type Config = {
|
|
2
|
-
accessKeyId: string;
|
|
3
|
-
region: string;
|
|
4
|
-
secretAccessKey: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The config must be in a specific structure, if the properties aren't defined don't specify them as they could be inferred (e.g. Lambda).
|
|
8
|
-
*/
|
|
9
|
-
declare const getConfig: ({ config, isAthenaExpress }: {
|
|
10
|
-
config: Config;
|
|
11
|
-
isAthenaExpress?: boolean;
|
|
12
|
-
}) => object;
|
|
13
|
-
export default getConfig;
|
package/aws/glue/initClient.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
config: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Shorthand function to get the Glue Client.
|
|
7
|
-
* Library: @aws-sdk/client-glue
|
|
8
|
-
*/
|
|
9
|
-
declare const initClient: ({ config }: InitClient) => void;
|
|
10
|
-
export default initClient;
|
package/aws/glue/invoke.d.ts
DELETED
package/aws/isResponse200.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
config: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Shorthand function to get the Lambda Client.
|
|
7
|
-
* Library: @aws-sdk/client-lambda
|
|
8
|
-
*/
|
|
9
|
-
declare const initClient: ({ config }: InitClient) => void;
|
|
10
|
-
export default initClient;
|
package/aws/lambda/invoke.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare type Invoke = {
|
|
2
|
-
functionName: string;
|
|
3
|
-
payload?: object;
|
|
4
|
-
response?: boolean;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Invoke a AWS Lambda function by passing in the Function name and optional Payload data.
|
|
8
|
-
* Runs asynchronously, doesn't wait for function to fully end.
|
|
9
|
-
* Library: @aws-sdk/client-lambda
|
|
10
|
-
*/
|
|
11
|
-
declare const invoke: ({ functionName, payload, response }: Invoke) => Promise<any>;
|
|
12
|
-
export default invoke;
|
package/aws/s3/copyFile.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare type File = {
|
|
2
|
-
bucket: string;
|
|
3
|
-
key: string;
|
|
4
|
-
};
|
|
5
|
-
declare type CopyFile = {
|
|
6
|
-
from: File;
|
|
7
|
-
to: File;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Copy a file from one bucket/path to another bucket/path.
|
|
11
|
-
*/
|
|
12
|
-
declare const copyFile: ({ from, to }: CopyFile) => Promise<void>;
|
|
13
|
-
export default copyFile;
|
package/aws/s3/deleteFile.d.ts
DELETED
package/aws/s3/deleteFiles.d.ts
DELETED
package/aws/s3/deleteFolder.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare type DeleteFolder = {
|
|
2
|
-
bucket: string;
|
|
3
|
-
folder: string;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Iteratively delete all the files within a directory and delete the directory.
|
|
7
|
-
*/
|
|
8
|
-
declare const deleteFolder: ({ bucket, folder }: DeleteFolder) => Promise<void>;
|
|
9
|
-
export default deleteFolder;
|
package/aws/s3/getGlueJson.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare type PresignedPost = {
|
|
2
|
-
url: string;
|
|
3
|
-
fields: any;
|
|
4
|
-
};
|
|
5
|
-
declare type GetPresignedPost = {
|
|
6
|
-
bucket: string;
|
|
7
|
-
conditions: any[];
|
|
8
|
-
expires: number;
|
|
9
|
-
fields: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
key: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Returns a presigned post to upload a file directly to S3.
|
|
16
|
-
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/modules/_aws_sdk_s3_presigned_post.html
|
|
17
|
-
* https://github.com/8millionstories-organisation/test-vercel-upload-2/blob/50eb12fcb3870a59ab455811bfaa1bdcb886edf2/pages/api/upload-url.js
|
|
18
|
-
*/
|
|
19
|
-
declare const getPresignedPost: ({ bucket, conditions, expires, fields, key }: GetPresignedPost) => Promise<PresignedPost>;
|
|
20
|
-
export default getPresignedPost;
|
package/aws/s3/getSignedUrl.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Response } from '../../api/response';
|
|
2
|
-
declare type GetSignedUrl = {
|
|
3
|
-
bucket: string;
|
|
4
|
-
expires: number;
|
|
5
|
-
key: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Returns a signed for URL to allow download of private buckets for a given duration.
|
|
9
|
-
* Library: @aws-sdk/s3-request-presigner
|
|
10
|
-
*/
|
|
11
|
-
declare const getSignedUrl: ({ bucket, expires, key }: GetSignedUrl) => Promise<Response>;
|
|
12
|
-
export default getSignedUrl;
|
package/aws/s3/initClient.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
config: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Shorthand function to get the Lambda Client.
|
|
7
|
-
* Library: @aws-sdk/client-s3
|
|
8
|
-
*/
|
|
9
|
-
declare const initClient: ({ config }: InitClient) => void;
|
|
10
|
-
export default initClient;
|
package/aws/s3/isFileExists.d.ts
DELETED
package/aws/s3/listFiles.d.ts
DELETED
package/aws/s3/listFolders.d.ts
DELETED
package/aws/s3/moveFile.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { File } from './copyFile';
|
|
2
|
-
declare type MoveFiles = {
|
|
3
|
-
from: File;
|
|
4
|
-
to: File;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* It's not possible to just move or rename a file, you must copy then delete the old file.
|
|
8
|
-
*/
|
|
9
|
-
declare const moveFile: ({ from, to }: MoveFiles) => Promise<void>;
|
|
10
|
-
export default moveFile;
|
package/aws/s3/readBuffer.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Modified } from './readFile';
|
|
2
|
-
export declare type ReadBufferResponse = Modified & {
|
|
3
|
-
buffer: any;
|
|
4
|
-
};
|
|
5
|
-
declare type ReadBuffer = {
|
|
6
|
-
bucket: string;
|
|
7
|
-
key: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Similar function to reading the S3 file, but instead of a text file return a buffer.
|
|
11
|
-
*/
|
|
12
|
-
declare const readBuffer: ({ bucket, key }: ReadBuffer) => Promise<ReadBufferResponse>;
|
|
13
|
-
export default readBuffer;
|
package/aws/s3/readFile.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare type Modified = {
|
|
2
|
-
now: number;
|
|
3
|
-
modified: {
|
|
4
|
-
unix: null | number;
|
|
5
|
-
vsNow: {
|
|
6
|
-
months: number;
|
|
7
|
-
days: number;
|
|
8
|
-
hours: number;
|
|
9
|
-
minutes: number;
|
|
10
|
-
};
|
|
11
|
-
vsMidnight: {
|
|
12
|
-
hours: number;
|
|
13
|
-
minutes: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare type ReadFileResponse = Modified & {
|
|
18
|
-
body: any;
|
|
19
|
-
};
|
|
20
|
-
export declare const readFileDefault: ReadFileResponse;
|
|
21
|
-
declare type ReadFile = {
|
|
22
|
-
bucket: string;
|
|
23
|
-
key: string;
|
|
24
|
-
isJson?: boolean;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Read a file from S3 and return either null, the content or JSON decoded.
|
|
28
|
-
*/
|
|
29
|
-
declare const readFile: ({ bucket, key, isJson }: ReadFile) => Promise<ReadFileResponse>;
|
|
30
|
-
export default readFile;
|
package/aws/s3/writeFile.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type WritePresignedPost = {
|
|
3
|
-
bucket: string;
|
|
4
|
-
config: Config;
|
|
5
|
-
fields: any;
|
|
6
|
-
file: any;
|
|
7
|
-
key: string;
|
|
8
|
-
url: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Get a presigned post URL so we can upload directly to S3 via frontend.
|
|
12
|
-
*/
|
|
13
|
-
declare const writePresignedPost: ({ bucket, config, fields, file, key, url }: WritePresignedPost) => Promise<null | string>;
|
|
14
|
-
export default writePresignedPost;
|
package/aws/s3cache/cache.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import durationComparisons from '../../date/durationComparisons';
|
|
2
|
-
import durations from '../../date/durations';
|
|
3
|
-
export declare type Cache = {
|
|
4
|
-
duration: number;
|
|
5
|
-
from: typeof durationComparisons.VS_MIDNIGHT | typeof durationComparisons.VS_NOW;
|
|
6
|
-
timeframe: typeof durations.FOREVER | typeof durations.MONTHS | typeof durations.DAYS | typeof durations.HOURS | typeof durations.MINUTES;
|
|
7
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Cache } from './cache';
|
|
2
|
-
import { GetKey } from './getKey';
|
|
3
|
-
declare type GetCache = GetKey & {
|
|
4
|
-
bucket: string;
|
|
5
|
-
cache: Cache;
|
|
6
|
-
isJson?: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Get the stored cache if it exists.
|
|
10
|
-
*/
|
|
11
|
-
declare const getCache: ({ bucket, cache, fileName, folder, isJson }: GetCache) => Promise<any>;
|
|
12
|
-
export default getCache;
|
package/aws/s3cache/getKey.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type GetKey = {
|
|
2
|
-
fileName: any;
|
|
3
|
-
folder: string;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Take an input and return the key.
|
|
7
|
-
* Always in the "_cache" folder with the "environment" followed by the optional folder then the key.
|
|
8
|
-
*/
|
|
9
|
-
declare const getKey: ({ fileName, folder }: GetKey) => string;
|
|
10
|
-
export default getKey;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetKey } from './getKey';
|
|
2
|
-
declare type UpdateCache = GetKey & {
|
|
3
|
-
bucket: any;
|
|
4
|
-
data: any;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Delete other caches if present, then save the new file.
|
|
8
|
-
*/
|
|
9
|
-
declare const updateCache: ({ bucket, data, fileName, folder }: UpdateCache) => Promise<void>;
|
|
10
|
-
export default updateCache;
|
package/aws/ses/SimpleEmail.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import BaseClass from '../../class/BaseClass';
|
|
2
|
-
declare type Constructor = {
|
|
3
|
-
bcc?: string[];
|
|
4
|
-
cc?: string[];
|
|
5
|
-
from?: string;
|
|
6
|
-
html?: string;
|
|
7
|
-
subject?: string;
|
|
8
|
-
to?: string | string[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Class to build and send an AWS SES email.
|
|
12
|
-
*/
|
|
13
|
-
declare class SimpleEmail extends BaseClass {
|
|
14
|
-
from?: string;
|
|
15
|
-
to: string[];
|
|
16
|
-
cc: string[];
|
|
17
|
-
bcc: string[];
|
|
18
|
-
html?: string;
|
|
19
|
-
subject?: string;
|
|
20
|
-
constructor({ bcc, cc, from, html, subject, to }: Constructor);
|
|
21
|
-
setFrom({ from }: {
|
|
22
|
-
from: string;
|
|
23
|
-
}): this;
|
|
24
|
-
setHtml({ html }: {
|
|
25
|
-
html: string;
|
|
26
|
-
}): this;
|
|
27
|
-
setSubject({ subject }: {
|
|
28
|
-
subject: string;
|
|
29
|
-
}): this;
|
|
30
|
-
pushBcc({ recipient }: {
|
|
31
|
-
recipient: string | string[];
|
|
32
|
-
}): this;
|
|
33
|
-
pushCc({ recipient }: {
|
|
34
|
-
recipient: string | string[];
|
|
35
|
-
}): this;
|
|
36
|
-
pushTo({ recipient }: {
|
|
37
|
-
recipient: string | string[];
|
|
38
|
-
}): this;
|
|
39
|
-
setBcc({ recipient }: {
|
|
40
|
-
recipient: string | string[];
|
|
41
|
-
}): this;
|
|
42
|
-
setCc({ recipient }: {
|
|
43
|
-
recipient: string | string[];
|
|
44
|
-
}): this;
|
|
45
|
-
setTo({ recipient }: {
|
|
46
|
-
recipient: string | string[];
|
|
47
|
-
}): this;
|
|
48
|
-
send(): Promise<boolean>;
|
|
49
|
-
private _filterRecipients;
|
|
50
|
-
}
|
|
51
|
-
export default SimpleEmail;
|
package/aws/ses/initClient.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
config: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Shorthand function to get the Lambda Client.
|
|
7
|
-
* Library: @aws-sdk/client-ses
|
|
8
|
-
*/
|
|
9
|
-
declare const initClient: ({ config }: InitClient) => void;
|
|
10
|
-
export default initClient;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare type GetParameter = {
|
|
2
|
-
name: string;
|
|
3
|
-
withDecryption?: boolean;
|
|
4
|
-
isJson?: boolean;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Get a parameter and decryption if necessary (secure string)
|
|
8
|
-
*/
|
|
9
|
-
declare const getParameter: ({ name, withDecryption, isJson }: GetParameter) => Promise<any>;
|
|
10
|
-
export default getParameter;
|
package/aws/ssm/initClient.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Config } from '../getConfig';
|
|
2
|
-
declare type InitClient = {
|
|
3
|
-
config: Config;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Shorthand function to get the Lambda Client.
|
|
7
|
-
* Library: @aws-sdk/client-ssm
|
|
8
|
-
*/
|
|
9
|
-
declare const initClient: ({ config }: InitClient) => void;
|
|
10
|
-
export default initClient;
|
package/axios/get.d.ts
DELETED
package/axios/post.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare type Post = {
|
|
2
|
-
config?: object;
|
|
3
|
-
data?: object;
|
|
4
|
-
onError?: Function;
|
|
5
|
-
onSuccess?: Function;
|
|
6
|
-
url: string;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Make a POST request.
|
|
10
|
-
*/
|
|
11
|
-
declare const post: ({ config, data, onError, onSuccess, url }: Post) => Promise<any>;
|
|
12
|
-
export default post;
|
package/boolean/getBoolean.d.ts
DELETED
package/class/BaseClass.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare class BaseClass {
|
|
2
|
-
/**
|
|
3
|
-
* Shortcut to set a value to an array and return the instance.
|
|
4
|
-
*/
|
|
5
|
-
protected _setArray({ input, fields }: {
|
|
6
|
-
input: any | any[];
|
|
7
|
-
fields: any | any[];
|
|
8
|
-
}): this;
|
|
9
|
-
/**
|
|
10
|
-
* Shortcut to set a value and return the instance.
|
|
11
|
-
*/
|
|
12
|
-
protected _setValue({ input, fields }: {
|
|
13
|
-
input: any;
|
|
14
|
-
fields: any | any[];
|
|
15
|
-
}): this;
|
|
16
|
-
/**
|
|
17
|
-
* Shortcut to add a value to an existing array.
|
|
18
|
-
*/
|
|
19
|
-
protected _push({ input, fields }: {
|
|
20
|
-
input: any | any[];
|
|
21
|
-
fields: any | any[];
|
|
22
|
-
}): this;
|
|
23
|
-
/**
|
|
24
|
-
* Shortcut to get a value, but default if the fields don't exist.
|
|
25
|
-
*/
|
|
26
|
-
protected _get({ defaultValue, fields }: {
|
|
27
|
-
defaultValue: any;
|
|
28
|
-
fields: any | any[];
|
|
29
|
-
}): any;
|
|
30
|
-
}
|
|
31
|
-
export default BaseClass;
|
package/crud/actions.d.ts
DELETED
package/crypto/getDecrypt.d.ts
DELETED
package/crypto/getEncrypt.d.ts
DELETED
package/crypto/getRandom.d.ts
DELETED
package/crypto/getSha256.d.ts
DELETED
package/date/date.d.ts
DELETED
package/date/duration.d.ts
DELETED
package/date/durations.d.ts
DELETED
package/date/financialYear.d.ts
DELETED
package/date/format.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
import { GetMidnight } from './getMidnight';
|
|
3
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
4
|
-
declare type Format = GetTimeZoned & GetMidnight & {
|
|
5
|
-
dateFormat?: string;
|
|
6
|
-
input: DateType;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Convert a (number | string | Date) into a "yyyy-MM-dd" string or a specified format.
|
|
10
|
-
* As the user would be providing the input we don't want to change the timezone typically.
|
|
11
|
-
*/
|
|
12
|
-
declare const format: ({ input, dateFormat, setMidnight, setTimeZone }: Format) => string;
|
|
13
|
-
export default format;
|
package/date/getDate.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 GetDate = GetTimeZoned & GetMidnight & {
|
|
5
|
-
input: DateType;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Convert a (number | string | Date) into a Date object.
|
|
9
|
-
* As the user would be providing the input we don't want to change the timezone typically.
|
|
10
|
-
*/
|
|
11
|
-
declare const getDate: ({ input, setMidnight, setTimeZone }: GetDate) => Date;
|
|
12
|
-
export default getDate;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DateType } from './date';
|
|
2
|
-
/**
|
|
3
|
-
* Similar to date-fns' eachDayOfInterval, however the timezone messes this function up.
|
|
4
|
-
* https://date-fns.org/v2.28.0/docs/eachDayOfInterval
|
|
5
|
-
*/
|
|
6
|
-
declare const getDatesBetween: ({ end, start }: {
|
|
7
|
-
end: DateType;
|
|
8
|
-
start: DateType;
|
|
9
|
-
}) => Date[];
|
|
10
|
-
export default getDatesBetween;
|