dce-reactkit 4.3.4 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +338 -2316
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/LogReviewer.d.ts +1 -1
- package/dist/cjs/types/helpers/logClientEvent.d.ts +1 -1
- package/dist/cjs/types/html/genErrorPage.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +2 -64
- package/dist/cjs/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/esm/index.js +78 -2223
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/LogReviewer.d.ts +1 -1
- package/dist/esm/types/helpers/logClientEvent.d.ts +1 -1
- package/dist/esm/types/html/genErrorPage.d.ts +1 -1
- package/dist/esm/types/index.d.ts +2 -64
- package/dist/esm/types/types/IntelliTableColumn.d.ts +1 -1
- package/dist/index.d.ts +3 -835
- package/package.json +4 -3
- package/src/components/AppWrapper.tsx +12 -10
- package/src/components/AutoscrollToBottomContainer.tsx +5 -3
- package/src/components/CopiableBox.tsx +5 -1
- package/src/components/DBEntryManagerPanel/helpers/generateEndpointPath.ts +2 -2
- package/src/components/ErrorBox.tsx +6 -2
- package/src/components/IntelliTable.tsx +7 -5
- package/src/components/LogReviewer.tsx +23 -21
- package/src/components/Modal/index.tsx +5 -3
- package/src/components/MultiSwitch.tsx +5 -1
- package/src/components/Shimmer.tsx +4 -2
- package/src/components/SimpleDateChooser.tsx +11 -13
- package/src/components/SimpleTimeChooser.tsx +4 -2
- package/src/helpers/canReviewLogs.test.ts +5 -3
- package/src/helpers/canReviewLogs.ts +5 -3
- package/src/helpers/initClient.tsx +8 -8
- package/src/helpers/isMobileOrTablet.tsx +2 -1
- package/src/helpers/isSelectAdmin.ts +4 -2
- package/src/helpers/logClientEvent.tsx +7 -5
- package/src/helpers/stubServerEndpoint.tsx +1 -1
- package/src/helpers/visitServerEndpoint.tsx +10 -7
- package/src/html/genErrorPage.ts +6 -4
- package/src/index.ts +105 -98
- package/src/types/IntelliTableColumn.ts +4 -1
- package/dist/cjs/types/constants/DAY_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/HOUR_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/cjs/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
- package/dist/cjs/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
- package/dist/cjs/types/constants/MINUTE_IN_MS.d.ts +0 -6
- package/dist/cjs/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/cjs/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
- package/dist/cjs/types/errors/ErrorWithCode.d.ts +0 -9
- package/dist/cjs/types/helpers/abbreviate.d.ts +0 -10
- package/dist/cjs/types/helpers/abbreviate.test.d.ts +0 -5
- package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
- package/dist/cjs/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
- package/dist/cjs/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
- package/dist/cjs/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
- package/dist/cjs/types/helpers/avg.d.ts +0 -8
- package/dist/cjs/types/helpers/avg.test.d.ts +0 -5
- package/dist/cjs/types/helpers/capitalize.d.ts +0 -7
- package/dist/cjs/types/helpers/ceilToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
- package/dist/cjs/types/helpers/cloneDeep.d.ts +0 -8
- package/dist/cjs/types/helpers/compareArraysByProp.d.ts +0 -13
- package/dist/cjs/types/helpers/compareArraysByProp.test.d.ts +0 -5
- package/dist/cjs/types/helpers/extractProp.d.ts +0 -12
- package/dist/cjs/types/helpers/extractProp.test.d.ts +0 -5
- package/dist/cjs/types/helpers/floorToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/floorToNumDecimals.test.d.ts +0 -5
- package/dist/cjs/types/helpers/forceNumIntoBounds.d.ts +0 -10
- package/dist/cjs/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
- package/dist/cjs/types/helpers/genCSV.d.ts +0 -18
- package/dist/cjs/types/helpers/genCSV.test.d.ts +0 -5
- package/dist/cjs/types/helpers/genCommaList.d.ts +0 -12
- package/dist/cjs/types/helpers/genCommaList.test.d.ts +0 -1
- package/dist/cjs/types/helpers/getHumanReadableDate.d.ts +0 -8
- package/dist/cjs/types/helpers/getHumanReadableDate.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getLocalTimeInfo.d.ts +0 -19
- package/dist/cjs/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
- package/dist/cjs/types/helpers/getMonthName.d.ts +0 -14
- package/dist/cjs/types/helpers/getMonthName.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getOrdinal.d.ts +0 -8
- package/dist/cjs/types/helpers/getOrdinal.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getPartOfDay.d.ts +0 -7
- package/dist/cjs/types/helpers/getPartOfDay.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +0 -21
- package/dist/cjs/types/helpers/getTimeInfoInET.test.d.ts +0 -5
- package/dist/cjs/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
- package/dist/cjs/types/helpers/getWordCount.d.ts +0 -10
- package/dist/cjs/types/helpers/idify.d.ts +0 -9
- package/dist/cjs/types/helpers/onlyKeepLetters.d.ts +0 -8
- package/dist/cjs/types/helpers/padDecimalZeros.d.ts +0 -10
- package/dist/cjs/types/helpers/padZerosLeft.d.ts +0 -9
- package/dist/cjs/types/helpers/parallelLimit.d.ts +0 -12
- package/dist/cjs/types/helpers/prefixWithAOrAn.d.ts +0 -10
- package/dist/cjs/types/helpers/roundToNumDecimals.d.ts +0 -9
- package/dist/cjs/types/helpers/shuffleArray.d.ts +0 -8
- package/dist/cjs/types/helpers/startMinWait.d.ts +0 -9
- package/dist/cjs/types/helpers/stringsToHumanReadableList.d.ts +0 -10
- package/dist/cjs/types/helpers/sum.d.ts +0 -8
- package/dist/cjs/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
- package/dist/cjs/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
- package/dist/cjs/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
- package/dist/cjs/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
- package/dist/cjs/types/helpers/validators/validURL.d.ts +0 -8
- package/dist/cjs/types/helpers/validators/validateEmail.d.ts +0 -11
- package/dist/cjs/types/helpers/validators/validateEmail.test.d.ts +0 -1
- package/dist/cjs/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
- package/dist/cjs/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
- package/dist/cjs/types/helpers/validators/validateString.d.ts +0 -22
- package/dist/cjs/types/helpers/validators/validateString.test.d.ts +0 -1
- package/dist/cjs/types/helpers/waitMs.d.ts +0 -7
- package/dist/cjs/types/types/DayOfWeek.d.ts +0 -14
- package/dist/cjs/types/types/Log/LogMainInfo.d.ts +0 -39
- package/dist/cjs/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
- package/dist/cjs/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
- package/dist/cjs/types/types/Log/index.d.ts +0 -10
- package/dist/cjs/types/types/LogAction.d.ts +0 -29
- package/dist/cjs/types/types/LogBuiltInMetadata.d.ts +0 -16
- package/dist/cjs/types/types/LogFunction.d.ts +0 -24
- package/dist/cjs/types/types/LogLevel.d.ts +0 -10
- package/dist/cjs/types/types/LogMetadataContextMap.d.ts +0 -11
- package/dist/cjs/types/types/LogMetadataTagMap.d.ts +0 -8
- package/dist/cjs/types/types/LogMetadataTargetMap.d.ts +0 -8
- package/dist/cjs/types/types/LogMetadataType.d.ts +0 -13
- package/dist/cjs/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
- package/dist/cjs/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
- package/dist/cjs/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
- package/dist/cjs/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
- package/dist/cjs/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
- package/dist/cjs/types/types/LogReviewerFilterState/index.d.ts +0 -17
- package/dist/cjs/types/types/LogSource.d.ts +0 -9
- package/dist/cjs/types/types/LogType.d.ts +0 -9
- package/dist/cjs/types/types/ParamType.d.ts +0 -17
- package/dist/cjs/types/types/ReactKitErrorCode.d.ts +0 -14
- package/dist/esm/types/constants/DAY_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/HOUR_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/esm/types/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +0 -7
- package/dist/esm/types/constants/LOG_ROUTE_PATH.d.ts +0 -6
- package/dist/esm/types/constants/MINUTE_IN_MS.d.ts +0 -6
- package/dist/esm/types/constants/ROUTE_PATH_PREFIX.d.ts +0 -6
- package/dist/esm/types/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +0 -6
- package/dist/esm/types/errors/ErrorWithCode.d.ts +0 -9
- package/dist/esm/types/helpers/abbreviate.d.ts +0 -10
- package/dist/esm/types/helpers/abbreviate.test.d.ts +0 -5
- package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/everyAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/filterAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.d.ts +0 -10
- package/dist/esm/types/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.d.ts +0 -11
- package/dist/esm/types/helpers/asyncArrayFunctions/mapAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.d.ts +0 -13
- package/dist/esm/types/helpers/asyncArrayFunctions/someAsync.test.d.ts +0 -1
- package/dist/esm/types/helpers/avg.d.ts +0 -8
- package/dist/esm/types/helpers/avg.test.d.ts +0 -5
- package/dist/esm/types/helpers/capitalize.d.ts +0 -7
- package/dist/esm/types/helpers/ceilToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/ceilToNumDecimals.test.d.ts +0 -5
- package/dist/esm/types/helpers/cloneDeep.d.ts +0 -8
- package/dist/esm/types/helpers/compareArraysByProp.d.ts +0 -13
- package/dist/esm/types/helpers/compareArraysByProp.test.d.ts +0 -5
- package/dist/esm/types/helpers/extractProp.d.ts +0 -12
- package/dist/esm/types/helpers/extractProp.test.d.ts +0 -5
- package/dist/esm/types/helpers/floorToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/floorToNumDecimals.test.d.ts +0 -5
- package/dist/esm/types/helpers/forceNumIntoBounds.d.ts +0 -10
- package/dist/esm/types/helpers/forceNumIntoBounds.test.d.ts +0 -5
- package/dist/esm/types/helpers/genCSV.d.ts +0 -18
- package/dist/esm/types/helpers/genCSV.test.d.ts +0 -5
- package/dist/esm/types/helpers/genCommaList.d.ts +0 -12
- package/dist/esm/types/helpers/genCommaList.test.d.ts +0 -1
- package/dist/esm/types/helpers/getHumanReadableDate.d.ts +0 -8
- package/dist/esm/types/helpers/getHumanReadableDate.test.d.ts +0 -5
- package/dist/esm/types/helpers/getLocalTimeInfo.d.ts +0 -19
- package/dist/esm/types/helpers/getLocalTimeInfo.test.d.ts +0 -6
- package/dist/esm/types/helpers/getMonthName.d.ts +0 -14
- package/dist/esm/types/helpers/getMonthName.test.d.ts +0 -5
- package/dist/esm/types/helpers/getOrdinal.d.ts +0 -8
- package/dist/esm/types/helpers/getOrdinal.test.d.ts +0 -5
- package/dist/esm/types/helpers/getPartOfDay.d.ts +0 -7
- package/dist/esm/types/helpers/getPartOfDay.test.d.ts +0 -5
- package/dist/esm/types/helpers/getTimeInfoInET.d.ts +0 -21
- package/dist/esm/types/helpers/getTimeInfoInET.test.d.ts +0 -5
- package/dist/esm/types/helpers/getTimestampFromTimeInfoInET.d.ts +0 -20
- package/dist/esm/types/helpers/getWordCount.d.ts +0 -10
- package/dist/esm/types/helpers/idify.d.ts +0 -9
- package/dist/esm/types/helpers/onlyKeepLetters.d.ts +0 -8
- package/dist/esm/types/helpers/padDecimalZeros.d.ts +0 -10
- package/dist/esm/types/helpers/padZerosLeft.d.ts +0 -9
- package/dist/esm/types/helpers/parallelLimit.d.ts +0 -12
- package/dist/esm/types/helpers/prefixWithAOrAn.d.ts +0 -10
- package/dist/esm/types/helpers/roundToNumDecimals.d.ts +0 -9
- package/dist/esm/types/helpers/shuffleArray.d.ts +0 -8
- package/dist/esm/types/helpers/startMinWait.d.ts +0 -9
- package/dist/esm/types/helpers/stringsToHumanReadableList.d.ts +0 -10
- package/dist/esm/types/helpers/sum.d.ts +0 -8
- package/dist/esm/types/helpers/validators/ChicagoTitleCase.d.ts +0 -9
- package/dist/esm/types/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +0 -10
- package/dist/esm/types/helpers/validators/shared/helpers/validateRegex.d.ts +0 -19
- package/dist/esm/types/helpers/validators/shared/types/ValidationResult.d.ts +0 -12
- package/dist/esm/types/helpers/validators/validURL.d.ts +0 -8
- package/dist/esm/types/helpers/validators/validateEmail.d.ts +0 -11
- package/dist/esm/types/helpers/validators/validateEmail.test.d.ts +0 -1
- package/dist/esm/types/helpers/validators/validatePhoneNumber.d.ts +0 -11
- package/dist/esm/types/helpers/validators/validatePhoneNumber.test.d.ts +0 -1
- package/dist/esm/types/helpers/validators/validateString.d.ts +0 -22
- package/dist/esm/types/helpers/validators/validateString.test.d.ts +0 -1
- package/dist/esm/types/helpers/waitMs.d.ts +0 -7
- package/dist/esm/types/types/DayOfWeek.d.ts +0 -14
- package/dist/esm/types/types/Log/LogMainInfo.d.ts +0 -39
- package/dist/esm/types/types/Log/LogSourceSpecificInfo.d.ts +0 -13
- package/dist/esm/types/types/Log/LogTypeSpecificInfo.d.ts +0 -17
- package/dist/esm/types/types/Log/index.d.ts +0 -10
- package/dist/esm/types/types/LogAction.d.ts +0 -29
- package/dist/esm/types/types/LogBuiltInMetadata.d.ts +0 -16
- package/dist/esm/types/types/LogFunction.d.ts +0 -24
- package/dist/esm/types/types/LogLevel.d.ts +0 -10
- package/dist/esm/types/types/LogMetadataContextMap.d.ts +0 -11
- package/dist/esm/types/types/LogMetadataTagMap.d.ts +0 -8
- package/dist/esm/types/types/LogMetadataTargetMap.d.ts +0 -8
- package/dist/esm/types/types/LogMetadataType.d.ts +0 -13
- package/dist/esm/types/types/LogReviewerFilterState/ActionErrorFilterState.d.ts +0 -17
- package/dist/esm/types/types/LogReviewerFilterState/AdvancedFilterState.d.ts +0 -21
- package/dist/esm/types/types/LogReviewerFilterState/ContextFilterState.d.ts +0 -10
- package/dist/esm/types/types/LogReviewerFilterState/DateFilterState.d.ts +0 -17
- package/dist/esm/types/types/LogReviewerFilterState/TagFilterState.d.ts +0 -8
- package/dist/esm/types/types/LogReviewerFilterState/index.d.ts +0 -17
- package/dist/esm/types/types/LogSource.d.ts +0 -9
- package/dist/esm/types/types/LogType.d.ts +0 -9
- package/dist/esm/types/types/ParamType.d.ts +0 -17
- package/dist/esm/types/types/ReactKitErrorCode.d.ts +0 -14
- package/src/constants/DAY_IN_MS.ts +0 -7
- package/src/constants/HOUR_IN_MS.ts +0 -7
- package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +0 -9
- package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +0 -9
- package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +0 -10
- package/src/constants/LOG_ROUTE_PATH.ts +0 -9
- package/src/constants/MINUTE_IN_MS.ts +0 -7
- package/src/constants/ROUTE_PATH_PREFIX.ts +0 -7
- package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +0 -7
- package/src/errors/ErrorWithCode.tsx +0 -15
- package/src/helpers/abbreviate.test.ts +0 -26
- package/src/helpers/abbreviate.ts +0 -25
- package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +0 -114
- package/src/helpers/asyncArrayFunctions/everyAsync.ts +0 -51
- package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +0 -126
- package/src/helpers/asyncArrayFunctions/filterAsync.ts +0 -50
- package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +0 -136
- package/src/helpers/asyncArrayFunctions/forEachAsync.ts +0 -40
- package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +0 -125
- package/src/helpers/asyncArrayFunctions/mapAsync.ts +0 -46
- package/src/helpers/asyncArrayFunctions/someAsync.test.ts +0 -92
- package/src/helpers/asyncArrayFunctions/someAsync.ts +0 -49
- package/src/helpers/avg.test.ts +0 -24
- package/src/helpers/avg.ts +0 -22
- package/src/helpers/capitalize.ts +0 -20
- package/src/helpers/ceilToNumDecimals.test.ts +0 -39
- package/src/helpers/ceilToNumDecimals.ts +0 -13
- package/src/helpers/cloneDeep.ts +0 -11
- package/src/helpers/compareArraysByProp.test.ts +0 -147
- package/src/helpers/compareArraysByProp.ts +0 -56
- package/src/helpers/extractProp.test.ts +0 -34
- package/src/helpers/extractProp.ts +0 -17
- package/src/helpers/floorToNumDecimals.test.ts +0 -39
- package/src/helpers/floorToNumDecimals.ts +0 -13
- package/src/helpers/forceNumIntoBounds.test.ts +0 -34
- package/src/helpers/forceNumIntoBounds.ts +0 -19
- package/src/helpers/genCSV.test.ts +0 -75
- package/src/helpers/genCSV.ts +0 -87
- package/src/helpers/genCommaList.test.ts +0 -57
- package/src/helpers/genCommaList.ts +0 -21
- package/src/helpers/getHumanReadableDate.test.ts +0 -29
- package/src/helpers/getHumanReadableDate.ts +0 -36
- package/src/helpers/getLocalTimeInfo.test.ts +0 -48
- package/src/helpers/getLocalTimeInfo.ts +0 -58
- package/src/helpers/getMonthName.test.ts +0 -79
- package/src/helpers/getMonthName.ts +0 -29
- package/src/helpers/getOrdinal.test.ts +0 -84
- package/src/helpers/getOrdinal.ts +0 -14
- package/src/helpers/getPartOfDay.test.ts +0 -56
- package/src/helpers/getPartOfDay.ts +0 -20
- package/src/helpers/getTimeInfoInET.test.ts +0 -72
- package/src/helpers/getTimeInfoInET.ts +0 -79
- package/src/helpers/getTimestampFromTimeInfoInET.ts +0 -179
- package/src/helpers/getWordCount.ts +0 -26
- package/src/helpers/idify.ts +0 -24
- package/src/helpers/onlyKeepLetters.ts +0 -11
- package/src/helpers/padDecimalZeros.tsx +0 -32
- package/src/helpers/padZerosLeft.tsx +0 -21
- package/src/helpers/parallelLimit.ts +0 -63
- package/src/helpers/prefixWithAOrAn.ts +0 -29
- package/src/helpers/roundToNumDecimals.tsx +0 -13
- package/src/helpers/shuffleArray.ts +0 -19
- package/src/helpers/startMinWait.ts +0 -33
- package/src/helpers/stringsToHumanReadableList.ts +0 -39
- package/src/helpers/sum.tsx +0 -16
- package/src/helpers/validators/ChicagoTitleCase.test.ts +0 -85
- package/src/helpers/validators/ChicagoTitleCase.ts +0 -32
- package/src/helpers/validators/findURL.test.ts +0 -83
- package/src/helpers/validators/findURL.ts +0 -43
- package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +0 -18
- package/src/helpers/validators/shared/helpers/validateRegex.ts +0 -47
- package/src/helpers/validators/shared/types/ValidationResult.ts +0 -20
- package/src/helpers/validators/validURL.test.ts +0 -90
- package/src/helpers/validators/validURL.ts +0 -18
- package/src/helpers/validators/validateEmail.test.ts +0 -110
- package/src/helpers/validators/validateEmail.ts +0 -47
- package/src/helpers/validators/validatePhoneNumber.test.ts +0 -94
- package/src/helpers/validators/validatePhoneNumber.ts +0 -49
- package/src/helpers/validators/validateString.test.ts +0 -173
- package/src/helpers/validators/validateString.ts +0 -171
- package/src/helpers/waitMs.tsx +0 -12
- package/src/types/DayOfWeek.ts +0 -15
- package/src/types/Log/LogMainInfo.ts +0 -69
- package/src/types/Log/LogSourceSpecificInfo.ts +0 -25
- package/src/types/Log/LogTypeSpecificInfo.ts +0 -33
- package/src/types/Log/index.ts +0 -17
- package/src/types/LogAction.ts +0 -52
- package/src/types/LogBuiltInMetadata.ts +0 -19
- package/src/types/LogFunction.ts +0 -46
- package/src/types/LogLevel.ts +0 -11
- package/src/types/LogMetadataContextMap.ts +0 -15
- package/src/types/LogMetadataTagMap.ts +0 -9
- package/src/types/LogMetadataTargetMap.ts +0 -9
- package/src/types/LogMetadataType.ts +0 -16
- package/src/types/LogReviewerFilterState/ActionErrorFilterState.ts +0 -24
- package/src/types/LogReviewerFilterState/AdvancedFilterState.ts +0 -36
- package/src/types/LogReviewerFilterState/ContextFilterState.ts +0 -16
- package/src/types/LogReviewerFilterState/DateFilterState.ts +0 -26
- package/src/types/LogReviewerFilterState/TagFilterState.ts +0 -9
- package/src/types/LogReviewerFilterState/index.ts +0 -24
- package/src/types/LogSource.ts +0 -12
- package/src/types/LogType.ts +0 -12
- package/src/types/ParamType.ts +0 -18
- package/src/types/ReactKitErrorCode.tsx +0 -17
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get current time info in local time
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
* @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
|
|
5
|
-
* @returns object with timestamp (ms since epoch) and numbers
|
|
6
|
-
* corresponding to time values for year, month, day, hour, hour12, minute, isPM
|
|
7
|
-
* where hour is in 24hr time and hour12 is in 12hr time.
|
|
8
|
-
*/
|
|
9
|
-
declare const getLocalTimeInfo: (dateOrTimestamp?: Date | number) => {
|
|
10
|
-
timestamp: number;
|
|
11
|
-
year: number;
|
|
12
|
-
month: number;
|
|
13
|
-
day: number;
|
|
14
|
-
hour: number;
|
|
15
|
-
hour12: number;
|
|
16
|
-
minute: number;
|
|
17
|
-
isPM: boolean;
|
|
18
|
-
};
|
|
19
|
-
export default getLocalTimeInfo;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the name of a month given the month number (1 = January, etc.)
|
|
3
|
-
* If an invalid number is provided, we will treat it like January
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param month the number of the month
|
|
6
|
-
* @returns object containing multiple month name formats:
|
|
7
|
-
* { short, full } where short will look like "Jan" and full will look like
|
|
8
|
-
* "January"
|
|
9
|
-
*/
|
|
10
|
-
declare const getMonthName: (month: number) => {
|
|
11
|
-
short: string;
|
|
12
|
-
full: string;
|
|
13
|
-
};
|
|
14
|
-
export default getMonthName;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get current time info in US Boston Eastern Time, independent of machine
|
|
3
|
-
* timezone
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
|
|
6
|
-
* @returns object with timestamp (ms since epoch) and numbers
|
|
7
|
-
* corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
|
|
8
|
-
* where hour is in 24hr time and hour12 is in 12hr time.
|
|
9
|
-
*/
|
|
10
|
-
declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
|
|
11
|
-
timestamp: number;
|
|
12
|
-
year: number;
|
|
13
|
-
month: number;
|
|
14
|
-
day: number;
|
|
15
|
-
hour: number;
|
|
16
|
-
hour12: number;
|
|
17
|
-
minute: number;
|
|
18
|
-
second: number;
|
|
19
|
-
isPM: boolean;
|
|
20
|
-
};
|
|
21
|
-
export default getTimeInfoInET;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get a timestamp (ms since epoch) from time info (year, month, day, hour, minute, etc.) in Eastern Time (ET)
|
|
3
|
-
* @author Gardenia Liu
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param opts object containing all arguments
|
|
6
|
-
* @param opts.year Year (e.g. 2023)
|
|
7
|
-
* @param opts.month Month (1-12)
|
|
8
|
-
* @param opts.day Day of the month (1-31)
|
|
9
|
-
* @param opts.hour Hour (0-23)
|
|
10
|
-
* @param opts.minute Minute (0-59)
|
|
11
|
-
* @returns Timestamp in milliseconds since epoch
|
|
12
|
-
*/
|
|
13
|
-
declare const getTimestampFromTimeInfoInET: (opts: {
|
|
14
|
-
year: number;
|
|
15
|
-
month: number;
|
|
16
|
-
day: number;
|
|
17
|
-
hour: number;
|
|
18
|
-
minute: number;
|
|
19
|
-
}) => number;
|
|
20
|
-
export default getTimestampFromTimeInfoInET;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get number of words in string
|
|
3
|
-
* @author Gardenia Liu
|
|
4
|
-
* @author Allison Zhang
|
|
5
|
-
* @author Gabe Abrams
|
|
6
|
-
* @param text the string to check
|
|
7
|
-
* @returns number of words in the string
|
|
8
|
-
*/
|
|
9
|
-
declare const getWordCount: (text: string) => number;
|
|
10
|
-
export default getWordCount;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a string to hyphenated lowercase format with no space or
|
|
3
|
-
* non-alphanumeric characters
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param str the string to convert
|
|
6
|
-
* @returns the idified string
|
|
7
|
-
*/
|
|
8
|
-
declare const idify: (str: string) => string;
|
|
9
|
-
export default idify;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pad a number's decimal with zeros on the right
|
|
3
|
-
* (e.g. 5.2 becomes 5.20 with 2 digit padding)
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param num the number to pad
|
|
6
|
-
* @param numDigits the minimum number of digits after the decimal
|
|
7
|
-
* @returns padded number
|
|
8
|
-
*/
|
|
9
|
-
declare const padDecimalZeros: (num: number, numDigits: number) => string;
|
|
10
|
-
export default padDecimalZeros;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pad a number with zeros on the left (e.g. 5 becomes 05 with 2 digit padding)
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
* @param num the number to pad
|
|
5
|
-
* @param numDigits the minimum number of digits before the decimal
|
|
6
|
-
* @returns padded number
|
|
7
|
-
*/
|
|
8
|
-
declare const padZerosLeft: (num: number, numDigits: number) => string;
|
|
9
|
-
export default padZerosLeft;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run tasks in parallel with a limit on how many tasks can execute at once.
|
|
3
|
-
* No guarantees are made about the order of task execution
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param taskFunctions functions that start asynchronous tasks and optionally
|
|
6
|
-
* resolve with values
|
|
7
|
-
* @param [limit=no limit] maximum number of asynchronous tasks to permit to run at
|
|
8
|
-
* once
|
|
9
|
-
* @returns array of resolved values in the same order as the task functions
|
|
10
|
-
*/
|
|
11
|
-
declare const parallelLimit: (taskFunctions: (() => Promise<any>)[], limit?: number) => Promise<any[]>;
|
|
12
|
-
export default parallelLimit;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prefix a word or name with "a" or "an" depending on whether it starts with a
|
|
3
|
-
* vowel or not
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param text the text to prefix
|
|
6
|
-
* @param capitalize whether to capitalize the "A" or "An"
|
|
7
|
-
* @returns the text prefixed with "a" or "an"
|
|
8
|
-
*/
|
|
9
|
-
declare const prefixWithAOrAn: (text: string, capitalize?: boolean) => string;
|
|
10
|
-
export default prefixWithAOrAn;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Round a number to a certain number of decimals
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
* @param num the number to round
|
|
5
|
-
* @param numDecimals the number of decimals to round to
|
|
6
|
-
* @returns rounded number
|
|
7
|
-
*/
|
|
8
|
-
declare const roundToNumDecimals: (num: number, numDecimals: number) => number;
|
|
9
|
-
export default roundToNumDecimals;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Start a dynamic wait, call the function once the operation has completed and
|
|
3
|
-
* the dynamic wait will continue waiting for the rest of the minimum time
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
* @param minWaitMs the minimum number of ms to wait
|
|
6
|
-
* @returns async function to call to finish the wait
|
|
7
|
-
*/
|
|
8
|
-
declare const startMinWait: (minWaitMs: number) => () => Promise<void>;
|
|
9
|
-
export default startMinWait;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a human readable list from an array of strings.
|
|
3
|
-
* For example, ['apple', 'orange'] becomes "apple and orange"
|
|
4
|
-
* and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
|
|
5
|
-
* @author Gabe Abrams
|
|
6
|
-
* @param items list of items in the list
|
|
7
|
-
* @returns human-readable list
|
|
8
|
-
*/
|
|
9
|
-
declare const stringsToHumanReadableList: (items: string[]) => string;
|
|
10
|
-
export default stringsToHumanReadableList;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function converts a string to title case based on Chicago Title Case
|
|
3
|
-
* Style rules.
|
|
4
|
-
* @author Leisha Bhandari
|
|
5
|
-
* @param input: The input string that needs to be converted to Chicago title
|
|
6
|
-
* case.
|
|
7
|
-
* @returns Input string converted to title case
|
|
8
|
-
*/
|
|
9
|
-
declare const chicagoTitleCase: (input: string) => string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const INVALID_REGEX_ERROR = "input does not follow the requested format";
|
|
2
|
-
export declare const INVALID_EMAIL_ERROR = "Please provide a valid email address.";
|
|
3
|
-
export declare const INVALID_PHONE_ERROR = "Please provide a valid phone number.";
|
|
4
|
-
export declare const INVALID_STRING_ERRORS: {
|
|
5
|
-
MIN_LEN: (minLen: number) => string;
|
|
6
|
-
MAX_LEN: (maxLen: number) => string;
|
|
7
|
-
LETTERS_ONLY: string;
|
|
8
|
-
NUMBERS_ONLY: string;
|
|
9
|
-
MESSAGE_INTRO: string;
|
|
10
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import ValidationResult from '../types/ValidationResult';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether a given input string is considered valid based on
|
|
4
|
-
* the provided regex.
|
|
5
|
-
* @author Austen Money
|
|
6
|
-
* @param opts object containing all args
|
|
7
|
-
* @param opts.input user-provided input to validate
|
|
8
|
-
* @param opts.regex regular expression to check against input
|
|
9
|
-
* @param [opts.regexDescription] description of what regexString is checking
|
|
10
|
-
* for, used to customize error message
|
|
11
|
-
* @returns the unchanged input if valid, or a customized error message if
|
|
12
|
-
* invalid
|
|
13
|
-
*/
|
|
14
|
-
declare const validateRegex: (opts: {
|
|
15
|
-
input: string;
|
|
16
|
-
regex: RegExp;
|
|
17
|
-
regexDescription?: string;
|
|
18
|
-
}) => ValidationResult<string>;
|
|
19
|
-
export default validateRegex;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Result of a validation function.
|
|
3
|
-
* @author Austen Money
|
|
4
|
-
*/
|
|
5
|
-
type ValidationResult<CleanedValueType> = ({
|
|
6
|
-
isValid: true;
|
|
7
|
-
cleanedValue: CleanedValueType;
|
|
8
|
-
} | {
|
|
9
|
-
isValid: false;
|
|
10
|
-
errorMessage: string;
|
|
11
|
-
});
|
|
12
|
-
export default ValidationResult;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function checks if a given input string is a valid URL.
|
|
3
|
-
* @author Leisha Bhandari
|
|
4
|
-
* @param URL: The input string that needs checked as a URL or not.
|
|
5
|
-
* @returns A true boolean value if the input string is a valid URL, and a false
|
|
6
|
-
* boolean value if the input string is a invalid URL
|
|
7
|
-
*/
|
|
8
|
-
declare function isValid(url: string): boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ValidationResult from './shared/types/ValidationResult';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether a given email address is valid.
|
|
4
|
-
* @author Austen Money
|
|
5
|
-
* @param email email address to validate
|
|
6
|
-
* @returns whether email fulfills proper formatting requirements, includes a
|
|
7
|
-
* cleaned version of the address without leading or trailing
|
|
8
|
-
* whitespace if valid or an error message if invalid.
|
|
9
|
-
*/
|
|
10
|
-
declare const validateEmail: (email: string) => ValidationResult<string>;
|
|
11
|
-
export default validateEmail;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ValidationResult from './shared/types/ValidationResult';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether a given phone number is valid.
|
|
4
|
-
* @author Austen Money
|
|
5
|
-
* @param phoneNumber phone number to validate
|
|
6
|
-
* @returns whether phone number is considered valid - if valid, also returns
|
|
7
|
-
* a cleaned version of the number without any formatting. If invalid,
|
|
8
|
-
* returns an error message.
|
|
9
|
-
*/
|
|
10
|
-
declare const validatePhoneNumber: (phoneNumber: string) => ValidationResult<string>;
|
|
11
|
-
export default validatePhoneNumber;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import ValidationResult from './shared/types/ValidationResult';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether a given input string is considered valid based on
|
|
4
|
-
* the provided requirements.
|
|
5
|
-
* @author Austen Money
|
|
6
|
-
* @param input input string
|
|
7
|
-
* @param opts options for validation
|
|
8
|
-
* @returns whether input is considered valid according to reqs - if
|
|
9
|
-
* valid, returns a cleaned version of input; if invalid, returns
|
|
10
|
-
* a string containing error messages describing which requirements
|
|
11
|
-
* were not met.
|
|
12
|
-
*/
|
|
13
|
-
declare const validateString: (input: string, opts: {
|
|
14
|
-
ignoreWhitespace?: boolean;
|
|
15
|
-
minLen?: number;
|
|
16
|
-
maxLen?: number;
|
|
17
|
-
lettersOnly?: boolean;
|
|
18
|
-
numbersOnly?: boolean;
|
|
19
|
-
regexTest?: RegExp;
|
|
20
|
-
regexDescription?: string;
|
|
21
|
-
}) => ValidationResult<string>;
|
|
22
|
-
export default validateString;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import LogLevel from '../LogLevel';
|
|
2
|
-
/**
|
|
3
|
-
* Main information in a log event
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
*/
|
|
6
|
-
type LogMainInfo = {
|
|
7
|
-
id: string;
|
|
8
|
-
userFirstName: string;
|
|
9
|
-
userLastName: string;
|
|
10
|
-
userEmail: string;
|
|
11
|
-
userId: number;
|
|
12
|
-
isLearner: boolean;
|
|
13
|
-
isAdmin: boolean;
|
|
14
|
-
isTTM: boolean;
|
|
15
|
-
courseId: number;
|
|
16
|
-
courseName: string;
|
|
17
|
-
browser: {
|
|
18
|
-
name: string;
|
|
19
|
-
version: string;
|
|
20
|
-
};
|
|
21
|
-
device: {
|
|
22
|
-
os: string;
|
|
23
|
-
isMobile: boolean;
|
|
24
|
-
};
|
|
25
|
-
year: number;
|
|
26
|
-
month: number;
|
|
27
|
-
day: number;
|
|
28
|
-
hour: number;
|
|
29
|
-
minute: number;
|
|
30
|
-
timestamp: number;
|
|
31
|
-
context: string;
|
|
32
|
-
subcontext: string;
|
|
33
|
-
tags: string[];
|
|
34
|
-
level: LogLevel;
|
|
35
|
-
metadata?: {
|
|
36
|
-
[k: string]: any;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export default LogMainInfo;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import LogSource from '../LogSource';
|
|
2
|
-
/**
|
|
3
|
-
* Log info that is specific to the type of source
|
|
4
|
-
* @author Gabe Abrams
|
|
5
|
-
*/
|
|
6
|
-
type LogSourceSpecificInfo = ({
|
|
7
|
-
source: LogSource.Client;
|
|
8
|
-
} | {
|
|
9
|
-
source: LogSource.Server;
|
|
10
|
-
routePath: string;
|
|
11
|
-
routeTemplate: string;
|
|
12
|
-
});
|
|
13
|
-
export default LogSourceSpecificInfo;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import LogAction from '../LogAction';
|
|
2
|
-
import LogType from '../LogType';
|
|
3
|
-
/**
|
|
4
|
-
* Log info that is specific to the type of log
|
|
5
|
-
* @author Gabe Abrams
|
|
6
|
-
*/
|
|
7
|
-
type LogTypeSpecificInfo = ({
|
|
8
|
-
type: LogType.Error;
|
|
9
|
-
errorMessage: string;
|
|
10
|
-
errorCode: string;
|
|
11
|
-
errorStack: string;
|
|
12
|
-
} | {
|
|
13
|
-
type: LogType.Action;
|
|
14
|
-
target: string;
|
|
15
|
-
action: LogAction;
|
|
16
|
-
});
|
|
17
|
-
export default LogTypeSpecificInfo;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import LogMainInfo from './LogMainInfo';
|
|
2
|
-
import LogSourceSpecificInfo from './LogSourceSpecificInfo';
|
|
3
|
-
import LogTypeSpecificInfo from './LogTypeSpecificInfo';
|
|
4
|
-
/**
|
|
5
|
-
* A single log event corresponding to an action performed by a user or an
|
|
6
|
-
* error encountered by a user
|
|
7
|
-
* @author Gabe Abrams
|
|
8
|
-
*/
|
|
9
|
-
type Log = (LogMainInfo & LogSourceSpecificInfo & LogTypeSpecificInfo);
|
|
10
|
-
export default Log;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types of actions
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
*/
|
|
5
|
-
declare enum LogAction {
|
|
6
|
-
Open = "Open",
|
|
7
|
-
Close = "Close",
|
|
8
|
-
Cancel = "Cancel",
|
|
9
|
-
Expand = "Expand",
|
|
10
|
-
Collapse = "Collapse",
|
|
11
|
-
View = "View",
|
|
12
|
-
Interrupt = "Interrupt",
|
|
13
|
-
Create = "Create",
|
|
14
|
-
Modify = "Modify",
|
|
15
|
-
Delete = "Delete",
|
|
16
|
-
Add = "Add",
|
|
17
|
-
Remove = "Remove",
|
|
18
|
-
Activate = "Activate",
|
|
19
|
-
Deactivate = "Deactivate",
|
|
20
|
-
Peek = "Peek",
|
|
21
|
-
Halt = "Halt",
|
|
22
|
-
Resume = "Resume",
|
|
23
|
-
Jump = "Jump",
|
|
24
|
-
Post = "Post",
|
|
25
|
-
Like = "Like",
|
|
26
|
-
Dislike = "Dislike",
|
|
27
|
-
Unknown = "Unknown"
|
|
28
|
-
}
|
|
29
|
-
export default LogAction;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in metadata for logs
|
|
3
|
-
* @author Gabe Abrams
|
|
4
|
-
*/
|
|
5
|
-
declare const LogBuiltInMetadata: {
|
|
6
|
-
Context: {
|
|
7
|
-
Uncategorized: string;
|
|
8
|
-
ServerRenderedErrorPage: string;
|
|
9
|
-
ServerEndpointError: string;
|
|
10
|
-
ClientFatalError: string;
|
|
11
|
-
};
|
|
12
|
-
Target: {
|
|
13
|
-
NoTarget: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default LogBuiltInMetadata;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Log from './Log';
|
|
2
|
-
import LogAction from './LogAction';
|
|
3
|
-
import LogLevel from './LogLevel';
|
|
4
|
-
/**
|
|
5
|
-
* Type of a log action function
|
|
6
|
-
* @author Gabe Abrams
|
|
7
|
-
*/
|
|
8
|
-
type LogFunction = (opts: ({
|
|
9
|
-
context: string | {
|
|
10
|
-
_: string;
|
|
11
|
-
};
|
|
12
|
-
subcontext?: string;
|
|
13
|
-
tags?: string[];
|
|
14
|
-
metadata?: {
|
|
15
|
-
[k: string]: any;
|
|
16
|
-
};
|
|
17
|
-
level?: LogLevel;
|
|
18
|
-
} & ({
|
|
19
|
-
error: any;
|
|
20
|
-
} | {
|
|
21
|
-
action: LogAction;
|
|
22
|
-
target?: string;
|
|
23
|
-
}))) => Promise<Log>;
|
|
24
|
-
export default LogFunction;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import LogMetadataContextMap from './LogMetadataContextMap';
|
|
2
|
-
import LogMetadataTagMap from './LogMetadataTagMap';
|
|
3
|
-
import LogMetadataTargetMap from './LogMetadataTargetMap';
|
|
4
|
-
/**
|
|
5
|
-
* Type of a LogMetadata file
|
|
6
|
-
* @author Gabe Abrams
|
|
7
|
-
*/
|
|
8
|
-
type LogMetadataType = {
|
|
9
|
-
Context?: LogMetadataContextMap;
|
|
10
|
-
Tag?: LogMetadataTagMap;
|
|
11
|
-
Target?: LogMetadataTargetMap;
|
|
12
|
-
};
|
|
13
|
-
export default LogMetadataType;
|