@zeniai/client-epic-state 5.1.18-betaDI2 → 5.1.18-betaDI3
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.
|
@@ -32,12 +32,10 @@ const handleSendCommentMentionNotification = ({ taskId, mentionedUserIds, perfor
|
|
|
32
32
|
if (!isSuccessResponse(response)) {
|
|
33
33
|
// Non-success response — log to console but do not propagate to state.
|
|
34
34
|
// Liveblocks still has the comment; Slack fan-out is best-effort.
|
|
35
|
-
// eslint-disable-next-line no-console
|
|
36
35
|
console.warn('sendCommentMentionNotification non-success response', response);
|
|
37
36
|
}
|
|
38
37
|
return EMPTY;
|
|
39
38
|
}), catchError((error) => {
|
|
40
|
-
// eslint-disable-next-line no-console
|
|
41
39
|
console.warn('sendCommentMentionNotification error', error);
|
|
42
40
|
return of();
|
|
43
41
|
}));
|
package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendCommentMentionNotificationEpic.js","sourceRoot":"","sources":["../../../../../../src/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAC,KAAK,EAAE,EAAE,EAAC,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAI5D,OAAO,EAAkB,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAG/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,YAAY,CACxD,+CAA+C,EAC/C,CAAC,MAAU,EAAE,gBAAsB,EAAE,aAAiB,EAAE,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,EAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAC;CACnD,CAAC,CACH,CAAC;AAQF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,QAAuC,EACvC,OAAmC,EACnC,OAAgB,EAChB,EAAE,CACF,QAAQ,CAAC,IAAI,CACX,MAAM,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAC5C,QAAQ,CAAC,CAAC,MAA4D,EAAE,EAAE,CACxE,oCAAoC,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAC9D,CACF,CAAC;AAEJ,MAAM,oCAAoC,GAAG,CAC3C,EACE,MAAM,EACN,gBAAgB,EAChB,aAAa,GACyB,EACxC,OAAgB,EAChB,EAAE;IACF,0EAA0E;IAC1E,wEAAwE;IACxE,mCAAmC;IACnC,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAKD,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,uBAAuB,2BAA2B,MAAM,+BAA+B,CAAC;IAC5H,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CACrC,GAAG,EACH;QACE,kBAAkB,EAAE,gBAAgB;QACpC,eAAe,EAAE,aAAa;KAC/B,CACF,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAClB,QAAQ,CAAC,CAAC,QAAQ,EAAE,EAAE;QACpB,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,uEAAuE;YACvE,kEAAkE;YAClE,
|
|
1
|
+
{"version":3,"file":"sendCommentMentionNotificationEpic.js","sourceRoot":"","sources":["../../../../../../src/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAC,KAAK,EAAE,EAAE,EAAC,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AA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,QAAQ,CACT,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,EACF,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;QACnB,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,EAAE,EAAE,CAAC;IACd,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {PayloadAction, createAction} from '@reduxjs/toolkit';\nimport {ActionsObservable, StateObservable} from 'redux-observable';\nimport {EMPTY, of} from 'rxjs';\nimport {catchError, filter, mergeMap} from 'rxjs/operators';\n\nimport {ID} from '../../../../commonStateTypes/common';\nimport {RootState} from '../../../../reducer';\nimport {ZeniAPIResponse, isSuccessResponse} from '../../../../responsePayload';\nimport {ZeniAPI} from '../../../../zeniAPI';\n\n/**\n * Fire-and-forget action — dispatched by the task-comments UI when a comment\n * is created with @-mentions. The epic POSTs to task-manager's\n * `/comment-mention-notification` endpoint which fans out Slack DMs to each\n * mentioned internal user.\n *\n * Result is intentionally not captured in redux state: comment creation\n * itself is owned by Liveblocks, and a network failure on the notification\n * should not surface in the UI (the comment is still persisted in Liveblocks).\n */\nexport const sendCommentMentionNotification = createAction(\n 'taskDetailView/sendCommentMentionNotification',\n (taskId: ID, mentionedUserIds: ID[], performedById: ID) => ({\n payload: {taskId, mentionedUserIds, performedById},\n })\n);\n\nexport type ActionType = ReturnType<typeof sendCommentMentionNotification>;\n\ntype SendCommentMentionNotificationPayload = ReturnType<\n typeof sendCommentMentionNotification\n>['payload'];\n\nexport const sendCommentMentionNotificationEpic = (\n actions$: ActionsObservable<ActionType>,\n _state$: StateObservable<RootState>,\n zeniAPI: ZeniAPI\n) =>\n actions$.pipe(\n filter(sendCommentMentionNotification.match),\n mergeMap((action: PayloadAction<SendCommentMentionNotificationPayload>) =>\n handleSendCommentMentionNotification(action.payload, zeniAPI)\n )\n );\n\nconst handleSendCommentMentionNotification = (\n {\n taskId,\n mentionedUserIds,\n performedById,\n }: SendCommentMentionNotificationPayload,\n zeniAPI: ZeniAPI\n) => {\n // Short-circuit when there's nothing to send. Avoids a useless round-trip\n // (server would also short-circuit with a 200/no-op, but we may as well\n // not enqueue the request at all).\n if (mentionedUserIds.length === 0) {\n return EMPTY;\n }\n\n type CommentMentionNotificationResponseData = {recipients_notified: number};\n type CommentMentionNotificationResponse =\n ZeniAPIResponse<CommentMentionNotificationResponseData>;\n const url = `${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/comment-mention-notification`;\n const request$ = zeniAPI.postAndGetJSON<CommentMentionNotificationResponse>(\n url,\n {\n mentioned_user_ids: mentionedUserIds,\n performed_by_id: performedById,\n }\n );\n\n return request$.pipe(\n mergeMap((response) => {\n if (!isSuccessResponse(response)) {\n // Non-success response — log to console but do not propagate to state.\n // Liveblocks still has the comment; Slack fan-out is best-effort.\n console.warn(\n 'sendCommentMentionNotification non-success response',\n response\n );\n }\n return EMPTY;\n }),\n catchError((error) => {\n console.warn('sendCommentMentionNotification error', error);\n return of();\n })\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.18-
|
|
3
|
+
"version": "5.1.18-betaDI3",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|