@zeniai/client-epic-state 5.1.18-betaDI2 → 5.1.18-betaDI4
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/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js.map +1 -1
- package/lib/esm/view/companyView/types/cockpitTypes.js.map +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +0 -2
- package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => a
|
|
|
18
18
|
...(filters?.categories != null && filters.categories.length > 0
|
|
19
19
|
? { filter_by: toFilterByPayload(filters) }
|
|
20
20
|
: {}),
|
|
21
|
+
// Enh 16a: scope filter — default to internal if not set
|
|
22
|
+
task_group_scopes: filters?.taskGroupScopes ?? ['internal'],
|
|
21
23
|
};
|
|
22
24
|
return zeniAPI
|
|
23
25
|
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchCompanyTaskManagerViewEpic.js","sourceRoot":"","sources":["../../../../../src/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAC,MAAM,MAAM,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAC,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAMhF,OAAO,EACL,2BAA2B,EAC3B,qCAAqC,EACrC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"fetchCompanyTaskManagerViewEpic.js","sourceRoot":"","sources":["../../../../../src/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAC,MAAM,MAAM,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAC,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAMhF,OAAO,EACL,2BAA2B,EAC3B,qCAAqC,EACrC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AA4B1C,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,QAAuC,EACvC,OAAmC,EACnC,OAAgB,EACQ,EAAE,CAC1B,QAAQ,CAAC,IAAI,CACX,MAAM,CAAC,2BAA2B,CAAC,KAAK,CAAC,EACzC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;IACnB,MAAM,EACJ,IAAI,EAAE,UAAU,EAChB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,GACR,GAAG,MAAM,CAAC,OAAO,CAAC;IACnB,MAAM,UAAU,GAAmB;QACjC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE,YAAY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AM,CAAC,CAAC,CAAC,CAAC;QAC7C,IAAI,EAAE,QAAQ,CAAC,yBAAyB,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;KAClE,CAAC,CAAC,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {ActionsObservable, StateObservable} from 'redux-observable';\nimport {Observable, from} from 'rxjs';\nimport {catchError, filter, mergeMap, switchMap} from 'rxjs/operators';\n\nimport {getSortOrder} from '../../../commonPayloadTypes/sortOrderPayload';\nimport {updateTags} from '../../../entity/tag/tagReducer';\nimport {updateTasks} from '../../../entity/task/taskReducer';\nimport {RootState} from '../../../reducer';\nimport {createZeniAPIStatus, isSuccessResponse} from '../../../responsePayload';\nimport {ZeniAPI} from '../../../zeniAPI';\nimport {\n CockpitFilters,\n TaskManagerViewSortKey,\n} from '../../companyView/types/cockpitTypes';\nimport {\n fetchCompanyTaskManagerView,\n updateCompanyTaskManagerViewOnFailure,\n updateCompanyTaskManagerViewOnSuccess,\n} from '../companyTaskManagerViewReducer';\nimport {CompanyTaskManagerViewResponse} from './../companyTaskManagerViewPayload';\n\nexport type ActionType =\n | ReturnType<typeof fetchCompanyTaskManagerView>\n | ReturnType<typeof updateCompanyTaskManagerViewOnSuccess>\n | ReturnType<typeof updateTasks>\n | ReturnType<typeof updateTags>\n | ReturnType<typeof updateCompanyTaskManagerViewOnFailure>;\n\ninterface FilterByEntry {\n field: string;\n join: 'and' | 'or';\n operator: 'is' | 'is_not';\n values: (string | number)[];\n}\n\ninterface ESQueryPayload {\n filter_join: 'and' | 'or';\n from: number;\n global_search: string;\n size: number;\n sort_by: string;\n sort_order: string;\n filter_by?: FilterByEntry[];\n task_group_scopes?: string[];\n}\n\nconst DEFAULT_PAGE_SIZE = 100;\n\nexport const fetchCompanyTaskManagerViewEpic = (\n actions$: ActionsObservable<ActionType>,\n _state$: StateObservable<RootState>,\n zeniAPI: ZeniAPI\n): Observable<ActionType> =>\n actions$.pipe(\n filter(fetchCompanyTaskManagerView.match),\n switchMap((action) => {\n const {\n from: fromOffset,\n searchString,\n sortKey,\n sortOrder,\n filters,\n } = action.payload;\n const queryValue: ESQueryPayload = {\n size: DEFAULT_PAGE_SIZE,\n from: fromOffset,\n global_search: searchString ?? '',\n sort_by: toSortKeyPayload(sortKey),\n sort_order: getSortOrder(sortOrder),\n filter_join:\n filters?.categoryCombinationOperator === 'AND' ? 'and' : 'or',\n ...(filters?.categories != null && filters.categories.length > 0\n ? {filter_by: toFilterByPayload(filters)}\n : {}),\n // Enh 16a: scope filter — default to internal if not set\n task_group_scopes: filters?.taskGroupScopes ?? ['internal'],\n };\n return zeniAPI\n .getJSON<CompanyTaskManagerViewResponse>(\n `${\n zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl\n }/1.0/cockpit-panels/tasks-es?query=${encodeURIComponent(\n JSON.stringify(queryValue)\n )}`\n )\n .pipe(\n mergeMap((response) => {\n if (isSuccessResponse(response) && response.data != null) {\n const tasksList =\n response.data.aggregations.group_by_company_name.buckets.flatMap(\n (bucket) => bucket.tasks\n );\n const actions: ActionType[] = [\n updateCompanyTaskManagerViewOnSuccess({\n data: response.data,\n }),\n updateTasks(tasksList),\n updateTags(tasksList.flatMap((task) => task.tags)),\n ];\n return from(actions);\n } else {\n const actions: ActionType[] = [\n updateCompanyTaskManagerViewOnFailure(response.status),\n ];\n return from(actions);\n }\n }),\n catchError((error) => {\n const actions: ActionType[] = [\n updateCompanyTaskManagerViewOnFailure(\n createZeniAPIStatus(\n 'Unexpected error',\n 'Cockpit Task manager errored out' + JSON.stringify(error)\n )\n ),\n ];\n return from(actions);\n })\n );\n })\n );\n\nconst toSortKeyPayload = (sortKey: TaskManagerViewSortKey) => {\n switch (sortKey) {\n case 'taskName':\n return 'name';\n case 'dueDate':\n return 'due_date';\n case 'createdBy':\n return 'created_by';\n case 'name':\n return 'company_name';\n default:\n return sortKey;\n }\n};\n\nconst toFilterByPayload = (filters: CockpitFilters): FilterByEntry[] => {\n if (filters.categories == null) {\n return [];\n }\n return filters.categories.map((category) => ({\n field: category.field ?? '',\n operator: category.matchingOperator === 'equal' ? 'is' : 'is_not',\n values: category.values.map((v) => String(v)),\n join: category.valuesCombinationOperator === 'ALL' ? 'and' : 'or',\n }));\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpitTypes.js","sourceRoot":"","sources":["../../../../../src/view/companyView/types/cockpitTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,yCAAyC,CAAC;AAMtE,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,QAAQ;IACR,UAAU;IACV,UAAU;IACV,WAAW;CACH,CAAC;AAEX,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,wBAAwB;IACxB,UAAU;IACV,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;IACX,SAAS;IACT,yBAAyB;IACzB,wBAAwB;IACxB,OAAO;IACP,cAAc;IACd,eAAe;CACP,CAAC;AAEX,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,UAAU;IACV,OAAO;IACP,QAAQ;IACR,eAAe;CACP,CAAC;AAEX,MAAM,oBAAoB,GAAG;IAC3B,aAAa;IACb,QAAQ;IACR,OAAO;IACP,gCAAgC;IAChC,mCAAmC;IACnC,yBAAyB;IACzB,kBAAkB;IAClB,QAAQ;IACR,kBAAkB;IAClB,kBAAkB;IAClB,2BAA2B;IAC3B,YAAY;IACZ,wBAAwB;IACxB,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,mBAAmB;IACnB,gBAAgB;CACR,CAAC;AAEX,MAAM,0BAA0B,GAAG;IACjC,MAAM;IACN,UAAU;IACV,QAAQ;IACR,UAAU;IACV,SAAS;IACT,UAAU;IACV,MAAM;IACN,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAS,EAAE,EAAE,CAClD,aAAa,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAS,EAAE,EAAE,CACnD,aAAa,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAS,EAAE,EAAE,CACnD,aAAa,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAS,EAAE,EAAE,CAC/C,aAAa,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAS,EAAE,EAAE,CACpD,aAAa,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cockpitTypes.js","sourceRoot":"","sources":["../../../../../src/view/companyView/types/cockpitTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,yCAAyC,CAAC;AAMtE,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,QAAQ;IACR,UAAU;IACV,UAAU;IACV,WAAW;CACH,CAAC;AAEX,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,wBAAwB;IACxB,UAAU;IACV,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;IACX,SAAS;IACT,yBAAyB;IACzB,wBAAwB;IACxB,OAAO;IACP,cAAc;IACd,eAAe;CACP,CAAC;AAEX,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;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AE,uBAAuB,CAAC,CAAC","sourcesContent":["import {SortOrder} from '../../../commonStateTypes/selectorTypes/sortOrderTypes';\nimport {stringToUnion} from '../../../commonStateTypes/stringToUnion';\nimport {ZeniDate} from '../../../zeniDayJS';\nimport {SubscriptionViewSortKey} from '../../subscriptionView/types/subscriptionTypes';\nimport {FilterCategoryValueType} from '../helpers/cockpitHelpers';\nimport {CockpitDownloadTabsID, CockpitTabsFileType} from './cockpitTabsID';\n\nconst ALL_PORTFOLIO_SORT_KEYS = [\n 'companyName',\n 'cashBalance',\n 'runway',\n 'expenses',\n 'revenues',\n 'netIncome',\n] as const;\n\nconst ALL_MANAGEMENT_SORT_KEYS = [\n 'companyName',\n 'task',\n 'status',\n 'group',\n 'plans',\n 'controller',\n 'customerSuccessManager',\n 'reviewer',\n 'preparer',\n 'apAnalyst',\n 'reportSent',\n 'taxStatus',\n 'taxLead',\n 'monthlyRecurringRevenue',\n 'annualRecurringRevenue',\n 'notes',\n 'satisfaction',\n 'bookCloseDate',\n] as const;\n\nconst ALL_ONBOARDING_SORT_KEYS = [\n 'companyName',\n 'bankAccountLinked',\n 'qboLinked',\n 'identityVerified',\n 'businessVerified',\n 'groupCreated',\n 'customerCreated',\n 'enroller',\n 'notes',\n 'invite',\n 'latestCreated',\n] as const;\n\nconst ALL_HEALTH_SORT_KEYS = [\n 'companyName',\n 'issues',\n 'group',\n 'externalProductServiceExposure',\n 'companyEngagementMetricsUpdatedAt',\n 'monthlyRecurringRevenue',\n 'productVerticals',\n 'runway',\n 'churnProbability',\n 'netPromoterScore',\n 'customerSatisfactionScore',\n 'controller',\n 'customerSuccessManager',\n 'lastReportSent',\n 'subscriptionDate',\n 'renewalDate',\n 'dashboardLastSeen',\n 'lastEngagement',\n] as const;\n\nconst ALL_TASK_MANAGER_SORT_KEYS = [\n 'name',\n 'taskName',\n 'status',\n 'priority',\n 'dueDate',\n 'assignee',\n 'tags',\n 'createdBy',\n] as const;\n\nexport const toPortfolioSortKeyType = (v: string) =>\n stringToUnion(v, ALL_PORTFOLIO_SORT_KEYS);\n\nexport const toManagementSortKeyType = (v: string) =>\n stringToUnion(v, ALL_MANAGEMENT_SORT_KEYS);\n\nexport const toOnboardingSortKeyType = (v: string) =>\n stringToUnion(v, ALL_ONBOARDING_SORT_KEYS);\n\nexport const toHealthSortKeyType = (v: string) =>\n stringToUnion(v, ALL_HEALTH_SORT_KEYS);\n\nexport const toTaskManagerSortKeyType = (v: string) =>\n stringToUnion(v, ALL_TASK_MANAGER_SORT_KEYS);\n\nexport type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;\nexport type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;\nexport type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;\nexport type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;\nexport type TaskManagerViewSortKey = ReturnType<\n typeof toTaskManagerSortKeyType\n>;\n\nexport type AiAccountantFilterCategoryField = 'enrollmentStatus';\n\nexport type ManagementViewFilterCategoryField =\n | 'controllerUserIds'\n | 'customerSuccessManagerUserIds'\n | 'preparerUserIds'\n | 'reviewerUserIds'\n | 'apAnalystUserIds'\n | 'taxLeadUserIds'\n | 'companyGroupId'\n | 'taxStatusCode'\n | 'statusCode'\n | 'plans'\n | 'annualRecurringRevenue'\n | 'monthlyRecurringRevenue'\n | 'customerSatisfaction'\n | 'zeniSatisfaction';\n\nexport type SubscriptionViewFilterCategoryField =\n | 'controllerUserIds'\n | 'statusCode'\n | 'recommendedActionCode'\n | 'subscriptionPlans'\n | 'subscriptionAddOns'\n | 'avg2MonthExpenses'\n | 'slabLowerLimit'\n | 'slabUpperLimit'\n | 'monthlyRecurringRevenue';\n\nexport type PortfolioViewFilterCategoryField =\n | 'netBurnOrIncome'\n | 'cashPosition'\n | 'income'\n | 'expenses'\n | 'runway';\n\nexport type HealthMonitorViewFilterCategoryField =\n | 'verticalProductServices'\n | 'runway'\n | 'netPromoterScore'\n | 'customerSatisfactionScore'\n | 'churnProbabilityPercentage'\n | 'controller'\n | 'customerSuccessManager'\n | 'lastReportSent'\n | 'subscriptionStartDate'\n | 'subscriptionRenewalDate'\n | 'externalProductServiceExposure'\n | 'companyEngagementMetricsUpdatedAt'\n | 'companyGroupId'\n | 'monthlyRecurringRevenue';\n\nexport type TaskManagerViewFilterCategoryField =\n | 'assignees'\n | 'creationDate'\n | 'dueDate'\n | 'priority'\n | 'status'\n | 'company_id'\n | 'tag';\n\nexport interface CockpitFilterCategory {\n matchingOperator: 'equal' | 'not_equal';\n values: FilterCategoryValueType[];\n valuesCombinationOperator: 'ANY' | 'ALL';\n field?:\n | AiAccountantFilterCategoryField\n | ManagementViewFilterCategoryField\n | SubscriptionViewFilterCategoryField\n | PortfolioViewFilterCategoryField\n | HealthMonitorViewFilterCategoryField\n | TaskManagerViewFilterCategoryField;\n}\n\nexport interface CockpitFilters {\n categories?: CockpitFilterCategory[];\n categoryCombinationOperator?: 'AND' | 'OR';\n /** Enh 16a: scope filter for cockpit Bird's-Eye View — 'internal' | 'external' */\n taskGroupScopes?: string[];\n}\n\nexport const MANAGEMENT_STATUS_CODES = [\n 'live',\n 'onboarding',\n 'stalled',\n 'archive',\n 'terminated',\n];\nexport const toManagementStatusCodeType = (v: string) =>\n stringToUnion(v, MANAGEMENT_STATUS_CODES);\nexport type ManagementStatusCodeType = ReturnType<\n typeof toManagementStatusCodeType\n>;\n\nexport interface FilterCombinationsByTabs {\n filters: CockpitFilters;\n filterText: string;\n sortKey:\n | ManagementViewSortKey\n | PortfolioViewSortKey\n | SubscriptionViewSortKey\n | OnboardingViewSortKey\n | HealthViewSortKey;\n sortOrder: SortOrder;\n}\nexport interface DownloadCockpitTabOptions {\n filterByTabs: Record<CockpitDownloadTabsID, FilterCombinationsByTabs>;\n tabs: CockpitDownloadTabsID[];\n tabsFileType: CockpitTabsFileType;\n timezone: string;\n}\n\nexport type CategoryValueForCompanyType =\n | string\n | string[]\n | ZeniDate\n | undefined;\n"]}
|
|
@@ -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;AAI5D,OAAO,EAAkB,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAG/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,YAAY,CACxD,+CAA+C,EAC/C,CAAC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AAsC,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-betaDI4",
|
|
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",
|