studiokit-scaffolding-js 5.2.0-next.1.2 → 5.2.0-next.2.2
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/lib/components/Dropdowns/GroupsDropdown.d.ts +1 -1
- package/lib/components/Dropdowns/GroupsDropdown.js +1 -2
- package/lib/components/Dropdowns/UserDropdown.js +1 -1
- package/lib/components/Groups/ExternalGroups/Attach.js +3 -3
- package/lib/components/HOC/CollectionComponent.d.ts +2 -2
- package/lib/components/HOC/CollectionComponent.js +1 -2
- package/lib/components/HOC/CollectionFirstItemComponent.js +1 -1
- package/lib/components/HOC/CollectionItemComponent.d.ts +1 -1
- package/lib/components/HOC/CollectionItemComponent.js +1 -2
- package/lib/components/HOC/ConnectedModalComponent.js +7 -2
- package/lib/components/HOC/ModelErrorRedirectComponent.js +2 -2
- package/lib/components/HOC/SearchPersistorComponent.js +1 -1
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +1 -1
- package/lib/components/Notifications.js +2 -1
- package/lib/components/UserRoles/index.d.ts +3 -3
- package/lib/components/UserRoles/index.js +16 -8
- package/lib/endpointMappings.d.ts +0 -1
- package/lib/endpointMappings.js +6 -8
- package/lib/hooks/useCollection.js +1 -4
- package/lib/hooks/useCollectionConfiguration.d.ts +4 -5
- package/lib/hooks/useCollectionItem.js +1 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -1
- package/lib/redux/actionCreator.d.ts +8 -2
- package/lib/redux/actionCreator.js +45 -7
- package/lib/redux/actions/AuthAction.d.ts +54 -0
- package/lib/redux/actions/AuthAction.js +32 -0
- package/lib/redux/actions/ModalAction.d.ts +16 -0
- package/lib/redux/actions/ModalAction.js +8 -0
- package/lib/redux/actions/ModelAction.d.ts +117 -0
- package/lib/redux/actions/ModelAction.js +62 -0
- package/lib/redux/actions/NotificationAction.d.ts +9 -0
- package/lib/redux/actions/NotificationAction.js +8 -0
- package/lib/redux/actions/SearchAction.d.ts +8 -0
- package/lib/redux/actions/SearchAction.js +7 -0
- package/lib/redux/actions/index.d.ts +5 -0
- package/lib/redux/actions/index.js +17 -0
- package/lib/redux/configureReducers.d.ts +3 -2
- package/lib/redux/configureReducers.js +3 -3
- package/lib/redux/configureStore.js +13 -10
- package/lib/redux/helpers.js +1 -3
- package/lib/redux/reducers/authReducer.d.ts +6 -2
- package/lib/redux/reducers/authReducer.js +10 -7
- package/lib/redux/reducers/index.d.ts +2 -2
- package/lib/redux/reducers/index.js +3 -3
- package/lib/redux/reducers/modalsReducer.d.ts +1 -4
- package/lib/redux/reducers/modalsReducer.js +3 -3
- package/lib/redux/reducers/{fetchReducer.d.ts → modelsReducer.d.ts} +11 -5
- package/lib/redux/reducers/{fetchReducer.js → modelsReducer.js} +19 -17
- package/lib/redux/reducers/notificationsReducer.d.ts +2 -5
- package/lib/redux/reducers/notificationsReducer.js +6 -9
- package/lib/redux/reducers/searchReducer.d.ts +1 -4
- package/lib/redux/reducers/searchReducer.js +2 -2
- package/lib/redux/sagas/appInsightsSaga.js +3 -3
- package/lib/redux/sagas/authSaga.d.ts +13 -15
- package/lib/redux/sagas/authSaga.js +114 -115
- package/lib/redux/sagas/caliperSaga.js +9 -8
- package/lib/redux/sagas/clockOffsetSaga.js +1 -1
- package/lib/redux/sagas/configurationSaga.js +1 -1
- package/lib/redux/sagas/downtimeApiErrorSaga.js +5 -5
- package/lib/redux/sagas/googleAnalyticsSaga.js +4 -3
- package/lib/redux/sagas/identityProviderSaga.js +10 -8
- package/lib/redux/sagas/initialDataLoadSaga.js +5 -6
- package/lib/redux/sagas/lockDownBrowserErrorSaga.js +4 -2
- package/lib/redux/sagas/modelFetchSaga.d.ts +65 -0
- package/lib/redux/sagas/modelFetchSaga.js +489 -0
- package/lib/redux/sagas/noStoreSaga.d.ts +8 -7
- package/lib/redux/sagas/noStoreSaga.js +26 -30
- package/lib/redux/sagas/postLoginDataSaga.js +12 -11
- package/lib/redux/sagas/postLoginRedirectSaga.js +2 -2
- package/lib/redux/sagas/rootSaga.js +10 -16
- package/lib/redux/sagas/sentrySaga.js +19 -32
- package/lib/redux/sagas/userIdSaga.js +3 -3
- package/lib/services/fetchService.js +18 -14
- package/lib/setupTests.js +16 -0
- package/lib/startup.js +4 -3
- package/lib/types/Collection.d.ts +21 -21
- package/lib/types/auth/CasV1LoginRequestBody.d.ts +4 -0
- package/lib/types/auth/LocalLoginRequestBody.d.ts +5 -0
- package/lib/types/auth/TokenPersistenceService.d.ts +3 -3
- package/lib/types/auth/index.d.ts +2 -2
- package/lib/types/auth/index.js +2 -2
- package/lib/types/net/ErrorHandler.d.ts +3 -1
- package/lib/types/net/FetchConfig.d.ts +1 -2
- package/lib/types/net/FetchErrorData.d.ts +13 -0
- package/lib/types/net/FetchErrorData.js +15 -0
- package/lib/types/net/HTTPStatusCode.d.ts +7 -0
- package/lib/types/net/HTTPStatusCode.js +11 -0
- package/lib/types/net/Metadata.d.ts +2 -1
- package/lib/types/net/Metadata.js +0 -3
- package/lib/types/net/OAuthToken.js +0 -3
- package/lib/types/net/OAuthTokenOrNull.d.ts +2 -0
- package/lib/types/net/TokenAccessFunction.d.ts +2 -2
- package/lib/types/net/index.d.ts +3 -4
- package/lib/types/net/index.js +3 -4
- package/lib/utils/collection.d.ts +3 -4
- package/lib/utils/collection.js +17 -15
- package/lib/utils/model.d.ts +2 -2
- package/lib/utils/modelFetch.d.ts +22 -0
- package/lib/utils/modelFetch.js +175 -0
- package/lib/utils/quill.js +2 -5
- package/lib/utils/user.js +11 -11
- package/package.json +3 -3
- package/lib/redux/actions.d.ts +0 -39
- package/lib/redux/actions.js +0 -65
- package/lib/redux/sagas/fetchSaga.d.ts +0 -97
- package/lib/redux/sagas/fetchSaga.js +0 -661
- package/lib/types/auth/AuthAction.d.ts +0 -6
- package/lib/types/auth/Credentials.d.ts +0 -4
- package/lib/types/net/FetchAction.d.ts +0 -41
- package/lib/types/net/FetchError.d.ts +0 -7
- package/lib/types/net/FetchError.js +0 -5
- package/lib/types/net/LoggerFunction.d.ts +0 -1
- package/lib/types/net/LoggerFunction.js +0 -2
- package/lib/types/net/OAuthTokenResponse.d.ts +0 -2
- package/lib/types/net/OAuthTokenResponse.js +0 -2
- /package/lib/types/auth/{AuthAction.js → CasV1LoginRequestBody.js} +0 -0
- /package/lib/types/auth/{Credentials.js → LocalLoginRequestBody.js} +0 -0
- /package/lib/types/net/{FetchAction.js → OAuthTokenOrNull.js} +0 -0
|
@@ -13,5 +13,5 @@ declare class GroupsDropdown extends Component<Props> {
|
|
|
13
13
|
renderGroupMenu: (groups: Group[]) => JSX.Element[] | null;
|
|
14
14
|
render(): JSX.Element | null;
|
|
15
15
|
}
|
|
16
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof GroupsDropdown, Pick<React.ClassAttributes<GroupsDropdown> & Props, "
|
|
16
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof GroupsDropdown, Pick<React.ClassAttributes<GroupsDropdown> & Props, "title" | "ref" | "id" | "key" | "anyRoleButLearner">>;
|
|
17
17
|
export default _default;
|
|
@@ -37,7 +37,6 @@ var react_bootstrap_1 = require("react-bootstrap");
|
|
|
37
37
|
var react_redux_1 = require("react-redux");
|
|
38
38
|
var react_router_bootstrap_1 = require("react-router-bootstrap");
|
|
39
39
|
var actionCreator_1 = require("../../redux/actionCreator");
|
|
40
|
-
var actions_1 = require("../../redux/actions");
|
|
41
40
|
var date_1 = require("../../utils/date");
|
|
42
41
|
var groupDates_1 = require("../../utils/groupDates");
|
|
43
42
|
var groupRoles_1 = require("../../utils/groupRoles");
|
|
@@ -48,7 +47,7 @@ var GroupsDropdown = /** @class */ (function (_super) {
|
|
|
48
47
|
function GroupsDropdown() {
|
|
49
48
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
49
|
_this.loadGroups = function () {
|
|
51
|
-
actionCreator_1.
|
|
50
|
+
actionCreator_1.dispatchModelFetchRequest({ modelName: 'groups' });
|
|
52
51
|
};
|
|
53
52
|
_this.didToggle = function (isOpen) {
|
|
54
53
|
if (isOpen) {
|
|
@@ -56,7 +56,7 @@ var IconStopImpersonating_1 = require("../Icons/IconStopImpersonating");
|
|
|
56
56
|
var UserDetail_1 = require("../Impersonation/UserDetail");
|
|
57
57
|
var ManagedNavDropdown_1 = require("./ManagedNavDropdown");
|
|
58
58
|
var doLogOut = function () {
|
|
59
|
-
actionCreator_1.dispatchAction(actions_1.
|
|
59
|
+
actionCreator_1.dispatchAction({ type: actions_1.AUTH_ACTION_TYPE.LOG_OUT_REQUESTED });
|
|
60
60
|
};
|
|
61
61
|
var UserDropdown = function (_a) {
|
|
62
62
|
var userInfo = _a.userInfo, children = _a.children, props = __rest(_a, ["userInfo", "children"]);
|
|
@@ -24,8 +24,8 @@ var react_bootstrap_1 = require("react-bootstrap");
|
|
|
24
24
|
var uuid_1 = require("uuid");
|
|
25
25
|
var constants_1 = require("../../../constants");
|
|
26
26
|
var actionCreator_1 = require("../../../redux/actionCreator");
|
|
27
|
-
var actions_1 = require("../../../redux/actions");
|
|
28
27
|
var noStoreSaga_1 = require("../../../redux/sagas/noStoreSaga");
|
|
28
|
+
var types_1 = require("../../../types");
|
|
29
29
|
var model_1 = require("../../../utils/model");
|
|
30
30
|
var shard_1 = require("../../../utils/shard");
|
|
31
31
|
var user_1 = require("../../../utils/user");
|
|
@@ -89,14 +89,14 @@ var ExternalGroupsAttach = /** @class */ (function (_super) {
|
|
|
89
89
|
if (shard_1.isPurdueShard() && ownerSchedule.status === constants_1.MODEL_STATUS.UNINITIALIZED && !ownerSchedule.externalGroups) {
|
|
90
90
|
noStoreSaga_1.registerNoStoreActionHook(ownerSchedule.hookId, function (data) {
|
|
91
91
|
noStoreSaga_1.unregisterNoStoreActionHook(ownerSchedule.hookId);
|
|
92
|
-
if (data
|
|
92
|
+
if (!data || types_1.isFetchErrorData(data)) {
|
|
93
93
|
_this.setState({ isShowingErrorAlert: true, isUniTimeScheduleLoadingDone: true });
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
_this.setUserUniTimeGroups(userId, data.externalGroups);
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
actionCreator_1.
|
|
99
|
+
actionCreator_1.dispatchModelFetchRequest({
|
|
100
100
|
modelName: 'uniTimeInstructorSchedule',
|
|
101
101
|
queryParams: {
|
|
102
102
|
externalTermId: externalTermId,
|
|
@@ -15,7 +15,7 @@ export declare function configureCollectionComponent<TModel extends Model, TOwnP
|
|
|
15
15
|
componentDidMount(): void;
|
|
16
16
|
componentDidUpdate(prevProps: TOwnProps & CollectionComponentProps<TModel>): void;
|
|
17
17
|
componentWillUnmount(): void;
|
|
18
|
-
changeModelStatus: (newModelStatus: MODEL_STATUS, fetchingId?: string | undefined) => void;
|
|
18
|
+
changeModelStatus: (newModelStatus: MODEL_STATUS, fetchingId?: string | number | undefined) => void;
|
|
19
19
|
getCollectionMethodConfig: () => CollectionMethodConfiguration;
|
|
20
20
|
load: (params?: CollectionLoadParams) => void;
|
|
21
21
|
stopPeriodicLoad: (taskId: string) => void;
|
|
@@ -46,7 +46,7 @@ export declare function configureCollectionComponent<TModel extends Model, TOwnP
|
|
|
46
46
|
};
|
|
47
47
|
contextType?: React.Context<any> | undefined;
|
|
48
48
|
};
|
|
49
|
-
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionComponentProps<TModel>, "
|
|
49
|
+
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionComponentProps<TModel>, "guid" | "match" | "modelName" | "pathParams" | "queryParams" | "location" | "history" | "staticContext" | "disableAutoLoad" | "disableAutoLoadOnParamsChange">>(modelName: string) => (state: BaseReduxState, ownProps: TOwnProps & Partial<CollectionComponentProps<TModel>>) => import("../../types").CollectionSelectorMethodResponse<Model>;
|
|
50
50
|
/**
|
|
51
51
|
* HOC that provides "collection" related functionality, using redux `connect()`, react-router-dom `withRouter()`, and `GuidComponent`.
|
|
52
52
|
*
|
|
@@ -99,8 +99,7 @@ function configureCollectionComponent(WrappedComponent, LoaderComponent) {
|
|
|
99
99
|
collection_1.loadCollection(_this.getCollectionMethodConfig(), params);
|
|
100
100
|
};
|
|
101
101
|
_this.stopPeriodicLoad = function (taskId) {
|
|
102
|
-
|
|
103
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
102
|
+
collection_1.stopCollectionPeriodicLoad(taskId);
|
|
104
103
|
};
|
|
105
104
|
_this.create = function (params) {
|
|
106
105
|
collection_1.createItemInCollection(_this.getCollectionMethodConfig(), params);
|
|
@@ -86,7 +86,7 @@ function configureCollectionFirstItemComponent(WrappedComponent) {
|
|
|
86
86
|
var modelMinusRelations = this.getModelMinusRelations(firstItem);
|
|
87
87
|
var p = __spreadArrays(pathParams);
|
|
88
88
|
if (firstItem.id) {
|
|
89
|
-
p.push(firstItem.id
|
|
89
|
+
p.push(firstItem.id);
|
|
90
90
|
}
|
|
91
91
|
return (react_1.default.createElement(WrappedComponent, __assign({}, this.props, { pathParams: p, model: firstItem, modelMinusRelations: modelMinusRelations })));
|
|
92
92
|
};
|
|
@@ -45,7 +45,7 @@ export declare function configureCollectionItemComponent<TModel extends Model, T
|
|
|
45
45
|
};
|
|
46
46
|
contextType?: React.Context<any> | undefined;
|
|
47
47
|
};
|
|
48
|
-
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionItemComponentProps<TModel>, "
|
|
48
|
+
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionItemComponentProps<TModel>, "guid" | "match" | "modelName" | "pathParams" | "queryParams" | "location" | "history" | "staticContext" | "disableAutoLoad" | "disableAutoLoadOnParamsChange">>(modelName: string) => (state: BaseReduxState, ownProps: TOwnProps) => import("../../types").CollectionSelectorMethodResponse<Model>;
|
|
49
49
|
/**
|
|
50
50
|
* HOC that provides "collection" related functionality for a single item in a collection, using redux `connect()`, react-router-dom `withRouter()`, and `GuidComponent`.
|
|
51
51
|
*
|
|
@@ -98,8 +98,7 @@ function configureCollectionItemComponent(WrappedComponent, LoaderComponent) {
|
|
|
98
98
|
collection_1.loadCollectionItem(_this.getCollectionMethodConfig(), params);
|
|
99
99
|
};
|
|
100
100
|
_this.stopPeriodicLoad = function (taskId) {
|
|
101
|
-
|
|
102
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
101
|
+
collection_1.stopCollectionPeriodicLoad(taskId);
|
|
103
102
|
};
|
|
104
103
|
_this.create = function (params) {
|
|
105
104
|
var model = _this.props.model;
|
|
@@ -89,7 +89,12 @@ function configureConnectedModalComponent(WrappedComponent, isFullscreen) {
|
|
|
89
89
|
var _b = _this.props, guid = _b.guid, modals = _b.modals;
|
|
90
90
|
// Store each modal's GUID in redux with a zero-based index to determine the order in which they were opened
|
|
91
91
|
var maxModal = lodash_1.maxBy(Object.values(modals), function (modal) { return modal.index; });
|
|
92
|
-
actionCreator_1.dispatchAction(
|
|
92
|
+
actionCreator_1.dispatchAction({
|
|
93
|
+
type: actions_1.MODAL_ACTION_TYPE.MODAL_ENTERING,
|
|
94
|
+
guid: guid,
|
|
95
|
+
index: ((_a = maxModal === null || maxModal === void 0 ? void 0 : maxModal.index) !== null && _a !== void 0 ? _a : -1) + 1,
|
|
96
|
+
isFullscreen: isFullscreen
|
|
97
|
+
});
|
|
93
98
|
_this.setState({
|
|
94
99
|
isModalOpen: true
|
|
95
100
|
});
|
|
@@ -98,7 +103,7 @@ function configureConnectedModalComponent(WrappedComponent, isFullscreen) {
|
|
|
98
103
|
var guid = _this.props.guid;
|
|
99
104
|
var isModalOpen = _this.state.isModalOpen;
|
|
100
105
|
if (isModalOpen) {
|
|
101
|
-
actionCreator_1.dispatchAction(actions_1.
|
|
106
|
+
actionCreator_1.dispatchAction({ type: actions_1.MODAL_ACTION_TYPE.MODAL_EXITED, guid: guid });
|
|
102
107
|
}
|
|
103
108
|
_this.setState({
|
|
104
109
|
isModalOpen: false
|
|
@@ -71,13 +71,13 @@ function modelErrorRedirectComponent(WrappedComponent) {
|
|
|
71
71
|
model._metadata &&
|
|
72
72
|
model._metadata.hasError &&
|
|
73
73
|
model._metadata.lastFetchErrorData &&
|
|
74
|
-
model._metadata.lastFetchErrorData.
|
|
74
|
+
model._metadata.lastFetchErrorData.status === 404;
|
|
75
75
|
var errorRoute = previousModelStatus === modelStatus_1.MODEL_STATUS.UNINITIALIZED &&
|
|
76
76
|
modelStatus === modelStatus_1.MODEL_STATUS.ERROR &&
|
|
77
77
|
model._metadata &&
|
|
78
78
|
model._metadata.hasError &&
|
|
79
79
|
model._metadata.lastFetchErrorData &&
|
|
80
|
-
model._metadata.lastFetchErrorData.
|
|
80
|
+
model._metadata.lastFetchErrorData.status === 500;
|
|
81
81
|
if (notFoundRoute) {
|
|
82
82
|
var pathname = window.location.pathname;
|
|
83
83
|
return (react_1.default.createElement(react_router_dom_1.Redirect, { to: {
|
|
@@ -200,7 +200,7 @@ var configureMapDispatchToProps = function (key) { return function (dispatch) {
|
|
|
200
200
|
var dispatchPersistSearch = function (search) {
|
|
201
201
|
var _a;
|
|
202
202
|
dispatch({
|
|
203
|
-
type: actions_1.
|
|
203
|
+
type: actions_1.SEARCH_ACTION_TYPE.PERSIST_SEARCH,
|
|
204
204
|
data: (_a = {},
|
|
205
205
|
_a["" + key] = search,
|
|
206
206
|
_a)
|
|
@@ -9,5 +9,5 @@ export interface CreateNonLtiGroupAlertDialogProps extends Omit<AlertDialogProps
|
|
|
9
9
|
}
|
|
10
10
|
export declare const CreateNonLtiGroupAlertDialog: FunctionComponent<CreateNonLtiGroupAlertDialogProps>;
|
|
11
11
|
export declare const mapStateToProps: (state: BaseReduxState) => CreateNonLtiGroupAlertDialogReduxProps;
|
|
12
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<CreateNonLtiGroupAlertDialogProps, "
|
|
12
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<CreateNonLtiGroupAlertDialogProps, "description" | "id" | "isOpen" | "onProceed" | "proceedText" | "onCancel" | "cancelText" | "hideCancel" | "onDestroy" | "destroyText" | "manualBackground" | "externalHelpResourcePageUrl">>;
|
|
13
13
|
export default _default;
|
|
@@ -112,7 +112,8 @@ var Notifications = /** @class */ (function (_super) {
|
|
|
112
112
|
if (!notification) {
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
actionCreator_1.dispatchAction(
|
|
115
|
+
actionCreator_1.dispatchAction({
|
|
116
|
+
type: actions_1.NOTIFICATION_ACTION_TYPE.REMOVE_NOTIFICATION,
|
|
116
117
|
notification: notification
|
|
117
118
|
});
|
|
118
119
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { BaseReduxState, ExternalProvider,
|
|
2
|
+
import { BaseReduxState, ExternalProvider, FetchErrorData, Model, ModelCollection, RoleDescriptions, UserRole, UserWithRoles } from '../../types';
|
|
3
3
|
import { CollectionComponentWrappedProps } from '../HOC/CollectionComponent';
|
|
4
4
|
export interface UserRolesReduxProps {
|
|
5
5
|
/** Is the current user allowed to add, update, and delete user roles? */
|
|
@@ -96,7 +96,7 @@ export declare class UserRoles extends Component<UserRolesProps, UserRolesState>
|
|
|
96
96
|
textForRole: (role: string, lowercase?: boolean) => string;
|
|
97
97
|
singularArticleForRole: (role: string) => string;
|
|
98
98
|
addUserRoles: (identifiers: string[], role: string) => void;
|
|
99
|
-
didAdd: (data?:
|
|
99
|
+
didAdd: (data?: FetchErrorData | AddBusinessModel | undefined) => void;
|
|
100
100
|
updateUserRole: (userRoleToUpdate: UserRole, newRole: string) => void;
|
|
101
101
|
didUpdate: (isSuccess: boolean) => void;
|
|
102
102
|
alertRemoveUserRole: (userRoleToRemove: UserRole) => void;
|
|
@@ -107,5 +107,5 @@ export declare class UserRoles extends Component<UserRolesProps, UserRolesState>
|
|
|
107
107
|
render(): JSX.Element;
|
|
108
108
|
}
|
|
109
109
|
export declare const mapStateToProps: (state: BaseReduxState, ownProps: UserRolesOwnProps) => UserRolesReduxProps;
|
|
110
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof UserRoles, Pick<React.ClassAttributes<UserRoles> & UserRolesProps, "
|
|
110
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof UserRoles, Pick<React.ClassAttributes<UserRoles> & UserRolesProps, "guid" | "ref" | "modelName" | "pathParams" | "queryParams" | "externalProviders" | "model" | "key" | "readOnly" | "entityName" | "load" | "modelStatus" | "disableAutoLoad" | "disableAutoLoadOnParamsChange" | "modelArray" | "stopPeriodicLoad" | "create" | "update" | "delete" | "previousModelStatus" | "fetchingId" | "textForRole" | "defaultRole" | "roleDescriptions" | "renderAddDescription" | "isUpdateDisabled" | "isDeleteDisabled" | "allowMultipleRoles" | "requiredRole" | "isAddDisabled" | "modifyUserRoleActivityName" | "deleteOwnUserRoleActivityName" | "addRoleExcludeList" | "entity" | "filterUsers" | "onAdd" | "onUpdate" | "onRemove" | "renderTableDescription" | "lowercaseTextForRole" | "singularArticleForRole"> & UserRolesOwnProps>;
|
|
111
111
|
export default _default;
|
|
@@ -42,16 +42,18 @@ var AlertDialog_1 = require("../../components/AlertDialog");
|
|
|
42
42
|
var Loading_1 = require("../../components/Loading");
|
|
43
43
|
var Add_1 = require("../../components/UserRoles/Add");
|
|
44
44
|
var Table_1 = require("../../components/UserRoles/Table");
|
|
45
|
+
var constants_1 = require("../../constants");
|
|
45
46
|
var baseRole_1 = require("../../constants/baseRole");
|
|
46
47
|
var modelStatus_1 = require("../../constants/modelStatus");
|
|
47
48
|
var actionCreator_1 = require("../../redux/actionCreator");
|
|
48
49
|
var actions_1 = require("../../redux/actions");
|
|
49
|
-
var fetchSaga_1 = require("../../redux/sagas/fetchSaga");
|
|
50
50
|
var noStoreSaga_1 = require("../../redux/sagas/noStoreSaga");
|
|
51
|
+
var types_1 = require("../../types");
|
|
51
52
|
var baseActivity_1 = require("../../utils/baseActivity");
|
|
52
53
|
var baseRole_2 = require("../../utils/baseRole");
|
|
53
54
|
var domainIdentifier_1 = require("../../utils/domainIdentifier");
|
|
54
55
|
var entityUserRole_1 = require("../../utils/entityUserRole");
|
|
56
|
+
var modelFetch_1 = require("../../utils/modelFetch");
|
|
55
57
|
var sort_1 = require("../../utils/sort");
|
|
56
58
|
var user_1 = require("../../utils/user");
|
|
57
59
|
var userRole_1 = require("../../utils/userRole");
|
|
@@ -126,7 +128,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
126
128
|
_this.didAdd(data);
|
|
127
129
|
});
|
|
128
130
|
var rootModelName = entityUserRole_1.getRootModelName(_this.props);
|
|
129
|
-
actionCreator_1.
|
|
131
|
+
actionCreator_1.dispatchModelFetchRequest({
|
|
130
132
|
modelName: (rootModelName ? rootModelName + "." : '') + "addUserRoles",
|
|
131
133
|
pathParams: entity ? [entity.id] : undefined,
|
|
132
134
|
body: {
|
|
@@ -144,7 +146,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
144
146
|
if (!roleForAdd || !identifiersToAdd || identifiersToAdd.length === 0) {
|
|
145
147
|
throw new Error('didAdd was called in the incorrect state');
|
|
146
148
|
}
|
|
147
|
-
if (!data || data
|
|
149
|
+
if (!data || types_1.isFetchErrorData(data)) {
|
|
148
150
|
var failMessage_1 = "The following identifiers were not added" + (entityName ? " to your " + entityName : '') + ":\r\n" + identifiersToAdd.join('\r\n');
|
|
149
151
|
_this.setState({
|
|
150
152
|
shouldResetAddForm: true,
|
|
@@ -155,7 +157,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
155
157
|
});
|
|
156
158
|
return;
|
|
157
159
|
}
|
|
158
|
-
var
|
|
160
|
+
var addedUserRoles = data.addedUserRoles, existingUserRoles = data.existingUserRoles, blockedUserRoles = data.blockedUserRoles, invalidIdentifiers = data.invalidIdentifiers, allowedDomains = data.allowedDomains, invalidDomainIdentifiers = data.invalidDomainIdentifiers;
|
|
159
161
|
var roleString = _this.textForRole(roleForAdd, true);
|
|
160
162
|
var singularArticleString = _this.singularArticleForRole(roleForAdd);
|
|
161
163
|
var addedNames = !!addedUserRoles && addedUserRoles.length > 0
|
|
@@ -207,9 +209,15 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
207
209
|
// update redux with added userRoles
|
|
208
210
|
var updatedModel_1 = lodash_1.cloneDeep(model);
|
|
209
211
|
addedUserRoles.forEach(function (userRole) { return (updatedModel_1[userRole.id] = lodash_1.cloneDeep(userRole)); });
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
// create a dummy action and call `prepareFetch` to get the final `modelPath`
|
|
213
|
+
var modelPath = modelFetch_1.prepareFetch({
|
|
214
|
+
type: actions_1.MODEL_FETCH_REQUEST_TYPE.FETCH_REQUEST,
|
|
215
|
+
modelName: modelName,
|
|
216
|
+
pathParams: pathParams
|
|
217
|
+
}, constants_1.getEndpointMappings()).modelPath;
|
|
218
|
+
actionCreator_1.dispatchAction({
|
|
219
|
+
type: actions_1.MODEL_FETCH_RESULT_TYPE.FETCH_RESULT_RECEIVED,
|
|
220
|
+
modelPath: modelPath,
|
|
213
221
|
data: updatedModel_1
|
|
214
222
|
});
|
|
215
223
|
if (onAdd) {
|
|
@@ -228,7 +236,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
228
236
|
failMessage: undefined
|
|
229
237
|
});
|
|
230
238
|
_this.props.update({
|
|
231
|
-
id: userRoleToUpdate.id
|
|
239
|
+
id: userRoleToUpdate.id,
|
|
232
240
|
body: {},
|
|
233
241
|
queryParams: {
|
|
234
242
|
roleName: newRole
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EndpointMapping, EndpointMappings } from './types';
|
|
2
2
|
export declare const entityUserRoleEndpointMappings: (endpointName: string) => EndpointMappings;
|
|
3
3
|
export declare const groupEndpointMapping: EndpointMapping;
|
|
4
|
-
export declare const authEndpointMappings: EndpointMappings;
|
|
5
4
|
export declare const endpointMappings: EndpointMappings;
|
package/lib/endpointMappings.js
CHANGED
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.endpointMappings = exports.
|
|
14
|
+
exports.endpointMappings = exports.groupEndpointMapping = exports.entityUserRoleEndpointMappings = void 0;
|
|
15
15
|
var entityUserRoleEndpointMappings = function (endpointName) {
|
|
16
16
|
var _a;
|
|
17
17
|
return _a = {},
|
|
@@ -47,7 +47,7 @@ exports.groupEndpointMapping = __assign({ _config: {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
} }, exports.entityUserRoleEndpointMappings('groupUserRoles'));
|
|
50
|
-
exports.
|
|
50
|
+
exports.endpointMappings = {
|
|
51
51
|
codeFromLocalCredentials: {
|
|
52
52
|
_config: {
|
|
53
53
|
fetch: {
|
|
@@ -59,13 +59,13 @@ exports.authEndpointMappings = {
|
|
|
59
59
|
codeFromCasV1: {
|
|
60
60
|
_config: {
|
|
61
61
|
fetch: {
|
|
62
|
-
path: '/api/account/
|
|
62
|
+
path: '/api/account/casV1',
|
|
63
63
|
method: 'POST'
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
codeFromCasTicket: {
|
|
68
|
-
_config: { fetch: { path: '/api/
|
|
68
|
+
_config: { fetch: { path: '/api/account/validateCasTicket' } }
|
|
69
69
|
},
|
|
70
70
|
getToken: {
|
|
71
71
|
_config: {
|
|
@@ -80,11 +80,9 @@ exports.authEndpointMappings = {
|
|
|
80
80
|
},
|
|
81
81
|
user: {
|
|
82
82
|
userInfo: {
|
|
83
|
-
_config: { fetch: { path: '/api/
|
|
83
|
+
_config: { fetch: { path: '/api/account/userInfo' } }
|
|
84
84
|
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
exports.endpointMappings = {
|
|
85
|
+
},
|
|
88
86
|
urlChecker: {
|
|
89
87
|
_config: {
|
|
90
88
|
fetch: {
|
|
@@ -14,9 +14,6 @@ function useCollection(props) {
|
|
|
14
14
|
if (params === void 0) { params = {}; }
|
|
15
15
|
collection_1.loadCollection(methodConfig, params);
|
|
16
16
|
}, [methodConfig]);
|
|
17
|
-
var stopPeriodicLoad = react_1.useCallback(function (taskId) {
|
|
18
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
19
|
-
}, [modelName]);
|
|
20
17
|
var create = react_1.useCallback(function (params) {
|
|
21
18
|
collection_1.createItemInCollection(methodConfig, params);
|
|
22
19
|
}, [methodConfig]);
|
|
@@ -63,7 +60,7 @@ function useCollection(props) {
|
|
|
63
60
|
previousModelStatus: previousModelStatus,
|
|
64
61
|
fetchingId: fetchingId,
|
|
65
62
|
load: load,
|
|
66
|
-
stopPeriodicLoad:
|
|
63
|
+
stopPeriodicLoad: collection_1.stopCollectionPeriodicLoad,
|
|
67
64
|
create: create,
|
|
68
65
|
update: update,
|
|
69
66
|
delete: deleteItem
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Dictionary } from 'lodash';
|
|
3
2
|
import { CollectionCommonProps, CollectionCommonState, CollectionMethodConfiguration, CollectionSelectorMethod, Model, ModelCollection } from '../types';
|
|
4
3
|
/** Configuration returned by `useCollectionConfiguration` for use in `useCollection` and `useCollectionItem` */
|
|
5
4
|
export interface CollectionConfiguration<TModel extends Model> extends CollectionCommonState {
|
|
@@ -9,10 +8,10 @@ export interface CollectionConfiguration<TModel extends Model> extends Collectio
|
|
|
9
8
|
modelArray?: TModel[];
|
|
10
9
|
modelMinusRelations?: Partial<TModel>;
|
|
11
10
|
previousModel: TModel | ModelCollection<TModel>;
|
|
12
|
-
pathParams: string
|
|
13
|
-
previousPathParams: string
|
|
14
|
-
queryParams?:
|
|
15
|
-
previousQueryParams?:
|
|
11
|
+
pathParams: Array<string | number>;
|
|
12
|
+
previousPathParams: Array<string | number>;
|
|
13
|
+
queryParams?: Record<string, string | number | boolean>;
|
|
14
|
+
previousQueryParams?: Record<string, string | number | boolean>;
|
|
16
15
|
methodConfig: CollectionMethodConfiguration;
|
|
17
16
|
isInitialized: boolean;
|
|
18
17
|
setIsInitialized: (value: React.SetStateAction<boolean>) => void;
|
|
@@ -14,9 +14,6 @@ function useCollectionItem(props) {
|
|
|
14
14
|
if (params === void 0) { params = {}; }
|
|
15
15
|
collection_1.loadCollectionItem(methodConfig, params);
|
|
16
16
|
}, [methodConfig]);
|
|
17
|
-
var stopPeriodicLoad = react_1.useCallback(function (taskId) {
|
|
18
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
19
|
-
}, [modelName]);
|
|
20
17
|
var create = react_1.useCallback(function (params) {
|
|
21
18
|
collection_1.createCollectionItem(model, methodConfig, params);
|
|
22
19
|
}, [model, methodConfig]);
|
|
@@ -56,7 +53,7 @@ function useCollectionItem(props) {
|
|
|
56
53
|
modelStatus: modelStatus,
|
|
57
54
|
previousModelStatus: previousModelStatus,
|
|
58
55
|
load: load,
|
|
59
|
-
stopPeriodicLoad:
|
|
56
|
+
stopPeriodicLoad: collection_1.stopCollectionPeriodicLoad,
|
|
60
57
|
create: create,
|
|
61
58
|
update: update,
|
|
62
59
|
delete: deleteItem
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
2
|
export * from './types';
|
|
3
3
|
export * from './redux/actions';
|
|
4
|
+
export { dispatchAction, dispatchModelFetchRequest, dispatchPeriodicModelFetchRequest, dispatchPeriodicModelFetchTerminateAction, dispatchModelRemoveKeyAction, addNotification } from './redux/actionCreator';
|
|
4
5
|
export { default as configureStore } from './redux/configureStore';
|
|
5
6
|
export { setOtherDependentSagas } from './redux/sagas/rootSaga';
|
|
6
7
|
export { setOnPostLoginSaga } from './redux/sagas/postLoginDataSaga';
|
package/lib/index.js
CHANGED
|
@@ -13,10 +13,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.setConfigureModelsReducer = exports.setOtherReducers = exports.updatePersistBlacklist = exports.setOnPostLoginSaga = exports.setOtherDependentSagas = exports.configureStore = void 0;
|
|
16
|
+
exports.setConfigureModelsReducer = exports.setOtherReducers = exports.updatePersistBlacklist = exports.setOnPostLoginSaga = exports.setOtherDependentSagas = exports.configureStore = exports.addNotification = exports.dispatchModelRemoveKeyAction = exports.dispatchPeriodicModelFetchTerminateAction = exports.dispatchPeriodicModelFetchRequest = exports.dispatchModelFetchRequest = exports.dispatchAction = void 0;
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
__exportStar(require("./redux/actions"), exports);
|
|
20
|
+
var actionCreator_1 = require("./redux/actionCreator");
|
|
21
|
+
Object.defineProperty(exports, "dispatchAction", { enumerable: true, get: function () { return actionCreator_1.dispatchAction; } });
|
|
22
|
+
Object.defineProperty(exports, "dispatchModelFetchRequest", { enumerable: true, get: function () { return actionCreator_1.dispatchModelFetchRequest; } });
|
|
23
|
+
Object.defineProperty(exports, "dispatchPeriodicModelFetchRequest", { enumerable: true, get: function () { return actionCreator_1.dispatchPeriodicModelFetchRequest; } });
|
|
24
|
+
Object.defineProperty(exports, "dispatchPeriodicModelFetchTerminateAction", { enumerable: true, get: function () { return actionCreator_1.dispatchPeriodicModelFetchTerminateAction; } });
|
|
25
|
+
Object.defineProperty(exports, "dispatchModelRemoveKeyAction", { enumerable: true, get: function () { return actionCreator_1.dispatchModelRemoveKeyAction; } });
|
|
26
|
+
Object.defineProperty(exports, "addNotification", { enumerable: true, get: function () { return actionCreator_1.addNotification; } });
|
|
20
27
|
var configureStore_1 = require("./redux/configureStore");
|
|
21
28
|
Object.defineProperty(exports, "configureStore", { enumerable: true, get: function () { return __importDefault(configureStore_1).default; } });
|
|
22
29
|
var rootSaga_1 = require("./redux/sagas/rootSaga");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Action, Store } from 'redux';
|
|
2
|
+
import { Notification } from '../types/Notification';
|
|
3
|
+
import { ModelFetchRequestAction, ModelRemoveKeyAction, PeriodicModelFetchRequestAction, PeriodicModelFetchTerminationAction } from './actions';
|
|
2
4
|
export declare const setStore: (storeParam: Store) => void;
|
|
3
|
-
export declare const dispatchAction: (
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const dispatchAction: <A extends Action<any>>(action: A) => void;
|
|
6
|
+
export declare const dispatchModelFetchRequest: (action: Omit<ModelFetchRequestAction, 'type'>) => void;
|
|
7
|
+
export declare const dispatchPeriodicModelFetchRequest: (action: Omit<PeriodicModelFetchRequestAction, 'type'>) => void;
|
|
8
|
+
export declare const dispatchPeriodicModelFetchTerminateAction: (action: Omit<PeriodicModelFetchTerminationAction, 'type'>) => void;
|
|
9
|
+
export declare const dispatchModelRemoveKeyAction: (action: Omit<ModelRemoveKeyAction, 'type'>) => void;
|
|
10
|
+
export declare const addNotification: ({ text, type, modalId }: Omit<Notification, 'id'>) => void;
|
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
14
|
+
exports.addNotification = exports.dispatchModelRemoveKeyAction = exports.dispatchPeriodicModelFetchTerminateAction = exports.dispatchPeriodicModelFetchRequest = exports.dispatchModelFetchRequest = exports.dispatchAction = exports.setStore = void 0;
|
|
15
|
+
var uuid_1 = require("uuid");
|
|
16
|
+
var actions_1 = require("./actions");
|
|
17
|
+
var NotificationAction_1 = require("./actions/NotificationAction");
|
|
5
18
|
var store;
|
|
6
19
|
var setStore = function (storeParam) {
|
|
7
20
|
store = storeParam;
|
|
8
21
|
};
|
|
9
22
|
exports.setStore = setStore;
|
|
10
|
-
var dispatchAction = function (
|
|
11
|
-
store.dispatch(
|
|
23
|
+
var dispatchAction = function (action) {
|
|
24
|
+
store.dispatch(action);
|
|
12
25
|
};
|
|
13
26
|
exports.dispatchAction = dispatchAction;
|
|
14
|
-
var
|
|
15
|
-
|
|
27
|
+
var dispatchModelFetchRequest = function (action) {
|
|
28
|
+
exports.dispatchAction(__assign({ type: actions_1.MODEL_FETCH_REQUEST_TYPE.FETCH_REQUEST }, action));
|
|
29
|
+
};
|
|
30
|
+
exports.dispatchModelFetchRequest = dispatchModelFetchRequest;
|
|
31
|
+
var dispatchPeriodicModelFetchRequest = function (action) {
|
|
32
|
+
exports.dispatchAction(__assign({ type: actions_1.MODEL_FETCH_REQUEST_TYPE.PERIODIC_FETCH_REQUEST }, action));
|
|
33
|
+
};
|
|
34
|
+
exports.dispatchPeriodicModelFetchRequest = dispatchPeriodicModelFetchRequest;
|
|
35
|
+
var dispatchPeriodicModelFetchTerminateAction = function (action) {
|
|
36
|
+
exports.dispatchAction(__assign({ type: actions_1.PERIODIC_MODEL_FETCH_TERMINATION_TYPE.TERMINATE }, action));
|
|
37
|
+
};
|
|
38
|
+
exports.dispatchPeriodicModelFetchTerminateAction = dispatchPeriodicModelFetchTerminateAction;
|
|
39
|
+
var dispatchModelRemoveKeyAction = function (action) {
|
|
40
|
+
exports.dispatchAction(__assign({ type: actions_1.MODEL_REMOVE_KEY_TYPE }, action));
|
|
41
|
+
};
|
|
42
|
+
exports.dispatchModelRemoveKeyAction = dispatchModelRemoveKeyAction;
|
|
43
|
+
var addNotification = function (_a) {
|
|
44
|
+
var text = _a.text, type = _a.type, modalId = _a.modalId;
|
|
45
|
+
exports.dispatchAction({
|
|
46
|
+
type: NotificationAction_1.NOTIFICATION_ACTION_TYPE.ADD_NOTIFICATION,
|
|
47
|
+
notification: {
|
|
48
|
+
id: uuid_1.v4(),
|
|
49
|
+
text: text,
|
|
50
|
+
type: type,
|
|
51
|
+
modalId: modalId
|
|
52
|
+
}
|
|
53
|
+
});
|
|
16
54
|
};
|
|
17
|
-
exports.
|
|
55
|
+
exports.addNotification = addNotification;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Action } from 'redux';
|
|
2
|
+
import { CasV1LoginRequestBody, IdentityProvider } from '../../types';
|
|
3
|
+
import { LocalLoginRequestBody } from '../../types/auth/LocalLoginRequestBody';
|
|
4
|
+
import { OAuthToken, OAuthTokenOrNull } from '../../types/net';
|
|
5
|
+
import { BaseModelFetchRequestAction } from './ModelAction';
|
|
6
|
+
export declare enum AUTH_ACTION_TYPE {
|
|
7
|
+
CAS_LOGIN_REQUESTED = "auth/CAS_LOGIN_REQUESTED",
|
|
8
|
+
LOGIN_REQUESTED = "auth/LOGIN_REQUESTED",
|
|
9
|
+
LOG_OUT_REQUESTED = "auth/LOG_OUT_REQUESTED",
|
|
10
|
+
TOKEN_REFRESH_FAILED = "auth/TOKEN_REFRESH_FAILED",
|
|
11
|
+
LOGIN_FAILED = "auth/LOGIN_FAILED"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Action with no additional properties.
|
|
15
|
+
*/
|
|
16
|
+
export interface AuthAction extends Action<AUTH_ACTION_TYPE> {
|
|
17
|
+
}
|
|
18
|
+
export declare enum AUTH_TOKEN_ACTION_TYPE {
|
|
19
|
+
AUTH_INITIALIZED = "auth/INITIALIZED"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Action with a nullable `oauthToken`.
|
|
23
|
+
*/
|
|
24
|
+
export interface AuthTokenAction extends Action<AUTH_TOKEN_ACTION_TYPE> {
|
|
25
|
+
oauthToken: OAuthTokenOrNull;
|
|
26
|
+
}
|
|
27
|
+
export declare enum AUTH_TOKEN_SUCCESS_ACTION_TYPE {
|
|
28
|
+
GET_TOKEN_SUCCEEDED = "auth/GET_TOKEN_SUCCEEDED",
|
|
29
|
+
TOKEN_REFRESH_SUCCEEDED = "auth/TOKEN_REFRESH_SUCCEEDED"
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Action with an `oauthToken`.
|
|
33
|
+
*/
|
|
34
|
+
export interface AuthTokenSuccessAction extends Action<AUTH_TOKEN_SUCCESS_ACTION_TYPE> {
|
|
35
|
+
oauthToken: OAuthToken;
|
|
36
|
+
}
|
|
37
|
+
export declare enum AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE {
|
|
38
|
+
IDENTITY_PROVIDER_LOGIN_REQUESTED = "auth/IDENTITY_PROVIDER_LOGIN_REQUESTED"
|
|
39
|
+
}
|
|
40
|
+
export interface AuthIdentityProviderRequestAction extends Action<AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE> {
|
|
41
|
+
identityProvider: IdentityProvider;
|
|
42
|
+
}
|
|
43
|
+
export declare enum AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE {
|
|
44
|
+
CAS_V1_LOGIN_REQUEST = "auth/CAS_V1_LOGIN_REQUEST"
|
|
45
|
+
}
|
|
46
|
+
export interface AuthCasV1LoginRequestAction extends Omit<BaseModelFetchRequestAction<AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE>, 'modelName' | 'pathParams'> {
|
|
47
|
+
body: CasV1LoginRequestBody;
|
|
48
|
+
}
|
|
49
|
+
export declare enum AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE {
|
|
50
|
+
LOCAL_LOGIN_REQUEST = "auth/LOCAL_LOGIN_REQUEST"
|
|
51
|
+
}
|
|
52
|
+
export interface AuthLocalLoginRequestAction extends Omit<BaseModelFetchRequestAction<AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE>, 'modelName' | 'pathParams'> {
|
|
53
|
+
body: LocalLoginRequestBody;
|
|
54
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE = exports.AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE = exports.AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE = exports.AUTH_TOKEN_SUCCESS_ACTION_TYPE = exports.AUTH_TOKEN_ACTION_TYPE = exports.AUTH_ACTION_TYPE = void 0;
|
|
4
|
+
var AUTH_ACTION_TYPE;
|
|
5
|
+
(function (AUTH_ACTION_TYPE) {
|
|
6
|
+
AUTH_ACTION_TYPE["CAS_LOGIN_REQUESTED"] = "auth/CAS_LOGIN_REQUESTED";
|
|
7
|
+
AUTH_ACTION_TYPE["LOGIN_REQUESTED"] = "auth/LOGIN_REQUESTED";
|
|
8
|
+
AUTH_ACTION_TYPE["LOG_OUT_REQUESTED"] = "auth/LOG_OUT_REQUESTED";
|
|
9
|
+
AUTH_ACTION_TYPE["TOKEN_REFRESH_FAILED"] = "auth/TOKEN_REFRESH_FAILED";
|
|
10
|
+
AUTH_ACTION_TYPE["LOGIN_FAILED"] = "auth/LOGIN_FAILED";
|
|
11
|
+
})(AUTH_ACTION_TYPE = exports.AUTH_ACTION_TYPE || (exports.AUTH_ACTION_TYPE = {}));
|
|
12
|
+
var AUTH_TOKEN_ACTION_TYPE;
|
|
13
|
+
(function (AUTH_TOKEN_ACTION_TYPE) {
|
|
14
|
+
AUTH_TOKEN_ACTION_TYPE["AUTH_INITIALIZED"] = "auth/INITIALIZED";
|
|
15
|
+
})(AUTH_TOKEN_ACTION_TYPE = exports.AUTH_TOKEN_ACTION_TYPE || (exports.AUTH_TOKEN_ACTION_TYPE = {}));
|
|
16
|
+
var AUTH_TOKEN_SUCCESS_ACTION_TYPE;
|
|
17
|
+
(function (AUTH_TOKEN_SUCCESS_ACTION_TYPE) {
|
|
18
|
+
AUTH_TOKEN_SUCCESS_ACTION_TYPE["GET_TOKEN_SUCCEEDED"] = "auth/GET_TOKEN_SUCCEEDED";
|
|
19
|
+
AUTH_TOKEN_SUCCESS_ACTION_TYPE["TOKEN_REFRESH_SUCCEEDED"] = "auth/TOKEN_REFRESH_SUCCEEDED";
|
|
20
|
+
})(AUTH_TOKEN_SUCCESS_ACTION_TYPE = exports.AUTH_TOKEN_SUCCESS_ACTION_TYPE || (exports.AUTH_TOKEN_SUCCESS_ACTION_TYPE = {}));
|
|
21
|
+
var AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE;
|
|
22
|
+
(function (AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE) {
|
|
23
|
+
AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE["IDENTITY_PROVIDER_LOGIN_REQUESTED"] = "auth/IDENTITY_PROVIDER_LOGIN_REQUESTED";
|
|
24
|
+
})(AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE = exports.AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE || (exports.AUTH_IDENTITY_PROVIDER_REQUEST_ACTION_TYPE = {}));
|
|
25
|
+
var AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE;
|
|
26
|
+
(function (AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE) {
|
|
27
|
+
AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE["CAS_V1_LOGIN_REQUEST"] = "auth/CAS_V1_LOGIN_REQUEST";
|
|
28
|
+
})(AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE = exports.AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE || (exports.AUTH_CAS_V1_LOGIN_REQUEST_ACTION_TYPE = {}));
|
|
29
|
+
var AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE;
|
|
30
|
+
(function (AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE) {
|
|
31
|
+
AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE["LOCAL_LOGIN_REQUEST"] = "auth/LOCAL_LOGIN_REQUEST";
|
|
32
|
+
})(AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE = exports.AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE || (exports.AUTH_LOCAL_LOGIN_REQUEST_ACTION_TYPE = {}));
|