@zeniai/client-epic-state 5.2.3 → 5.2.5
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/entity/invoicing/invoicingCommonPayload.d.ts +27 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +52 -1
- package/lib/epic.js +12 -0
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +50 -0
- package/lib/esm/epic.js +12 -0
- package/lib/esm/index.js +3 -3
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +411 -9
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +49 -0
- package/lib/esm/view/aiCfoView/epics/deleteSkillEpic.js +23 -0
- package/lib/esm/view/aiCfoView/epics/fetchSkillDetailEpic.js +35 -0
- package/lib/esm/view/aiCfoView/epics/fetchSkillVersionBodyEpic.js +45 -0
- package/lib/esm/view/aiCfoView/epics/fetchSkillVersionsEpic.js +37 -0
- package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +11 -6
- package/lib/esm/view/aiCfoView/epics/saveSkillEpic.js +72 -0
- package/lib/esm/view/aiCfoView/epics/setSkillVisibilityEpic.js +32 -0
- package/lib/esm/view/aiCfoView/epics/toSkillDetail.js +102 -0
- package/lib/esm/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +7 -4
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +3 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +0 -31
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +5 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +7 -0
- package/lib/esm/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +2 -1
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +2 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.js +26 -12
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +85 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +67 -2
- package/lib/view/aiCfoView/aiCfoViewReducer.js +413 -10
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +7 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +54 -0
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +143 -1
- package/lib/view/aiCfoView/epics/deleteSkillEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/deleteSkillEpic.js +27 -0
- package/lib/view/aiCfoView/epics/fetchSkillDetailEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSkillDetailEpic.js +39 -0
- package/lib/view/aiCfoView/epics/fetchSkillVersionBodyEpic.d.ts +13 -0
- package/lib/view/aiCfoView/epics/fetchSkillVersionBodyEpic.js +49 -0
- package/lib/view/aiCfoView/epics/fetchSkillVersionsEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSkillVersionsEpic.js +41 -0
- package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +11 -6
- package/lib/view/aiCfoView/epics/saveSkillEpic.d.ts +14 -0
- package/lib/view/aiCfoView/epics/saveSkillEpic.js +76 -0
- package/lib/view/aiCfoView/epics/setSkillVisibilityEpic.d.ts +14 -0
- package/lib/view/aiCfoView/epics/setSkillVisibilityEpic.js +36 -0
- package/lib/view/aiCfoView/epics/toSkillDetail.d.ts +88 -0
- package/lib/view/aiCfoView/epics/toSkillDetail.js +110 -0
- package/lib/view/companyView/types/cockpitTabsID.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/invoicing/auditView/auditViewPayload.d.ts +2 -0
- package/lib/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/view/invoicing/couponView/couponViewState.d.ts +1 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +6 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +6 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +6 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +1 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +0 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.d.ts +0 -13
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -34
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +6 -0
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +2 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +4 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +8 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +9 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +3 -1
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +6 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +1 -0
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +6 -1
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +1 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/package.json +1 -1
|
@@ -228,6 +228,33 @@ export declare function invoicingOptionCodes(options: InvoicingNamedOption[]): s
|
|
|
228
228
|
* frontend release, so consumers must branch on what the map returns rather
|
|
229
229
|
* than on a hardcoded list.
|
|
230
230
|
*/
|
|
231
|
+
/**
|
|
232
|
+
* Field-help groups on `GET /1.0/config`'s `field_help`. Closed union because
|
|
233
|
+
* the client decides which group a screen belongs to — a screen names its group
|
|
234
|
+
* in code, so an unknown one is a client bug rather than backend data.
|
|
235
|
+
*/
|
|
236
|
+
export declare const ALL_INVOICING_FIELD_HELP_GROUPS: readonly ["catalog", "credit_note", "customer", "data_import", "discount", "dunning", "invoice", "payment", "settings", "subscription"];
|
|
237
|
+
export type InvoicingFieldHelpGroup = (typeof ALL_INVOICING_FIELD_HELP_GROUPS)[number];
|
|
238
|
+
export interface InvoicingFieldHelpEntryWire {
|
|
239
|
+
code?: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
}
|
|
242
|
+
export type InvoicingFieldHelpWire = Partial<Record<string, InvoicingFieldHelpEntryWire[]>>;
|
|
243
|
+
/** Help copy for one group, keyed by field code for O(1) lookup per row. */
|
|
244
|
+
export type InvoicingFieldHelpByCode = Record<string, string>;
|
|
245
|
+
/**
|
|
246
|
+
* Help copy per group. `Partial` because a group the backend has not populated
|
|
247
|
+
* — or an environment whose backend predates `field_help` — must render no icon
|
|
248
|
+
* rather than an empty tooltip.
|
|
249
|
+
*/
|
|
250
|
+
export type InvoicingFieldHelp = Partial<Record<InvoicingFieldHelpGroup, InvoicingFieldHelpByCode>>;
|
|
251
|
+
/**
|
|
252
|
+
* Flattens each group's entry array into a `code -> description` map. Done once
|
|
253
|
+
* when config loads so a row render is a key lookup rather than an array scan.
|
|
254
|
+
* Entries without a code or with blank copy are dropped, so a lookup miss and
|
|
255
|
+
* "backend sent an empty string" are the same thing to the UI: no icon.
|
|
256
|
+
*/
|
|
257
|
+
export declare function toInvoicingFieldHelp(fieldHelp: InvoicingFieldHelpWire): InvoicingFieldHelp;
|
|
231
258
|
export type InvoicingNamedOptionsByKeyWire = Record<string, InvoicingNamedOptionWire[]>;
|
|
232
259
|
export type InvoicingNamedOptionsByKey = Record<string, InvoicingNamedOption[]>;
|
|
233
260
|
export declare function toInvoicingNamedOptionsByKey(optionsByKey: InvoicingNamedOptionsByKeyWire): InvoicingNamedOptionsByKey;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = void 0;
|
|
3
|
+
exports.ALL_INVOICING_FIELD_HELP_GROUPS = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = void 0;
|
|
4
4
|
exports.toInvoicingDunningAction = toInvoicingDunningAction;
|
|
5
5
|
exports.toInvoicingSubscriptionLifecycleAction = toInvoicingSubscriptionLifecycleAction;
|
|
6
6
|
exports.toInvoicingSubscriptionLifecycleActionOption = toInvoicingSubscriptionLifecycleActionOption;
|
|
@@ -17,6 +17,7 @@ exports.toInvoicingQboAccountMappingKindOption = toInvoicingQboAccountMappingKin
|
|
|
17
17
|
exports.toInvoicingNamedOption = toInvoicingNamedOption;
|
|
18
18
|
exports.toInvoicingFormOption = toInvoicingFormOption;
|
|
19
19
|
exports.invoicingOptionCodes = invoicingOptionCodes;
|
|
20
|
+
exports.toInvoicingFieldHelp = toInvoicingFieldHelp;
|
|
20
21
|
exports.toInvoicingNamedOptionsByKey = toInvoicingNamedOptionsByKey;
|
|
21
22
|
exports.toInvoicingSubscriptionEditFieldOption = toInvoicingSubscriptionEditFieldOption;
|
|
22
23
|
exports.toAuditLogEntityRouteOption = toAuditLogEntityRouteOption;
|
|
@@ -219,6 +220,56 @@ function toInvoicingFormOption(option) {
|
|
|
219
220
|
function invoicingOptionCodes(options) {
|
|
220
221
|
return options.map((option) => option.code);
|
|
221
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* A config-driven map from some key (a pricing model, a status, …) to the
|
|
225
|
+
* options allowed for it. Lets the backend widen an allowed set without a
|
|
226
|
+
* frontend release, so consumers must branch on what the map returns rather
|
|
227
|
+
* than on a hardcoded list.
|
|
228
|
+
*/
|
|
229
|
+
/**
|
|
230
|
+
* Field-help groups on `GET /1.0/config`'s `field_help`. Closed union because
|
|
231
|
+
* the client decides which group a screen belongs to — a screen names its group
|
|
232
|
+
* in code, so an unknown one is a client bug rather than backend data.
|
|
233
|
+
*/
|
|
234
|
+
exports.ALL_INVOICING_FIELD_HELP_GROUPS = [
|
|
235
|
+
'catalog',
|
|
236
|
+
'credit_note',
|
|
237
|
+
'customer',
|
|
238
|
+
'data_import',
|
|
239
|
+
'discount',
|
|
240
|
+
'dunning',
|
|
241
|
+
'invoice',
|
|
242
|
+
'payment',
|
|
243
|
+
'settings',
|
|
244
|
+
'subscription',
|
|
245
|
+
];
|
|
246
|
+
const isInvoicingFieldHelpGroup = (group) => exports.ALL_INVOICING_FIELD_HELP_GROUPS.includes(group);
|
|
247
|
+
/**
|
|
248
|
+
* Flattens each group's entry array into a `code -> description` map. Done once
|
|
249
|
+
* when config loads so a row render is a key lookup rather than an array scan.
|
|
250
|
+
* Entries without a code or with blank copy are dropped, so a lookup miss and
|
|
251
|
+
* "backend sent an empty string" are the same thing to the UI: no icon.
|
|
252
|
+
*/
|
|
253
|
+
function toInvoicingFieldHelp(fieldHelp) {
|
|
254
|
+
const byGroup = {};
|
|
255
|
+
Object.entries(fieldHelp).forEach(([group, entries]) => {
|
|
256
|
+
if (!isInvoicingFieldHelpGroup(group) || !Array.isArray(entries)) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
const byCode = {};
|
|
260
|
+
entries.forEach((entry) => {
|
|
261
|
+
const code = entry?.code?.trim() ?? '';
|
|
262
|
+
const description = entry?.description?.trim() ?? '';
|
|
263
|
+
if (code !== '' && description !== '') {
|
|
264
|
+
byCode[code] = description;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
if (Object.keys(byCode).length > 0) {
|
|
268
|
+
byGroup[group] = byCode;
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
return byGroup;
|
|
272
|
+
}
|
|
222
273
|
function toInvoicingNamedOptionsByKey(optionsByKey) {
|
|
223
274
|
return Object.fromEntries(Object.entries(optionsByKey).map(([key, options]) => [
|
|
224
275
|
key,
|
package/lib/epic.js
CHANGED
|
@@ -53,10 +53,16 @@ const acceptMasterTOSEpic_1 = require("./view/aiCfoView/epics/acceptMasterTOSEpi
|
|
|
53
53
|
const createSessionAndSubmitEpic_1 = require("./view/aiCfoView/epics/createSessionAndSubmitEpic");
|
|
54
54
|
const createSessionEpic_1 = require("./view/aiCfoView/epics/createSessionEpic");
|
|
55
55
|
const deleteChatSessionEpic_1 = require("./view/aiCfoView/epics/deleteChatSessionEpic");
|
|
56
|
+
const deleteSkillEpic_1 = require("./view/aiCfoView/epics/deleteSkillEpic");
|
|
56
57
|
const fetchChatHistoryEpic_1 = require("./view/aiCfoView/epics/fetchChatHistoryEpic");
|
|
57
58
|
const fetchChatSessionsForUserEpic_1 = require("./view/aiCfoView/epics/fetchChatSessionsForUserEpic");
|
|
59
|
+
const fetchSkillDetailEpic_1 = require("./view/aiCfoView/epics/fetchSkillDetailEpic");
|
|
60
|
+
const fetchSkillVersionBodyEpic_1 = require("./view/aiCfoView/epics/fetchSkillVersionBodyEpic");
|
|
61
|
+
const fetchSkillVersionsEpic_1 = require("./view/aiCfoView/epics/fetchSkillVersionsEpic");
|
|
58
62
|
const fetchSkillsEpic_1 = require("./view/aiCfoView/epics/fetchSkillsEpic");
|
|
59
63
|
const fetchSuggestedQuestionsEpic_1 = require("./view/aiCfoView/epics/fetchSuggestedQuestionsEpic");
|
|
64
|
+
const saveSkillEpic_1 = require("./view/aiCfoView/epics/saveSkillEpic");
|
|
65
|
+
const setSkillVisibilityEpic_1 = require("./view/aiCfoView/epics/setSkillVisibilityEpic");
|
|
60
66
|
const stopSubmitEpic_1 = require("./view/aiCfoView/epics/stopSubmitEpic");
|
|
61
67
|
const stopSubmitQuestionEpic_1 = require("./view/aiCfoView/epics/stopSubmitQuestionEpic");
|
|
62
68
|
const submitFeedbackEpic_1 = require("./view/aiCfoView/epics/submitFeedbackEpic");
|
|
@@ -802,6 +808,7 @@ const ALL_EPICS = [
|
|
|
802
808
|
deleteRemiEpic_1.deleteRemiEpic,
|
|
803
809
|
deleteScheduleAccruedDetailEpic_1.deleteScheduleAccruedDetailEpic,
|
|
804
810
|
deleteScheduleDetailEpic_1.deleteScheduleDetailEpic,
|
|
811
|
+
deleteSkillEpic_1.deleteSkillEpic,
|
|
805
812
|
deleteTagEpic_1.deleteTagEpic,
|
|
806
813
|
deleteTaskEpic_1.deleteTaskEpic,
|
|
807
814
|
deleteTaskGroupEpic_1.deleteTaskGroupEpic,
|
|
@@ -1118,7 +1125,10 @@ const ALL_EPICS = [
|
|
|
1118
1125
|
fetchScheduleDetailsPageEpic_1.fetchScheduleDetailsPageEpic,
|
|
1119
1126
|
fetchScheduleListEpic_1.fetchScheduleListEpic,
|
|
1120
1127
|
fetchSchedulesAccountEpic_1.fetchSchedulesAccountEpic,
|
|
1128
|
+
fetchSkillDetailEpic_1.fetchSkillDetailEpic,
|
|
1121
1129
|
fetchSkillsEpic_1.fetchSkillsEpic,
|
|
1130
|
+
fetchSkillVersionBodyEpic_1.fetchSkillVersionBodyEpic,
|
|
1131
|
+
fetchSkillVersionsEpic_1.fetchSkillVersionsEpic,
|
|
1122
1132
|
fetchSubscriptionAddOnsEpic_1.fetchSubscriptionAddOnsEpic,
|
|
1123
1133
|
fetchSubscriptionCouponsEpic_1.fetchSubscriptionCouponsEpic,
|
|
1124
1134
|
fetchSubscriptionCreateEstimateEpic_1.fetchSubscriptionCreateEstimateEpic,
|
|
@@ -1319,6 +1329,7 @@ const ALL_EPICS = [
|
|
|
1319
1329
|
saveRemiSetupApproverViewUpdatesEpic_1.saveRemiSetupApproverViewUpdatesEpic,
|
|
1320
1330
|
saveScheduleAccruedDetailsEpic_1.saveScheduleAccruedDetailsEpic,
|
|
1321
1331
|
saveScheduleDetailsEpic_1.saveScheduleDetailsEpic,
|
|
1332
|
+
saveSkillEpic_1.saveSkillEpic,
|
|
1322
1333
|
saveSubscriptionNotesUpdatesEpic_1.saveSubscriptionNotesUpdatesEpic,
|
|
1323
1334
|
saveSubscriptionUpdatesEpic_1.saveSubscriptionUpdatesEpic,
|
|
1324
1335
|
saveTaskDetailEpic_1.saveTaskDetailEpic,
|
|
@@ -1339,6 +1350,7 @@ const ALL_EPICS = [
|
|
|
1339
1350
|
sendOtpEpic_1.sendOtpEpic,
|
|
1340
1351
|
sendReferralInviteEpic_1.sendReferralInviteEpic,
|
|
1341
1352
|
sessionHeartbeatEpic_1.sessionHeartbeatEpic,
|
|
1353
|
+
setSkillVisibilityEpic_1.setSkillVisibilityEpic,
|
|
1342
1354
|
snoozeTaskEpic_1.snoozeTaskEpic,
|
|
1343
1355
|
startInvoicingQboBackfillEpic_1.startInvoicingQboBackfillEpic,
|
|
1344
1356
|
statementCloseDayEpic_1.statementCloseDayEpic,
|
|
@@ -195,6 +195,56 @@ export function toInvoicingFormOption(option) {
|
|
|
195
195
|
export function invoicingOptionCodes(options) {
|
|
196
196
|
return options.map((option) => option.code);
|
|
197
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* A config-driven map from some key (a pricing model, a status, …) to the
|
|
200
|
+
* options allowed for it. Lets the backend widen an allowed set without a
|
|
201
|
+
* frontend release, so consumers must branch on what the map returns rather
|
|
202
|
+
* than on a hardcoded list.
|
|
203
|
+
*/
|
|
204
|
+
/**
|
|
205
|
+
* Field-help groups on `GET /1.0/config`'s `field_help`. Closed union because
|
|
206
|
+
* the client decides which group a screen belongs to — a screen names its group
|
|
207
|
+
* in code, so an unknown one is a client bug rather than backend data.
|
|
208
|
+
*/
|
|
209
|
+
export const ALL_INVOICING_FIELD_HELP_GROUPS = [
|
|
210
|
+
'catalog',
|
|
211
|
+
'credit_note',
|
|
212
|
+
'customer',
|
|
213
|
+
'data_import',
|
|
214
|
+
'discount',
|
|
215
|
+
'dunning',
|
|
216
|
+
'invoice',
|
|
217
|
+
'payment',
|
|
218
|
+
'settings',
|
|
219
|
+
'subscription',
|
|
220
|
+
];
|
|
221
|
+
const isInvoicingFieldHelpGroup = (group) => ALL_INVOICING_FIELD_HELP_GROUPS.includes(group);
|
|
222
|
+
/**
|
|
223
|
+
* Flattens each group's entry array into a `code -> description` map. Done once
|
|
224
|
+
* when config loads so a row render is a key lookup rather than an array scan.
|
|
225
|
+
* Entries without a code or with blank copy are dropped, so a lookup miss and
|
|
226
|
+
* "backend sent an empty string" are the same thing to the UI: no icon.
|
|
227
|
+
*/
|
|
228
|
+
export function toInvoicingFieldHelp(fieldHelp) {
|
|
229
|
+
const byGroup = {};
|
|
230
|
+
Object.entries(fieldHelp).forEach(([group, entries]) => {
|
|
231
|
+
if (!isInvoicingFieldHelpGroup(group) || !Array.isArray(entries)) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const byCode = {};
|
|
235
|
+
entries.forEach((entry) => {
|
|
236
|
+
const code = entry?.code?.trim() ?? '';
|
|
237
|
+
const description = entry?.description?.trim() ?? '';
|
|
238
|
+
if (code !== '' && description !== '') {
|
|
239
|
+
byCode[code] = description;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
if (Object.keys(byCode).length > 0) {
|
|
243
|
+
byGroup[group] = byCode;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return byGroup;
|
|
247
|
+
}
|
|
198
248
|
export function toInvoicingNamedOptionsByKey(optionsByKey) {
|
|
199
249
|
return Object.fromEntries(Object.entries(optionsByKey).map(([key, options]) => [
|
|
200
250
|
key,
|
package/lib/esm/epic.js
CHANGED
|
@@ -50,10 +50,16 @@ import { acceptMasterTOSEpic, } from './view/aiCfoView/epics/acceptMasterTOSEpic
|
|
|
50
50
|
import { createSessionAndSubmitEpic, } from './view/aiCfoView/epics/createSessionAndSubmitEpic';
|
|
51
51
|
import { createSessionEpic, } from './view/aiCfoView/epics/createSessionEpic';
|
|
52
52
|
import { deleteChatSessionEpic, } from './view/aiCfoView/epics/deleteChatSessionEpic';
|
|
53
|
+
import { deleteSkillEpic } from './view/aiCfoView/epics/deleteSkillEpic';
|
|
53
54
|
import { fetchChatHistoryEpic, } from './view/aiCfoView/epics/fetchChatHistoryEpic';
|
|
54
55
|
import { fetchChatSessionsForUserEpic, } from './view/aiCfoView/epics/fetchChatSessionsForUserEpic';
|
|
56
|
+
import { fetchSkillDetailEpic } from './view/aiCfoView/epics/fetchSkillDetailEpic';
|
|
57
|
+
import { fetchSkillVersionBodyEpic } from './view/aiCfoView/epics/fetchSkillVersionBodyEpic';
|
|
58
|
+
import { fetchSkillVersionsEpic } from './view/aiCfoView/epics/fetchSkillVersionsEpic';
|
|
55
59
|
import { fetchSkillsEpic, } from './view/aiCfoView/epics/fetchSkillsEpic';
|
|
56
60
|
import { fetchSuggestedQuestionsEpic, } from './view/aiCfoView/epics/fetchSuggestedQuestionsEpic';
|
|
61
|
+
import { saveSkillEpic } from './view/aiCfoView/epics/saveSkillEpic';
|
|
62
|
+
import { setSkillVisibilityEpic } from './view/aiCfoView/epics/setSkillVisibilityEpic';
|
|
57
63
|
import { stopSubmitEpic, } from './view/aiCfoView/epics/stopSubmitEpic';
|
|
58
64
|
import { stopSubmitQuestionEpic, } from './view/aiCfoView/epics/stopSubmitQuestionEpic';
|
|
59
65
|
import { submitFeedbackEpic, } from './view/aiCfoView/epics/submitFeedbackEpic';
|
|
@@ -799,6 +805,7 @@ const ALL_EPICS = [
|
|
|
799
805
|
deleteRemiEpic,
|
|
800
806
|
deleteScheduleAccruedDetailEpic,
|
|
801
807
|
deleteScheduleDetailEpic,
|
|
808
|
+
deleteSkillEpic,
|
|
802
809
|
deleteTagEpic,
|
|
803
810
|
deleteTaskEpic,
|
|
804
811
|
deleteTaskGroupEpic,
|
|
@@ -1115,7 +1122,10 @@ const ALL_EPICS = [
|
|
|
1115
1122
|
fetchScheduleDetailsPageEpic,
|
|
1116
1123
|
fetchScheduleListEpic,
|
|
1117
1124
|
fetchSchedulesAccountEpic,
|
|
1125
|
+
fetchSkillDetailEpic,
|
|
1118
1126
|
fetchSkillsEpic,
|
|
1127
|
+
fetchSkillVersionBodyEpic,
|
|
1128
|
+
fetchSkillVersionsEpic,
|
|
1119
1129
|
fetchSubscriptionAddOnsEpic,
|
|
1120
1130
|
fetchSubscriptionCouponsEpic,
|
|
1121
1131
|
fetchSubscriptionCreateEstimateEpic,
|
|
@@ -1316,6 +1326,7 @@ const ALL_EPICS = [
|
|
|
1316
1326
|
saveRemiSetupApproverViewUpdatesEpic,
|
|
1317
1327
|
saveScheduleAccruedDetailsEpic,
|
|
1318
1328
|
saveScheduleDetailsEpic,
|
|
1329
|
+
saveSkillEpic,
|
|
1319
1330
|
saveSubscriptionNotesUpdatesEpic,
|
|
1320
1331
|
saveSubscriptionUpdatesEpic,
|
|
1321
1332
|
saveTaskDetailEpic,
|
|
@@ -1336,6 +1347,7 @@ const ALL_EPICS = [
|
|
|
1336
1347
|
sendOtpEpic,
|
|
1337
1348
|
sendReferralInviteEpic,
|
|
1338
1349
|
sessionHeartbeatEpic,
|
|
1350
|
+
setSkillVisibilityEpic,
|
|
1339
1351
|
snoozeTaskEpic,
|
|
1340
1352
|
startInvoicingQboBackfillEpic,
|
|
1341
1353
|
statementCloseDayEpic,
|
package/lib/esm/index.js
CHANGED
|
@@ -683,8 +683,8 @@ export { updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccoun
|
|
|
683
683
|
export { getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
|
|
684
684
|
export { cancelAiAccountantOnboarding, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
|
|
685
685
|
export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
|
|
686
|
-
export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, setSession, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, submitFeedback, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
|
|
687
|
-
export { getAiCfoView, getSuggestedQuestionsForPageContext, getSkills, } from './view/aiCfoView/aiCfoViewSelector';
|
|
686
|
+
export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, setSession, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, submitFeedback, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, fetchSkillDetail, clearSkillDetail, clearSkillMutation, deleteSkill, fetchSkillVersionBody, fetchSkillVersions, saveSkill, setSkillVisibility, openSkillsBrowser, closeSkillsBrowser, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
|
|
687
|
+
export { getAiCfoView, getSuggestedQuestionsForPageContext, getSkills, getSkillDetail, getSkillMutation, getSkillVersionBody, getSkillVersions, getSkillsEnabled, } from './view/aiCfoView/aiCfoViewSelector';
|
|
688
688
|
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
|
|
689
689
|
export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, } from './entity/aiCfo/aiCfoSelector';
|
|
690
690
|
export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';
|
|
@@ -763,7 +763,7 @@ export { initializeInvoicingCustomerAddress, resetEditInvoicingCustomerDetailVie
|
|
|
763
763
|
export { INVOICING_CUSTOMER_BILLING_ADDRESS_TYPE, entityToInvoicingCustomerFormLocalData, initialInvoicingCustomerFormLocalData, } from './view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig';
|
|
764
764
|
export { getInvoicingCustomerFormView } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector';
|
|
765
765
|
export { fetchInvoicingSubscriptionFormPage, initializeInvoicingSubscriptionAddress, resetEditInvoicingSubscriptionDetailView, submitInvoicingSubscriptionForm, updateInvoicingSubscriptionFormDraft, } from './view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer';
|
|
766
|
-
export {
|
|
766
|
+
export { INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE, entityToInvoicingSubscriptionFormLocalData, initialInvoicingSubscriptionFormLocalData, invoicingSubscriptionTodayIso, toInvoicingSubscriptionQuantity, } from './view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig';
|
|
767
767
|
export { getEditInvoicingSubscriptionDetailViewState, getInvoicingSubscriptionFormView, } from './view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector';
|
|
768
768
|
export { archiveInvoicingCatalogSubFamily, createInvoicingCatalogSubFamily, resetEditInvoicingCatalogItemDetailView, saveInvoicingCatalogItem, submitInvoicingCatalogItemForm, updateInvoicingCatalogItemFormDraft, } from './view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer';
|
|
769
769
|
export { catalogDetailEditValuesToSavePayload, createSubFamilyFormToPayload, planToCatalogDetailEditValues, productToCreateSubFamilyFormValues, } from './view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload';
|