dce-reactkit 3.8.5 → 3.8.7
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 +282 -135
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/helpers/visitEndpointOnAnotherServer/index.d.ts +22 -0
- package/dist/cjs/types/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.d.ts +33 -0
- package/dist/cjs/types/index.d.ts +3 -1
- package/dist/cjs/types/types/ReactKitErrorCode.d.ts +4 -1
- package/dist/esm/index.js +281 -136
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/helpers/visitEndpointOnAnotherServer/index.d.ts +22 -0
- package/dist/esm/types/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.d.ts +33 -0
- package/dist/esm/types/index.d.ts +3 -1
- package/dist/esm/types/types/ReactKitErrorCode.d.ts +4 -1
- package/dist/index.d.ts +83 -44
- package/package.json +2 -1
- package/src/helpers/visitEndpointOnAnotherServer/index.ts +90 -0
- package/src/helpers/visitEndpointOnAnotherServer/sendServerToServerRequest.ts +164 -0
- package/src/index.ts +4 -0
- package/src/types/ReactKitErrorCode.tsx +6 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send a server-to-server request from this sever to another server that uses
|
|
3
|
+
* dce-reactkit [for server only]
|
|
4
|
+
* @author Gabe Abrams
|
|
5
|
+
* @param opts object containing all arguments
|
|
6
|
+
* @param opts.path - the path of the other server's endpoint
|
|
7
|
+
* @param [opts.method=GET] - the method of the endpoint
|
|
8
|
+
* @param [opts.params] - query/body parameters to include
|
|
9
|
+
* @param [opts.headers] - headers to include
|
|
10
|
+
* @returns response from server
|
|
11
|
+
*/
|
|
12
|
+
declare const visitEndpointOnAnotherServer: (opts: {
|
|
13
|
+
path: string;
|
|
14
|
+
method?: "GET" | "POST" | "DELETE" | "PUT" | undefined;
|
|
15
|
+
params?: {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
} | undefined;
|
|
18
|
+
headers?: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
} | undefined;
|
|
21
|
+
}) => Promise<any>;
|
|
22
|
+
export default visitEndpointOnAnotherServer;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sends and retries an http request
|
|
3
|
+
* @author Gabriel Abrams
|
|
4
|
+
* @param opts object containing all arguments
|
|
5
|
+
* @param opts.path path to send request to
|
|
6
|
+
* @param [opts.host] host to send request to
|
|
7
|
+
* @param [opts.method=GET] http method to use
|
|
8
|
+
* @param [opts.params] body/data to include in the request
|
|
9
|
+
* @param [opts.headers] headers to include in the request
|
|
10
|
+
* @param [opts.sendCrossDomainCredentials=true if in development mode] if true,
|
|
11
|
+
* send cross-domain credentials even if not in dev mode
|
|
12
|
+
* @param [opts.responseType=JSON] expected response type
|
|
13
|
+
* @returns { body, status, headers } on success
|
|
14
|
+
*/
|
|
15
|
+
declare const sendServerToServerRequest: (opts: {
|
|
16
|
+
path: string;
|
|
17
|
+
host?: string | undefined;
|
|
18
|
+
method?: "GET" | "POST" | "DELETE" | "PUT" | undefined;
|
|
19
|
+
params?: {
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
} | undefined;
|
|
22
|
+
headers?: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
} | undefined;
|
|
25
|
+
responseType?: "Text" | "JSON" | undefined;
|
|
26
|
+
}) => Promise<{
|
|
27
|
+
body: any;
|
|
28
|
+
status: number;
|
|
29
|
+
headers: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
export default sendServerToServerRequest;
|
|
@@ -21,6 +21,7 @@ import Tooltip from './components/Tooltip';
|
|
|
21
21
|
import ToggleSwitch from './components/ToggleSwitch';
|
|
22
22
|
import AutoscrollToBottomContainer from './components/AutoscrollToBottomContainer';
|
|
23
23
|
import MultiSwitch from './components/MultiSwitch';
|
|
24
|
+
import Dropdown from './components/Dropdown';
|
|
24
25
|
import ErrorWithCode from './errors/ErrorWithCode';
|
|
25
26
|
import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
|
|
26
27
|
import HOUR_IN_MS from './constants/HOUR_IN_MS';
|
|
@@ -92,8 +93,9 @@ import LogBuiltInMetadata from './types/LogBuiltInMetadata';
|
|
|
92
93
|
import LogMetadataType from './types/LogMetadataType';
|
|
93
94
|
import LogFunction from './types/LogFunction';
|
|
94
95
|
import IntelliTableColumn from './types/IntelliTableColumn';
|
|
96
|
+
import DropdownItemType from './types/DropdownItemType';
|
|
95
97
|
import PickableItem from './components/ItemPicker/types/PickableItem';
|
|
96
98
|
import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
|
|
97
99
|
import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
|
|
98
100
|
import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
|
|
99
|
-
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, idify, makeLinksClickable, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
|
|
101
|
+
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, Dropdown, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, idify, makeLinksClickable, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, IntelliTableColumn, DropdownItemType, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
|
|
@@ -15,6 +15,9 @@ declare enum ReactKitErrorCode {
|
|
|
15
15
|
NotAdmin = "DRK10",
|
|
16
16
|
NotAllowedToReviewLogs = "DRK11",
|
|
17
17
|
ThemeCheckedBeforeReactKitReady = "DRK12",
|
|
18
|
-
SessionExpiredMessageGottenBeforeReactKitReady = "DRK13"
|
|
18
|
+
SessionExpiredMessageGottenBeforeReactKitReady = "DRK13",
|
|
19
|
+
NotConnected = "DRK14",
|
|
20
|
+
SelfSigned = "DRK15",
|
|
21
|
+
ResponseParseError = "DRK16"
|
|
19
22
|
}
|
|
20
23
|
export default ReactKitErrorCode;
|