@8ms/helpers 1.0.22 → 1.1.1

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.
Files changed (177) hide show
  1. package/dist/api/index.d.ts +5 -4
  2. package/dist/api/index.js +7 -5
  3. package/dist/api/response.d.ts +7 -0
  4. package/dist/api/response.js +9 -0
  5. package/dist/api/states.d.ts +8 -0
  6. package/dist/api/states.js +10 -0
  7. package/dist/api/unexpectedError.d.ts +1 -0
  8. package/dist/api/unexpectedError.js +4 -0
  9. package/dist/array/tests/contains.test.d.ts +1 -0
  10. package/dist/array/tests/contains.test.js +18 -0
  11. package/dist/atInternet/index.d.ts +1 -1
  12. package/dist/atInternet/{types.d.ts → request.d.ts} +0 -0
  13. package/dist/{api/types.js → atInternet/request.js} +0 -0
  14. package/dist/aws/athenaExpress/getClient.d.ts +2 -2
  15. package/dist/aws/{types.d.ts → config.d.ts} +1 -1
  16. package/dist/{atInternet/types.js → aws/config.js} +0 -0
  17. package/dist/aws/getConfig.d.ts +2 -2
  18. package/dist/aws/glue/getClient.d.ts +2 -2
  19. package/dist/aws/index.d.ts +2 -2
  20. package/dist/aws/lambda/getClient.d.ts +2 -2
  21. package/dist/aws/s3/deleteDirectory.js +1 -1
  22. package/dist/aws/s3/getClient.d.ts +2 -2
  23. package/dist/aws/s3/getSignedUrl.d.ts +2 -2
  24. package/dist/aws/s3/getSignedUrl.js +17 -6
  25. package/dist/aws/s3/listFiles.js +1 -1
  26. package/dist/aws/s3/listFolders.js +1 -1
  27. package/dist/aws/s3/readFile.js +1 -1
  28. package/dist/aws/s3/writePresignedPost.d.ts +4 -4
  29. package/dist/aws/s3/writePresignedPost.js +14 -3
  30. package/dist/aws/s3cache/cache.d.ts +6 -0
  31. package/dist/aws/s3cache/{types.js → cache.js} +0 -0
  32. package/dist/aws/s3cache/getCache.d.ts +2 -2
  33. package/dist/aws/s3cache/getKey.d.ts +2 -2
  34. package/dist/aws/s3cache/index.d.ts +2 -2
  35. package/dist/aws/s3cache/saveCache.d.ts +2 -2
  36. package/dist/aws/s3cache/updateCache.d.ts +2 -2
  37. package/dist/aws/ses/SimpleEmail.d.ts +2 -2
  38. package/dist/aws/ses/SimpleEmail.js +7 -7
  39. package/dist/aws/ses/getClient.d.ts +2 -2
  40. package/dist/aws/ssm/getClient.d.ts +2 -2
  41. package/dist/axios/get.d.ts +6 -1
  42. package/dist/axios/get.js +1 -1
  43. package/dist/axios/index.d.ts +2 -3
  44. package/dist/axios/post.d.ts +7 -1
  45. package/dist/axios/post.js +1 -1
  46. package/dist/crud/index.d.ts +3 -4
  47. package/dist/crud/index.js +3 -3
  48. package/dist/crud/states.d.ts +7 -0
  49. package/dist/crud/{constants.js → states.js} +2 -2
  50. package/dist/date/date.d.ts +4 -0
  51. package/dist/{aws/types.js → date/date.js} +0 -0
  52. package/dist/date/duration.d.ts +5 -0
  53. package/dist/{axios/types.js → date/duration.js} +0 -0
  54. package/dist/date/durationComparisons.d.ts +4 -0
  55. package/dist/date/durationComparisons.js +7 -0
  56. package/dist/date/durations.d.ts +7 -0
  57. package/dist/date/durations.js +10 -0
  58. package/dist/date/financialYear.d.ts +4 -0
  59. package/dist/{crud/types.js → date/financialYear.js} +0 -0
  60. package/dist/date/financialYearWeek.d.ts +6 -0
  61. package/dist/date/{types.js → financialYearWeek.js} +0 -0
  62. package/dist/date/format.d.ts +1 -1
  63. package/dist/date/getDate.d.ts +1 -1
  64. package/dist/date/getFinancialYear.d.ts +1 -1
  65. package/dist/date/getFinancialYearToDate.d.ts +1 -1
  66. package/dist/date/getFinancialYearWeeks.d.ts +1 -1
  67. package/dist/date/getLastWeek.d.ts +1 -1
  68. package/dist/date/getMax.d.ts +1 -1
  69. package/dist/date/getMin.d.ts +1 -1
  70. package/dist/date/getMonday.d.ts +1 -1
  71. package/dist/date/getNumber.d.ts +1 -1
  72. package/dist/date/getPredefinedTimeframe.d.ts +3 -2
  73. package/dist/date/getPredefinedTimeframe.js +4 -4
  74. package/dist/date/getSunday.d.ts +1 -1
  75. package/dist/date/getThisWeek.d.ts +1 -1
  76. package/dist/date/getTwoWeeksAgo.d.ts +1 -1
  77. package/dist/date/getWeeksAgo.d.ts +1 -1
  78. package/dist/date/index.d.ts +11 -4
  79. package/dist/date/index.js +9 -6
  80. package/dist/date/isLastWeek.d.ts +1 -1
  81. package/dist/date/isThisWeek.d.ts +1 -1
  82. package/dist/date/predefinedTimeframes.d.ts +7 -0
  83. package/dist/date/predefinedTimeframes.js +9 -0
  84. package/dist/date/timeframe.d.ts +8 -0
  85. package/dist/{environment/types.js → date/timeframe.js} +0 -0
  86. package/dist/date/timeframes.d.ts +4 -0
  87. package/dist/date/timeframes.js +7 -0
  88. package/dist/environment/environments.d.ts +6 -0
  89. package/dist/environment/{constants.js → environments.js} +2 -6
  90. package/dist/environment/getEnvironment.d.ts +4 -3
  91. package/dist/environment/getEnvironment.js +4 -4
  92. package/dist/environment/index.d.ts +4 -4
  93. package/dist/environment/index.js +5 -4
  94. package/dist/environment/isAws.d.ts +2 -2
  95. package/dist/environment/isAws.js +2 -2
  96. package/dist/environment/isDevelopment.d.ts +2 -2
  97. package/dist/environment/isDevelopment.js +2 -2
  98. package/dist/environment/isLocalhost.d.ts +2 -2
  99. package/dist/environment/isProduction.d.ts +2 -2
  100. package/dist/environment/isProduction.js +2 -2
  101. package/dist/environment/isStaging.d.ts +2 -2
  102. package/dist/environment/isStaging.js +2 -2
  103. package/dist/environment/isVercel.d.ts +2 -2
  104. package/dist/environment/isVercel.js +2 -2
  105. package/dist/environment/platforms.d.ts +5 -0
  106. package/dist/environment/platforms.js +7 -0
  107. package/dist/eskimi/accessToken.d.ts +9 -0
  108. package/dist/eskimi/{types.js → accessToken.js} +0 -0
  109. package/dist/eskimi/ageGroups.d.ts +4 -0
  110. package/dist/eskimi/ageGroups.js +41 -0
  111. package/dist/eskimi/{types.d.ts → campaign.d.ts} +0 -0
  112. package/dist/{google/types.js → eskimi/campaign.js} +0 -0
  113. package/dist/eskimi/devices.d.ts +4 -0
  114. package/dist/eskimi/devices.js +13 -0
  115. package/dist/eskimi/{constants.d.ts → endpoints.d.ts} +1 -13
  116. package/dist/eskimi/endpoints.js +18 -0
  117. package/dist/eskimi/genders.d.ts +4 -0
  118. package/dist/eskimi/genders.js +13 -0
  119. package/dist/eskimi/getAccessToken.d.ts +1 -9
  120. package/dist/eskimi/getAgeGroup.js +2 -2
  121. package/dist/eskimi/getDevice.js +2 -2
  122. package/dist/eskimi/getGender.js +2 -2
  123. package/dist/eskimi/index.d.ts +8 -4
  124. package/dist/eskimi/index.js +9 -6
  125. package/dist/google/getCredentials.d.ts +18 -1
  126. package/dist/google/index.d.ts +2 -3
  127. package/dist/google/sheets/getAuth.d.ts +1 -1
  128. package/dist/google/sheets/getAuth.js +5 -2
  129. package/dist/googleAds/{types.d.ts → client.d.ts} +0 -0
  130. package/dist/googleAds/{types.js → client.js} +0 -0
  131. package/dist/googleAds/getClient.d.ts +3 -3
  132. package/dist/googleAds/index.d.ts +1 -1
  133. package/dist/myTarget/getAccessToken.d.ts +2 -2
  134. package/dist/nextAuth/index.d.ts +2 -2
  135. package/dist/nextAuth/index.js +3 -3
  136. package/dist/nextAuth/{constants.d.ts → states.d.ts} +1 -1
  137. package/dist/nextAuth/{constants.js → states.js} +2 -2
  138. package/dist/number/getNumber.d.ts +1 -1
  139. package/dist/number/getNumber.js +15 -4
  140. package/dist/number/tests/getNumber.test.d.ts +1 -0
  141. package/dist/number/tests/getNumber.test.js +21 -0
  142. package/dist/snapchat/getAccessToken.d.ts +2 -2
  143. package/dist/string/getCleanFolder.d.ts +3 -1
  144. package/dist/string/getCleanFolder.js +5 -2
  145. package/dist/string/getStringFromStream.d.ts +3 -1
  146. package/dist/string/getStringFromStream.js +2 -1
  147. package/dist/string/tests/getCleanFolder.test.js +1 -1
  148. package/dist/url/buildUrl.d.ts +3 -3
  149. package/dist/url/index.d.ts +1 -1
  150. package/dist/url/{types.d.ts → url.d.ts} +0 -0
  151. package/dist/url/{types.js → url.js} +0 -0
  152. package/dist/util/defaultTo.d.ts +3 -0
  153. package/dist/util/defaultTo.js +1 -1
  154. package/dist/util/tests/defaultTo.test.d.ts +1 -0
  155. package/dist/util/tests/defaultTo.test.js +27 -0
  156. package/dist/webWorker/index.d.ts +3 -4
  157. package/dist/webWorker/index.js +3 -3
  158. package/dist/webWorker/states.d.ts +6 -0
  159. package/dist/webWorker/{constant.js → states.js} +2 -2
  160. package/package.json +4 -4
  161. package/dist/api/constants.d.ts +0 -10
  162. package/dist/api/constants.js +0 -16
  163. package/dist/api/types.d.ts +0 -7
  164. package/dist/aws/s3cache/types.d.ts +0 -6
  165. package/dist/axios/types.d.ts +0 -13
  166. package/dist/crud/constants.d.ts +0 -6
  167. package/dist/crud/types.d.ts +0 -2
  168. package/dist/date/constants.d.ts +0 -21
  169. package/dist/date/constants.js +0 -24
  170. package/dist/date/types.d.ts +0 -28
  171. package/dist/environment/constants.d.ts +0 -9
  172. package/dist/environment/types.d.ts +0 -3
  173. package/dist/eskimi/constants.js +0 -76
  174. package/dist/google/types.d.ts +0 -18
  175. package/dist/webWorker/constant.d.ts +0 -5
  176. package/dist/webWorker/types.d.ts +0 -2
  177. package/dist/webWorker/types.js +0 -2
@@ -0,0 +1,5 @@
1
+ export declare type DurationType = {
2
+ hours: number;
3
+ minutes: number;
4
+ seconds: number;
5
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ export declare const durationComparisons: {
2
+ VS_NOW: string;
3
+ VS_MIDNIGHT: string;
4
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.durationComparisons = void 0;
4
+ exports.durationComparisons = {
5
+ VS_NOW: 'vsNow',
6
+ VS_MIDNIGHT: 'vsMidnight',
7
+ };
@@ -0,0 +1,7 @@
1
+ export declare const durations: {
2
+ FOREVER: string;
3
+ MONTHS: string;
4
+ DAYS: string;
5
+ HOURS: string;
6
+ MINUTES: string;
7
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.durations = void 0;
4
+ exports.durations = {
5
+ FOREVER: 'forever',
6
+ MONTHS: 'months',
7
+ DAYS: 'days',
8
+ HOURS: 'hours',
9
+ MINUTES: 'minutes',
10
+ };
@@ -0,0 +1,4 @@
1
+ export declare type FinancialYearType = {
2
+ end: Date;
3
+ start: Date;
4
+ };
File without changes
@@ -0,0 +1,6 @@
1
+ export declare type FinancialYearWeekType = {
2
+ end: Date;
3
+ financialWeek: number;
4
+ financialYear: number;
5
+ start: Date;
6
+ };
File without changes
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * Convert a (number | string | Date) into a "yyyy-MM-dd" string or a specified format.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * Convert a (number | string | Date) into a Date object.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FinancialYearType } from './types';
1
+ import { FinancialYearType } from './financialYear';
2
2
  /**
3
3
  * Get the current financial year.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FinancialYearType } from './types';
1
+ import { FinancialYearType } from './financialYear';
2
2
  /**
3
3
  * Return the current financial year up to today.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FinancialYearWeekType } from './types';
1
+ import { FinancialYearWeekType } from './financialYearWeek';
2
2
  /**
3
3
  * Get the current financial year.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { TimeframeType } from './types';
1
+ import { TimeframeType } from './timeframe';
2
2
  /**
3
3
  * Return an object of start/end predefined date of Last Week.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * If a given date is beyond the maximum, return the maximum.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * If a given date is before the minimum, return the minimum.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * Retrieve the closest last Monday relative to the input or today.
4
4
  * 0 weeksAgo - Tuesday (10th), return Monday (8th)
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * Convert a (number | string | Date) into a YYYYMMDD number.
4
4
  */
@@ -1,8 +1,9 @@
1
- import { TimeframePredefinedType, TimeframeType } from './types';
1
+ import { PredefinedTimeframesType } from './predefinedTimeframes';
2
+ import { TimeframeType } from './timeframe';
2
3
  /**
3
4
  * Check to see the date matches a predefined time frame
4
5
  */
5
6
  declare const getPredefinedTimeframe: ({ timeframe }: {
6
7
  timeframe: TimeframeType;
7
- }) => TimeframePredefinedType;
8
+ }) => PredefinedTimeframesType;
8
9
  export default getPredefinedTimeframe;
@@ -3,22 +3,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("./constants");
7
6
  var isLastWeek_1 = __importDefault(require("./isLastWeek"));
8
7
  var isThisWeek_1 = __importDefault(require("./isThisWeek"));
8
+ var predefinedTimeframes_1 = require("./predefinedTimeframes");
9
9
  /**
10
10
  * Check to see the date matches a predefined time frame
11
11
  */
12
12
  var getPredefinedTimeframe = function (_a) {
13
13
  var timeframe = _a.timeframe;
14
- var response = constants_1.TimeframePredefined.CUSTOM;
14
+ var response = predefinedTimeframes_1.predefinedTimeframes.CUSTOM;
15
15
  // If the selected date matches last week
16
16
  if ((0, isLastWeek_1.default)(timeframe)) {
17
- response = constants_1.TimeframePredefined.LAST_WEEK;
17
+ response = predefinedTimeframes_1.predefinedTimeframes.LAST_WEEK;
18
18
  }
19
19
  // If the selected date matches this week
20
20
  else if ((0, isThisWeek_1.default)(timeframe)) {
21
- response = constants_1.TimeframePredefined.THIS_WEEK;
21
+ response = predefinedTimeframes_1.predefinedTimeframes.THIS_WEEK;
22
22
  }
23
23
  return response;
24
24
  };
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * Retrieve the closest last Sunday relative to the input or today.
4
4
  * 0 weeksAgo - Tuesday (17th), return Sunday (14th)
@@ -1,4 +1,4 @@
1
- import { TimeframeType } from './types';
1
+ import { TimeframeType } from './timeframe';
2
2
  /**
3
3
  * Return an object of start/end predefined date of This Week.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { TimeframeType } from './types';
1
+ import { TimeframeType } from './timeframe';
2
2
  /**
3
3
  * Return an object of start/end predefined date of Two Weeks Ago.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DateType } from './types';
1
+ import { DateType } from './date';
2
2
  /**
3
3
  * From a given input, move the date back X weeksAgo
4
4
  */
@@ -1,4 +1,9 @@
1
- import { Duration, DurationComparison, Timeframe, TimeframePredefined } from './constants';
1
+ import { DateType } from './date';
2
+ import { DurationType } from './duration';
3
+ import { durationComparisons } from './durationComparisons';
4
+ import { durations } from './durations';
5
+ import { FinancialYearType } from './financialYear';
6
+ import { FinancialYearWeekType } from './financialYearWeek';
2
7
  import format from './format';
3
8
  import getDate from './getDate';
4
9
  import getDurationHours from './getDurationHours';
@@ -21,6 +26,8 @@ import isDateValid from './isDateValid';
21
26
  import isLastWeek from './isLastWeek';
22
27
  import isThisWeek from './isThisWeek';
23
28
  import parseExcelDate from './parseExcelDate';
24
- import { DateType, FinancialYearType, FinancialYearWeekType, TimeframePredefinedType, TimeframeType } from './types';
25
- export type { DateType, FinancialYearType, FinancialYearWeekType, TimeframeType, TimeframePredefinedType, };
26
- export { Duration, DurationComparison, Timeframe, TimeframePredefined, format, getDate, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearWeeks, getLastWeek, getMax, getMin, getMonday, getNumber, getPredefinedTimeframe, getSunday, getThisWeek, getToday, getTwoWeeksAgo, getYesterday, isDateValid, isLastWeek, isThisWeek, parseExcelDate, };
29
+ import { predefinedTimeframes, PredefinedTimeframesType } from './predefinedTimeframes';
30
+ import { TimeframeType } from './timeframe';
31
+ import { timeframes } from './timeframes';
32
+ export type { DateType, DurationType, FinancialYearType, FinancialYearWeekType, PredefinedTimeframesType, TimeframeType, };
33
+ export { durations, durationComparisons, predefinedTimeframes, timeframes, format, getDate, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearWeeks, getLastWeek, getMax, getMin, getMonday, getNumber, getPredefinedTimeframe, getSunday, getThisWeek, getToday, getTwoWeeksAgo, getYesterday, isDateValid, isLastWeek, isThisWeek, parseExcelDate, };
@@ -3,12 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseExcelDate = exports.isThisWeek = exports.isLastWeek = exports.isDateValid = exports.getYesterday = exports.getTwoWeeksAgo = exports.getToday = exports.getThisWeek = exports.getSunday = exports.getPredefinedTimeframe = exports.getNumber = exports.getMonday = exports.getMin = exports.getMax = exports.getLastWeek = exports.getFinancialYearWeeks = exports.getFinancialYearToDate = exports.getFinancialYear = exports.getDurationMinutes = exports.getDurationHours = exports.getDate = exports.format = exports.TimeframePredefined = exports.Timeframe = exports.DurationComparison = exports.Duration = void 0;
7
- var constants_1 = require("./constants");
8
- Object.defineProperty(exports, "Duration", { enumerable: true, get: function () { return constants_1.Duration; } });
9
- Object.defineProperty(exports, "DurationComparison", { enumerable: true, get: function () { return constants_1.DurationComparison; } });
10
- Object.defineProperty(exports, "Timeframe", { enumerable: true, get: function () { return constants_1.Timeframe; } });
11
- Object.defineProperty(exports, "TimeframePredefined", { enumerable: true, get: function () { return constants_1.TimeframePredefined; } });
6
+ exports.parseExcelDate = exports.isThisWeek = exports.isLastWeek = exports.isDateValid = exports.getYesterday = exports.getTwoWeeksAgo = exports.getToday = exports.getThisWeek = exports.getSunday = exports.getPredefinedTimeframe = exports.getNumber = exports.getMonday = exports.getMin = exports.getMax = exports.getLastWeek = exports.getFinancialYearWeeks = exports.getFinancialYearToDate = exports.getFinancialYear = exports.getDurationMinutes = exports.getDurationHours = exports.getDate = exports.format = exports.timeframes = exports.predefinedTimeframes = exports.durationComparisons = exports.durations = void 0;
7
+ var durationComparisons_1 = require("./durationComparisons");
8
+ Object.defineProperty(exports, "durationComparisons", { enumerable: true, get: function () { return durationComparisons_1.durationComparisons; } });
9
+ var durations_1 = require("./durations");
10
+ Object.defineProperty(exports, "durations", { enumerable: true, get: function () { return durations_1.durations; } });
12
11
  var format_1 = __importDefault(require("./format"));
13
12
  exports.format = format_1.default;
14
13
  var getDate_1 = __importDefault(require("./getDate"));
@@ -53,3 +52,7 @@ var isThisWeek_1 = __importDefault(require("./isThisWeek"));
53
52
  exports.isThisWeek = isThisWeek_1.default;
54
53
  var parseExcelDate_1 = __importDefault(require("./parseExcelDate"));
55
54
  exports.parseExcelDate = parseExcelDate_1.default;
55
+ var predefinedTimeframes_1 = require("./predefinedTimeframes");
56
+ Object.defineProperty(exports, "predefinedTimeframes", { enumerable: true, get: function () { return predefinedTimeframes_1.predefinedTimeframes; } });
57
+ var timeframes_1 = require("./timeframes");
58
+ Object.defineProperty(exports, "timeframes", { enumerable: true, get: function () { return timeframes_1.timeframes; } });
@@ -1,4 +1,4 @@
1
- import { TimeframeType } from './types';
1
+ import { TimeframeType } from './timeframe';
2
2
  /**
3
3
  * Check to see if a given timeframe is Last Week.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { TimeframeType } from './types';
1
+ import { TimeframeType } from './timeframe';
2
2
  /**
3
3
  * Check to see if a given timeframe is Last Week.
4
4
  */
@@ -0,0 +1,7 @@
1
+ export declare const predefinedTimeframes: {
2
+ NONE: string;
3
+ CUSTOM: string;
4
+ THIS_WEEK: string;
5
+ LAST_WEEK: string;
6
+ };
7
+ export declare type PredefinedTimeframesType = typeof predefinedTimeframes.NONE | typeof predefinedTimeframes.CUSTOM | typeof predefinedTimeframes.LAST_WEEK | typeof predefinedTimeframes.THIS_WEEK;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.predefinedTimeframes = void 0;
4
+ exports.predefinedTimeframes = {
5
+ NONE: 'none',
6
+ CUSTOM: 'custom',
7
+ THIS_WEEK: 'thisWeek',
8
+ LAST_WEEK: 'lastWeek',
9
+ };
@@ -0,0 +1,8 @@
1
+ import { DateType } from './date';
2
+ /**
3
+ * A timeframe has a start and an end date.
4
+ */
5
+ export declare type TimeframeType = {
6
+ end: DateType;
7
+ start: DateType;
8
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ export declare const timeframes: {
2
+ CURRENT: string;
3
+ COMPARISON: string;
4
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timeframes = void 0;
4
+ exports.timeframes = {
5
+ CURRENT: 'current',
6
+ COMPARISON: 'comparison',
7
+ };
@@ -0,0 +1,6 @@
1
+ export declare const environments: {
2
+ DEVELOPMENT: string;
3
+ STAGING: string;
4
+ PRODUCTION: string;
5
+ };
6
+ export declare type EnvironmentsType = typeof environments.DEVELOPMENT | typeof environments.STAGING | typeof environments.PRODUCTION;
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Platform = exports.Environment = void 0;
4
- exports.Environment = {
3
+ exports.environments = void 0;
4
+ exports.environments = {
5
5
  DEVELOPMENT: 'development',
6
6
  STAGING: 'staging',
7
7
  PRODUCTION: 'production',
8
8
  };
9
- exports.Platform = {
10
- AWS: 'aws',
11
- VERCEL: 'vercel',
12
- };
@@ -1,8 +1,9 @@
1
- import { EnvironmentType, PlatformType } from './types';
1
+ import { EnvironmentsType } from './environments';
2
+ import { PlatformsType } from './platforms';
2
3
  /**
3
4
  * Determine the environment we're using.
4
5
  */
5
6
  declare const getEnvironment: ({ platform }: {
6
- platform: PlatformType;
7
- }) => EnvironmentType;
7
+ platform: PlatformsType;
8
+ }) => EnvironmentsType;
8
9
  export default getEnvironment;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("./constants");
6
+ var environments_1 = require("./environments");
7
7
  var isVercel_1 = __importDefault(require("./isVercel"));
8
8
  /**
9
9
  * Determine the environment we're using.
@@ -17,14 +17,14 @@ var getEnvironment = function (_a) {
17
17
  }
18
18
  switch (platformEnvironment) {
19
19
  case 'development':
20
- response = constants_1.Environment.DEVELOPMENT;
20
+ response = environments_1.environments.DEVELOPMENT;
21
21
  break;
22
22
  case 'preview':
23
23
  case 'staging':
24
- response = constants_1.Environment.STAGING;
24
+ response = environments_1.environments.STAGING;
25
25
  break;
26
26
  default:
27
- response = constants_1.Environment.PRODUCTION;
27
+ response = environments_1.environments.PRODUCTION;
28
28
  }
29
29
  return response;
30
30
  };
@@ -1,4 +1,4 @@
1
- import { Environment, Platform } from './constants';
1
+ import { environments, EnvironmentsType } from './environments';
2
2
  import getEnvironment from './getEnvironment';
3
3
  import isAws from './isAws';
4
4
  import isDevelopment from './isDevelopment';
@@ -6,6 +6,6 @@ import isLocalhost from './isLocalhost';
6
6
  import isProduction from './isProduction';
7
7
  import isStaging from './isStaging';
8
8
  import isVercel from './isVercel';
9
- import { EnvironmentType } from './types';
10
- export type { EnvironmentType, };
11
- export { Environment, Platform, getEnvironment, isAws, isDevelopment, isLocalhost, isProduction, isStaging, isVercel, };
9
+ import { platforms, PlatformsType } from './platforms';
10
+ export type { EnvironmentsType, PlatformsType, };
11
+ export { environments, platforms, getEnvironment, isAws, isDevelopment, isLocalhost, isProduction, isStaging, isVercel, };
@@ -3,10 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isVercel = exports.isStaging = exports.isProduction = exports.isLocalhost = exports.isDevelopment = exports.isAws = exports.getEnvironment = exports.Platform = exports.Environment = void 0;
7
- var constants_1 = require("./constants");
8
- Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return constants_1.Environment; } });
9
- Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return constants_1.Platform; } });
6
+ exports.isVercel = exports.isStaging = exports.isProduction = exports.isLocalhost = exports.isDevelopment = exports.isAws = exports.getEnvironment = exports.platforms = exports.environments = void 0;
7
+ var environments_1 = require("./environments");
8
+ Object.defineProperty(exports, "environments", { enumerable: true, get: function () { return environments_1.environments; } });
10
9
  var getEnvironment_1 = __importDefault(require("./getEnvironment"));
11
10
  exports.getEnvironment = getEnvironment_1.default;
12
11
  var isAws_1 = __importDefault(require("./isAws"));
@@ -21,3 +20,5 @@ var isStaging_1 = __importDefault(require("./isStaging"));
21
20
  exports.isStaging = isStaging_1.default;
22
21
  var isVercel_1 = __importDefault(require("./isVercel"));
23
22
  exports.isVercel = isVercel_1.default;
23
+ var platforms_1 = require("./platforms");
24
+ Object.defineProperty(exports, "platforms", { enumerable: true, get: function () { return platforms_1.platforms; } });
@@ -1,8 +1,8 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  /**
3
3
  * Check to see if we are working on AWS Lambda.
4
4
  */
5
5
  declare const isAws: ({ platform }: {
6
- platform: PlatformType;
6
+ platform: PlatformsType;
7
7
  }) => boolean;
8
8
  export default isAws;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var constants_1 = require("./constants");
3
+ var platforms_1 = require("./platforms");
4
4
  /**
5
5
  * Check to see if we are working on AWS Lambda.
6
6
  */
7
7
  var isAws = function (_a) {
8
8
  var platform = _a.platform;
9
- return constants_1.Platform.AWS === platform;
9
+ return platforms_1.platforms.AWS === platform;
10
10
  };
11
11
  exports.default = isAws;
@@ -1,5 +1,5 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  declare const isDevelopment: ({ platform }: {
3
- platform: PlatformType;
3
+ platform: PlatformsType;
4
4
  }) => boolean;
5
5
  export default isDevelopment;
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("./constants");
6
+ var environments_1 = require("./environments");
7
7
  var getEnvironment_1 = __importDefault(require("./getEnvironment"));
8
8
  var isDevelopment = function (_a) {
9
9
  var platform = _a.platform;
10
- return constants_1.Environment.DEVELOPMENT === (0, getEnvironment_1.default)({ platform: platform });
10
+ return environments_1.environments.DEVELOPMENT === (0, getEnvironment_1.default)({ platform: platform });
11
11
  };
12
12
  exports.default = isDevelopment;
@@ -1,8 +1,8 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  /**
3
3
  * Check to see if we are developing locally or on the hosted platform.
4
4
  */
5
5
  declare const isLocalhost: ({ platform }: {
6
- platform: PlatformType;
6
+ platform: PlatformsType;
7
7
  }) => boolean;
8
8
  export default isLocalhost;
@@ -1,5 +1,5 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  declare const isProduction: ({ platform }: {
3
- platform: PlatformType;
3
+ platform: PlatformsType;
4
4
  }) => boolean;
5
5
  export default isProduction;
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("./constants");
6
+ var environments_1 = require("./environments");
7
7
  var getEnvironment_1 = __importDefault(require("./getEnvironment"));
8
8
  var isProduction = function (_a) {
9
9
  var platform = _a.platform;
10
- return constants_1.Environment.PRODUCTION === (0, getEnvironment_1.default)({ platform: platform });
10
+ return environments_1.environments.PRODUCTION === (0, getEnvironment_1.default)({ platform: platform });
11
11
  };
12
12
  exports.default = isProduction;
@@ -1,5 +1,5 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  declare const isStaging: ({ platform }: {
3
- platform: PlatformType;
3
+ platform: PlatformsType;
4
4
  }) => boolean;
5
5
  export default isStaging;
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("./constants");
6
+ var environments_1 = require("./environments");
7
7
  var getEnvironment_1 = __importDefault(require("./getEnvironment"));
8
8
  var isStaging = function (_a) {
9
9
  var platform = _a.platform;
10
- return constants_1.Environment.STAGING === (0, getEnvironment_1.default)({ platform: platform });
10
+ return environments_1.environments.STAGING === (0, getEnvironment_1.default)({ platform: platform });
11
11
  };
12
12
  exports.default = isStaging;
@@ -1,8 +1,8 @@
1
- import { PlatformType } from './types';
1
+ import { PlatformsType } from './platforms';
2
2
  /**
3
3
  * Check to see if we are working on Vercel.
4
4
  */
5
5
  declare const isVercel: ({ platform }: {
6
- platform: PlatformType;
6
+ platform: PlatformsType;
7
7
  }) => boolean;
8
8
  export default isVercel;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var constants_1 = require("./constants");
3
+ var platforms_1 = require("./platforms");
4
4
  /**
5
5
  * Check to see if we are working on Vercel.
6
6
  */
7
7
  var isVercel = function (_a) {
8
8
  var platform = _a.platform;
9
- return constants_1.Platform.VERCEL === platform;
9
+ return platforms_1.platforms.VERCEL === platform;
10
10
  };
11
11
  exports.default = isVercel;
@@ -0,0 +1,5 @@
1
+ export declare const platforms: {
2
+ AWS: string;
3
+ VERCEL: string;
4
+ };
5
+ export declare type PlatformsType = typeof platforms.AWS | typeof platforms.VERCEL;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.platforms = void 0;
4
+ exports.platforms = {
5
+ AWS: 'aws',
6
+ VERCEL: 'vercel',
7
+ };
@@ -0,0 +1,9 @@
1
+ import { ConfigType } from '../aws';
2
+ export declare type GetAccessTokenType = {
3
+ SsmLib: any;
4
+ awsConfig: ConfigType;
5
+ force: boolean;
6
+ ssmName: string;
7
+ ssmWithDecryption: boolean;
8
+ ssmIsJson: boolean;
9
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ export declare const ageGroups: {
2
+ id: number;
3
+ name: string;
4
+ }[];