1 import { put, takeEvery } from 'redux-saga/effects';
3 import { getAliasDetails } from '@proton/pass/lib/alias/alias.requests';
4 import { getAliasDetailsFailure, getAliasDetailsIntent, getAliasDetailsSuccess } from '@proton/pass/store/actions';
5 import type { AliasDetails } from '@proton/pass/types';
7 function* requestAliasDetails(action: ReturnType<typeof getAliasDetailsIntent>) {
9 payload: { shareId, itemId, aliasEmail },
13 const result: AliasDetails = yield getAliasDetails(shareId, itemId);
14 yield put(getAliasDetailsSuccess(request.id, result));
16 yield put(getAliasDetailsFailure(request.id, { aliasEmail }, e));
20 export default function* watcher() {
21 yield takeEvery(getAliasDetailsIntent.match, requestAliasDetails);