@zeniai/client-epic-state 5.2.26-betaAK0 → 5.2.27
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/aiCfo/aiCfoPayload.d.ts +10 -0
- package/lib/entity/aiCfo/aiCfoReducer.js +42 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +10 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +42 -1
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +5 -0
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +1 -0
- package/lib/esm/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +0 -1
- package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +5 -0
- package/lib/view/aiCfoView/aiCfoViewSelector.js +1 -0
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +7 -0
- package/lib/view/invoicing/couponView/couponViewState.d.ts +2 -2
- package/lib/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +0 -1
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/package.json +1 -1
|
@@ -105,9 +105,19 @@ export interface AiCfoAnswerPayload {
|
|
|
105
105
|
capability_promo?: AiCfoCapabilityPromoPayload | null;
|
|
106
106
|
exports?: AiCfoExportPayload[] | null;
|
|
107
107
|
follow_up_questions?: string[];
|
|
108
|
+
skill_draft?: AiCfoSkillDraftPayload | null;
|
|
108
109
|
suggested_reply?: string | null;
|
|
109
110
|
table?: AiCfoVisualizationPayload | null;
|
|
110
111
|
}
|
|
112
|
+
export interface AiCfoSkillDraftPayload {
|
|
113
|
+
instructions: string;
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string | null;
|
|
116
|
+
display_name?: string | null;
|
|
117
|
+
parameter_hints?: {
|
|
118
|
+
examples?: string[] | null;
|
|
119
|
+
} | null;
|
|
120
|
+
}
|
|
111
121
|
export interface AiCfoCapabilityPromoPayload {
|
|
112
122
|
copy: string;
|
|
113
123
|
id: string;
|
|
@@ -123,6 +123,7 @@ function chatHistoryToQA(history) {
|
|
|
123
123
|
artifactTitle: parsedAgentMessage.artifact_title ?? undefined,
|
|
124
124
|
artifactHostUrl: parsedAgentMessage.artifact_host_url ?? undefined,
|
|
125
125
|
exports: (0, exports.toAiCfoExports)(parsedAgentMessage.exports),
|
|
126
|
+
skillDraft: toSkillDraft(parsedAgentMessage.skill_draft),
|
|
126
127
|
},
|
|
127
128
|
createdAt: (0, zeniDayJS_1.date)(agentMessage.created_at),
|
|
128
129
|
};
|
|
@@ -380,6 +381,45 @@ const AI_CFO_CAPABILITY_PROMO_SURFACES = [
|
|
|
380
381
|
'inline',
|
|
381
382
|
];
|
|
382
383
|
const toAiCfoCapabilityPromoSurface = (value) => AI_CFO_CAPABILITY_PROMO_SURFACES.find((surface) => surface === value);
|
|
384
|
+
const trimmedOrUndefined = (value) => {
|
|
385
|
+
const trimmed = value?.trim() ?? '';
|
|
386
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
387
|
+
};
|
|
388
|
+
const toSkillDraft = (payload) => {
|
|
389
|
+
// Dropped rather than partially built when either required field is missing:
|
|
390
|
+
// a Save control wired to a body the create endpoint would reject is worse
|
|
391
|
+
// than no control, because the failure only surfaces after the click.
|
|
392
|
+
if (payload == null) {
|
|
393
|
+
return undefined;
|
|
394
|
+
}
|
|
395
|
+
// Trimmed to '' FIRST, then chosen by length. Not `??`: a whitespace-only
|
|
396
|
+
// display_name trims to '', which is not nullish, so `??` would keep the
|
|
397
|
+
// empty string and drop a draft that has a perfectly good `name`.
|
|
398
|
+
const rawName = payload.name?.trim() ?? '';
|
|
399
|
+
const rawDisplayName = payload.display_name?.trim() ?? '';
|
|
400
|
+
const name = rawName.length > 0 ? rawName : rawDisplayName;
|
|
401
|
+
const displayName = rawDisplayName.length > 0 ? rawDisplayName : name;
|
|
402
|
+
const instructions = payload.instructions?.trim() ?? '';
|
|
403
|
+
if (name.length === 0 || instructions.length === 0) {
|
|
404
|
+
return undefined;
|
|
405
|
+
}
|
|
406
|
+
const examples = payload.parameter_hints?.examples;
|
|
407
|
+
return {
|
|
408
|
+
// Kept SEPARATE even though the agent currently sends both the same: the
|
|
409
|
+
// create endpoint takes `name` and `display_name` as distinct fields, and
|
|
410
|
+
// collapsing them here would submit the display label as the identifier if
|
|
411
|
+
// they ever diverge.
|
|
412
|
+
name,
|
|
413
|
+
displayName,
|
|
414
|
+
instructions,
|
|
415
|
+
// An empty description is ABSENT, matching the way blank parameter hints
|
|
416
|
+
// are dropped below — `?? undefined` would store ''.
|
|
417
|
+
description: trimmedOrUndefined(payload.description),
|
|
418
|
+
parameterHints: Array.isArray(examples)
|
|
419
|
+
? examples.filter((hint) => typeof hint === 'string' && hint.trim().length > 0)
|
|
420
|
+
: undefined,
|
|
421
|
+
};
|
|
422
|
+
};
|
|
383
423
|
const toCapabilityPromo = (payload) => {
|
|
384
424
|
// Runtime payloads can miss fields regardless of the wire type — drop the
|
|
385
425
|
// promo on a missing/empty id or copy, and narrow surface to the union.
|
|
@@ -405,7 +445,7 @@ const toCapabilityPromoCta = (payload) => {
|
|
|
405
445
|
return { label: payload.label, prefill: payload.prefill };
|
|
406
446
|
};
|
|
407
447
|
const toResponseBlockType = (answer, userId) => {
|
|
408
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, } = answer;
|
|
448
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, skill_draft, } = answer;
|
|
409
449
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
410
450
|
return {
|
|
411
451
|
messageId: message_id,
|
|
@@ -429,6 +469,7 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
429
469
|
artifactTitle: artifact_title ?? undefined,
|
|
430
470
|
artifactHostUrl: artifact_host_url ?? undefined,
|
|
431
471
|
exports: (0, exports.toAiCfoExports)(exports),
|
|
472
|
+
skillDraft: toSkillDraft(skill_draft),
|
|
432
473
|
},
|
|
433
474
|
createdAt: (0, zeniDayJS_1.date)(timestamp),
|
|
434
475
|
};
|
|
@@ -172,6 +172,14 @@ export interface AiCfoExport {
|
|
|
172
172
|
name: string;
|
|
173
173
|
sizeBytes?: number;
|
|
174
174
|
}
|
|
175
|
+
/** The body the Save to Skill control POSTs to /1.0/skills. */
|
|
176
|
+
export interface AiCfoSkillDraft {
|
|
177
|
+
displayName: string;
|
|
178
|
+
instructions: string;
|
|
179
|
+
name: string;
|
|
180
|
+
description?: string;
|
|
181
|
+
parameterHints?: string[];
|
|
182
|
+
}
|
|
175
183
|
export interface AnswerContentBlockBase {
|
|
176
184
|
assumptions: string;
|
|
177
185
|
chainOfThoughtActionSteps: string[];
|
|
@@ -184,6 +192,8 @@ export interface AnswerContentBlockBase {
|
|
|
184
192
|
/** Feature-discovery promo (banner surface): dismissible hint bar above the composer. */
|
|
185
193
|
capabilityPromo?: AiCfoCapabilityPromo;
|
|
186
194
|
exports?: AiCfoExport[];
|
|
195
|
+
/** Unsaved skill body from a `/create-skill` turn; drives the Save to Skill control. */
|
|
196
|
+
skillDraft?: AiCfoSkillDraft;
|
|
187
197
|
suggestedReply?: string;
|
|
188
198
|
summarizedTitle?: string;
|
|
189
199
|
table?: AiCfoVisualization;
|
|
@@ -119,6 +119,7 @@ function chatHistoryToQA(history) {
|
|
|
119
119
|
artifactTitle: parsedAgentMessage.artifact_title ?? undefined,
|
|
120
120
|
artifactHostUrl: parsedAgentMessage.artifact_host_url ?? undefined,
|
|
121
121
|
exports: toAiCfoExports(parsedAgentMessage.exports),
|
|
122
|
+
skillDraft: toSkillDraft(parsedAgentMessage.skill_draft),
|
|
122
123
|
},
|
|
123
124
|
createdAt: zeniDate(agentMessage.created_at),
|
|
124
125
|
};
|
|
@@ -374,6 +375,45 @@ const AI_CFO_CAPABILITY_PROMO_SURFACES = [
|
|
|
374
375
|
'inline',
|
|
375
376
|
];
|
|
376
377
|
const toAiCfoCapabilityPromoSurface = (value) => AI_CFO_CAPABILITY_PROMO_SURFACES.find((surface) => surface === value);
|
|
378
|
+
const trimmedOrUndefined = (value) => {
|
|
379
|
+
const trimmed = value?.trim() ?? '';
|
|
380
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
381
|
+
};
|
|
382
|
+
const toSkillDraft = (payload) => {
|
|
383
|
+
// Dropped rather than partially built when either required field is missing:
|
|
384
|
+
// a Save control wired to a body the create endpoint would reject is worse
|
|
385
|
+
// than no control, because the failure only surfaces after the click.
|
|
386
|
+
if (payload == null) {
|
|
387
|
+
return undefined;
|
|
388
|
+
}
|
|
389
|
+
// Trimmed to '' FIRST, then chosen by length. Not `??`: a whitespace-only
|
|
390
|
+
// display_name trims to '', which is not nullish, so `??` would keep the
|
|
391
|
+
// empty string and drop a draft that has a perfectly good `name`.
|
|
392
|
+
const rawName = payload.name?.trim() ?? '';
|
|
393
|
+
const rawDisplayName = payload.display_name?.trim() ?? '';
|
|
394
|
+
const name = rawName.length > 0 ? rawName : rawDisplayName;
|
|
395
|
+
const displayName = rawDisplayName.length > 0 ? rawDisplayName : name;
|
|
396
|
+
const instructions = payload.instructions?.trim() ?? '';
|
|
397
|
+
if (name.length === 0 || instructions.length === 0) {
|
|
398
|
+
return undefined;
|
|
399
|
+
}
|
|
400
|
+
const examples = payload.parameter_hints?.examples;
|
|
401
|
+
return {
|
|
402
|
+
// Kept SEPARATE even though the agent currently sends both the same: the
|
|
403
|
+
// create endpoint takes `name` and `display_name` as distinct fields, and
|
|
404
|
+
// collapsing them here would submit the display label as the identifier if
|
|
405
|
+
// they ever diverge.
|
|
406
|
+
name,
|
|
407
|
+
displayName,
|
|
408
|
+
instructions,
|
|
409
|
+
// An empty description is ABSENT, matching the way blank parameter hints
|
|
410
|
+
// are dropped below — `?? undefined` would store ''.
|
|
411
|
+
description: trimmedOrUndefined(payload.description),
|
|
412
|
+
parameterHints: Array.isArray(examples)
|
|
413
|
+
? examples.filter((hint) => typeof hint === 'string' && hint.trim().length > 0)
|
|
414
|
+
: undefined,
|
|
415
|
+
};
|
|
416
|
+
};
|
|
377
417
|
const toCapabilityPromo = (payload) => {
|
|
378
418
|
// Runtime payloads can miss fields regardless of the wire type — drop the
|
|
379
419
|
// promo on a missing/empty id or copy, and narrow surface to the union.
|
|
@@ -399,7 +439,7 @@ const toCapabilityPromoCta = (payload) => {
|
|
|
399
439
|
return { label: payload.label, prefill: payload.prefill };
|
|
400
440
|
};
|
|
401
441
|
const toResponseBlockType = (answer, userId) => {
|
|
402
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, } = answer;
|
|
442
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, skill_draft, } = answer;
|
|
403
443
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
404
444
|
return {
|
|
405
445
|
messageId: message_id,
|
|
@@ -423,6 +463,7 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
423
463
|
artifactTitle: artifact_title ?? undefined,
|
|
424
464
|
artifactHostUrl: artifact_host_url ?? undefined,
|
|
425
465
|
exports: toAiCfoExports(exports),
|
|
466
|
+
skillDraft: toSkillDraft(skill_draft),
|
|
426
467
|
},
|
|
427
468
|
createdAt: zeniDate(timestamp),
|
|
428
469
|
};
|
|
@@ -58,6 +58,7 @@ export const initialAiCfoViewState = {
|
|
|
58
58
|
fetchState: 'Not-Started',
|
|
59
59
|
error: undefined,
|
|
60
60
|
savedMacroId: undefined,
|
|
61
|
+
kind: undefined,
|
|
61
62
|
},
|
|
62
63
|
skillVersionBody: {
|
|
63
64
|
fetchState: 'Not-Started',
|
|
@@ -777,6 +778,7 @@ const aiCfoView = createSlice({
|
|
|
777
778
|
fetchState: 'In-Progress',
|
|
778
779
|
error: undefined,
|
|
779
780
|
savedMacroId: undefined,
|
|
781
|
+
kind: 'save',
|
|
780
782
|
};
|
|
781
783
|
},
|
|
782
784
|
prepare(payload) {
|
|
@@ -828,6 +830,7 @@ const aiCfoView = createSlice({
|
|
|
828
830
|
fetchState: 'In-Progress',
|
|
829
831
|
error: undefined,
|
|
830
832
|
savedMacroId: undefined,
|
|
833
|
+
kind: 'visibility',
|
|
831
834
|
};
|
|
832
835
|
},
|
|
833
836
|
prepare(payload) {
|
|
@@ -863,6 +866,7 @@ const aiCfoView = createSlice({
|
|
|
863
866
|
fetchState: 'In-Progress',
|
|
864
867
|
error: undefined,
|
|
865
868
|
savedMacroId: undefined,
|
|
869
|
+
kind: 'delete',
|
|
866
870
|
};
|
|
867
871
|
},
|
|
868
872
|
prepare(payload) {
|
|
@@ -891,6 +895,7 @@ const aiCfoView = createSlice({
|
|
|
891
895
|
fetchState: 'Not-Started',
|
|
892
896
|
error: undefined,
|
|
893
897
|
savedMacroId: undefined,
|
|
898
|
+
kind: undefined,
|
|
894
899
|
};
|
|
895
900
|
},
|
|
896
901
|
openSkillsBrowser(draft) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
2
|
export const ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
3
|
-
'
|
|
4
|
-
'
|
|
3
|
+
'coupon_id',
|
|
4
|
+
'name',
|
|
5
5
|
'discount',
|
|
6
6
|
'duration',
|
|
7
7
|
'created',
|
|
@@ -12,8 +12,8 @@ export const ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
|
12
12
|
];
|
|
13
13
|
export const toInvoicingCouponSortKey = (v) => stringToUnion(v, ALL_INVOICING_COUPON_SORT_KEYS);
|
|
14
14
|
export const INVOICING_COUPON_COLUMNS = [
|
|
15
|
-
{ key: '
|
|
16
|
-
{ key: '
|
|
15
|
+
{ key: 'coupon_id', sortable: true },
|
|
16
|
+
{ key: 'name', sortable: true },
|
|
17
17
|
{ key: 'discount', sortable: false },
|
|
18
18
|
{ key: 'duration', sortable: true },
|
|
19
19
|
{ key: 'created', sortable: true },
|
|
@@ -25,7 +25,6 @@ export const getInvoicingCatalogListView = createSelector((state) => state.invoi
|
|
|
25
25
|
countsFetchState: listViewState.countsFetchState,
|
|
26
26
|
planFilters: listViewState.planFilters,
|
|
27
27
|
planNextCursor: listViewState.planNextCursor,
|
|
28
|
-
planSort: listViewState.planSort,
|
|
29
28
|
productFilters: listViewState.productFilters,
|
|
30
29
|
productNextCursor: listViewState.productNextCursor,
|
|
31
30
|
productFetchState: listViewState.productFetchState,
|
|
@@ -3,16 +3,16 @@ export const ALL_INVOICING_CUSTOMER_SORT_KEYS = [
|
|
|
3
3
|
'name',
|
|
4
4
|
'email',
|
|
5
5
|
'billingAddress',
|
|
6
|
-
'
|
|
6
|
+
'cardStatus',
|
|
7
7
|
'autoCollect',
|
|
8
8
|
'status',
|
|
9
9
|
];
|
|
10
10
|
export const toInvoicingCustomerSortKey = (v) => stringToUnion(v, ALL_INVOICING_CUSTOMER_SORT_KEYS);
|
|
11
11
|
export const INVOICING_CUSTOMER_COLUMNS = [
|
|
12
|
-
{ key: 'name', sortable:
|
|
12
|
+
{ key: 'name', sortable: true },
|
|
13
13
|
{ key: 'email', sortable: true },
|
|
14
14
|
{ key: 'billingAddress', sortable: false },
|
|
15
|
-
{ key: '
|
|
15
|
+
{ key: 'cardStatus', sortable: true },
|
|
16
16
|
{ key: 'autoCollect', sortable: true },
|
|
17
17
|
{ key: 'status', sortable: true },
|
|
18
18
|
];
|
package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -3,8 +3,8 @@ export const ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
|
|
|
3
3
|
'customer',
|
|
4
4
|
'invoice',
|
|
5
5
|
'attempts',
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'nextRetry',
|
|
7
|
+
'daysPastDue',
|
|
8
8
|
'failureReason',
|
|
9
9
|
'status',
|
|
10
10
|
'amount',
|
|
@@ -14,8 +14,8 @@ export const INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
14
14
|
{ key: 'customer', sortable: true },
|
|
15
15
|
{ key: 'invoice', sortable: true },
|
|
16
16
|
{ key: 'attempts', sortable: true },
|
|
17
|
-
{ key: '
|
|
18
|
-
{ key: '
|
|
17
|
+
{ key: 'nextRetry', sortable: true },
|
|
18
|
+
{ key: 'daysPastDue', sortable: true },
|
|
19
19
|
{ key: 'failureReason', sortable: false },
|
|
20
20
|
{ key: 'status', sortable: true },
|
|
21
21
|
{ key: 'amount', sortable: true },
|
package/lib/index.d.ts
CHANGED
|
@@ -984,7 +984,7 @@ export { AiCfoViewSelector, getAiCfoView, getSuggestedQuestionsForPageContext, g
|
|
|
984
984
|
export { MessagePayload, ChatSessionPayload, AiCfoAnswerPayload, } from './entity/aiCfo/aiCfoPayload';
|
|
985
985
|
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
|
|
986
986
|
export { AiCfoSelectorView, getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, ChatSessionWithOrderedQuestionAnswers, } from './entity/aiCfo/aiCfoSelector';
|
|
987
|
-
export { AiCfoQuestionWithAnswer, AiCfoAnswerParagraph, AiCfoAnswerStateType, AiCfoChartType, AiCfoAnswerResponseType, TableVisualization, ChartVisualization, CardNameOption, CardsCardKind, CardsCreationInitialData, CardPolicyDraftPolicy, CardPolicyDraftPolicyEntity, CardPolicyInitialData, CardPolicySpendLimits, CardPolicyStep5Review, CardPolicyUploadSource, CardPolicyWizardPlan, InteractiveFormType, InteractiveFormVisualization, AiCfoCapabilityPromo, AiCfoCapabilityPromoCta, AiCfoCapabilityPromoSurface, AiCfoExport, AiCfoVisualization, AiCfoVisualizationType, AiCfoState, ChatSession, 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, ChatSessionWithMessages, ResponseBlockBase, AnswerContentBlockBase, FileAttachmentMetadata, QuestionContentBlockBase, ResponseBlockType, SyntheticAiCfoAnswer, SyntheticAiCfoAnswerKind, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, MessageSender, MessageType, } from './entity/aiCfo/aiCfoState';
|
|
987
|
+
export { AiCfoQuestionWithAnswer, AiCfoAnswerParagraph, AiCfoAnswerStateType, AiCfoChartType, AiCfoAnswerResponseType, TableVisualization, ChartVisualization, CardNameOption, CardsCardKind, CardsCreationInitialData, CardPolicyDraftPolicy, CardPolicyDraftPolicyEntity, CardPolicyInitialData, CardPolicySpendLimits, CardPolicyStep5Review, CardPolicyUploadSource, CardPolicyWizardPlan, InteractiveFormType, InteractiveFormVisualization, AiCfoCapabilityPromo, AiCfoCapabilityPromoCta, AiCfoCapabilityPromoSurface, AiCfoExport, AiCfoVisualization, AiCfoVisualizationType, AiCfoState, ChatSession, 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, ChatSessionWithMessages, ResponseBlockBase, AiCfoSkillDraft, AnswerContentBlockBase, FileAttachmentMetadata, QuestionContentBlockBase, ResponseBlockType, SyntheticAiCfoAnswer, SyntheticAiCfoAnswerKind, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, MessageSender, MessageType, } from './entity/aiCfo/aiCfoState';
|
|
988
988
|
export { clearPolicyDocumentExtraction, extractPolicyDocument, fetchCardPolicyMccCategories, fetchCardPolicyRecommendationFromUpload, fetchCardPolicyVendorOptions, removeCardPolicyTemplate, updateCardPolicyMccCategories, updateCardPolicyMccCategoriesFailure, updateCardPolicyStats, updateCardPolicyTemplates, updateCardPolicyVendorOptions, updateCardPolicyVendorOptionsFailure, updateCreatedCardPolicyTemplate, updatePolicyDocumentExtractionFailure, updatePolicyDocumentExtractionSuccess, updatePolicyRecommendationFromUploadFailure, updatePolicyRecommendationFromUploadSuccess, } from './entity/cardPolicy/cardPolicyReducer';
|
|
989
989
|
export { getAllCardPolicyTemplates, getCardPolicyMccCategories, getCardPolicyMccCategoriesError, getCardPolicyMccCategoriesFetchState, getCardPolicyStats, getCardPolicySuggestedAllowCategories, getCardPolicySuggestedAllowMerchants, getCardPolicySuggestedBlockCategories, getCardPolicySuggestedBlockMerchants, getCardPolicyTemplateById, getCardPolicyTemplatesByIds, getCardPolicyVendorSearchFetchState, getCardPolicyVendorSearchOptions, getCardPolicyVendorSearchString, getExtractedCardPolicyRules, getPolicyDocumentExtractionError, getPolicyDocumentExtractionFetchState, getPolicyRecommendationFromUploadAnswerId, getPolicyRecommendationFromUploadChatSessionId, getPolicyRecommendationFromUploadError, getPolicyRecommendationFromUploadFetchState, getUploadedPolicyDocumentFileName, } from './entity/cardPolicy/cardPolicySelector';
|
|
990
990
|
export { ALL_CARD_POLICY_TEMPLATE_MODES, ALL_CARD_POLICY_TEMPLATE_STATUSES, CardPolicyState, CardPolicyStats, CardPolicyTemplate, CardPolicyTemplateEntityList, CardPolicyTemplateMode, CardPolicyTemplateSpendLimits, CardPolicyTemplateStatus, CardPolicyVendorSearchEntry, CardPolicyVendorSearchState, ExtractedCardPolicyRules, MccCategory, PolicyDocumentExtractionState, PolicyRecommendationFromUploadState, toCardPolicyTemplateMode, toCardPolicyTemplateStatus, } from './entity/cardPolicy/cardPolicyState';
|
|
@@ -63,6 +63,7 @@ exports.initialAiCfoViewState = {
|
|
|
63
63
|
fetchState: 'Not-Started',
|
|
64
64
|
error: undefined,
|
|
65
65
|
savedMacroId: undefined,
|
|
66
|
+
kind: undefined,
|
|
66
67
|
},
|
|
67
68
|
skillVersionBody: {
|
|
68
69
|
fetchState: 'Not-Started',
|
|
@@ -782,6 +783,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
782
783
|
fetchState: 'In-Progress',
|
|
783
784
|
error: undefined,
|
|
784
785
|
savedMacroId: undefined,
|
|
786
|
+
kind: 'save',
|
|
785
787
|
};
|
|
786
788
|
},
|
|
787
789
|
prepare(payload) {
|
|
@@ -833,6 +835,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
833
835
|
fetchState: 'In-Progress',
|
|
834
836
|
error: undefined,
|
|
835
837
|
savedMacroId: undefined,
|
|
838
|
+
kind: 'visibility',
|
|
836
839
|
};
|
|
837
840
|
},
|
|
838
841
|
prepare(payload) {
|
|
@@ -868,6 +871,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
868
871
|
fetchState: 'In-Progress',
|
|
869
872
|
error: undefined,
|
|
870
873
|
savedMacroId: undefined,
|
|
874
|
+
kind: 'delete',
|
|
871
875
|
};
|
|
872
876
|
},
|
|
873
877
|
prepare(payload) {
|
|
@@ -896,6 +900,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
896
900
|
fetchState: 'Not-Started',
|
|
897
901
|
error: undefined,
|
|
898
902
|
savedMacroId: undefined,
|
|
903
|
+
kind: undefined,
|
|
899
904
|
};
|
|
900
905
|
},
|
|
901
906
|
openSkillsBrowser(draft) {
|
|
@@ -177,6 +177,13 @@ export interface SkillVersionsState extends FetchStateAndError {
|
|
|
177
177
|
* without the prompt it is editing disappearing underneath.
|
|
178
178
|
*/
|
|
179
179
|
export interface SkillMutationState extends FetchStateAndError {
|
|
180
|
+
/**
|
|
181
|
+
* WHICH mutation this slice is reporting. Save, delete and visibility all share
|
|
182
|
+
* it — safe while both consumers lived inside the Skills browser, which renders
|
|
183
|
+
* one at a time. A chat draft card stays mounted independently, so without this
|
|
184
|
+
* an unrelated delete drives its Save control through "Saving…" to "Saved".
|
|
185
|
+
*/
|
|
186
|
+
kind: 'save' | 'delete' | 'visibility' | undefined;
|
|
180
187
|
/**
|
|
181
188
|
* The skill the last successful save produced, so the caller can select it without
|
|
182
189
|
* refetching the list. Undefined until a save succeeds.
|
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingCouponFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_COUPON_SORT_KEYS: readonly ["
|
|
8
|
-
export declare const toInvoicingCouponSortKey: (v: string) => "
|
|
7
|
+
export declare const ALL_INVOICING_COUPON_SORT_KEYS: readonly ["coupon_id", "name", "discount", "duration", "created", "valid_till", "apply_on", "status", "redemptions"];
|
|
8
|
+
export declare const toInvoicingCouponSortKey: (v: string) => "status" | "name" | "discount" | "coupon_id" | "duration" | "created" | "valid_till" | "apply_on" | "redemptions";
|
|
9
9
|
export type InvoicingCouponSortKey = ReturnType<typeof toInvoicingCouponSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the discounts-list column set,
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toInvoicingCouponTabId = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.INVOICING_COUPON_COLUMNS = exports.toInvoicingCouponSortKey = exports.ALL_INVOICING_COUPON_SORT_KEYS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'coupon_id',
|
|
7
|
+
'name',
|
|
8
8
|
'discount',
|
|
9
9
|
'duration',
|
|
10
10
|
'created',
|
|
@@ -16,8 +16,8 @@ exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
|
16
16
|
const toInvoicingCouponSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_COUPON_SORT_KEYS);
|
|
17
17
|
exports.toInvoicingCouponSortKey = toInvoicingCouponSortKey;
|
|
18
18
|
exports.INVOICING_COUPON_COLUMNS = [
|
|
19
|
-
{ key: '
|
|
20
|
-
{ key: '
|
|
19
|
+
{ key: 'coupon_id', sortable: true },
|
|
20
|
+
{ key: 'name', sortable: true },
|
|
21
21
|
{ key: 'discount', sortable: false },
|
|
22
22
|
{ key: 'duration', sortable: true },
|
|
23
23
|
{ key: 'created', sortable: true },
|
|
@@ -19,7 +19,6 @@ export interface InvoicingCatalogListView extends SelectorView {
|
|
|
19
19
|
productFilters: InvoicingCatalogProductFilters;
|
|
20
20
|
productNextCursor: string | null;
|
|
21
21
|
products: InvoicingPlan[];
|
|
22
|
-
planSort?: InvoicingListSort;
|
|
23
22
|
productSort?: InvoicingListSort;
|
|
24
23
|
}
|
|
25
24
|
export declare const getInvoicingCatalogPrices: (items: InvoicingPlan[]) => InvoicingProduct[];
|
|
@@ -29,7 +29,6 @@ exports.getInvoicingCatalogListView = (0, toolkit_1.createSelector)((state) => s
|
|
|
29
29
|
countsFetchState: listViewState.countsFetchState,
|
|
30
30
|
planFilters: listViewState.planFilters,
|
|
31
31
|
planNextCursor: listViewState.planNextCursor,
|
|
32
|
-
planSort: listViewState.planSort,
|
|
33
32
|
productFilters: listViewState.productFilters,
|
|
34
33
|
productNextCursor: listViewState.productNextCursor,
|
|
35
34
|
productFetchState: listViewState.productFetchState,
|
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingCustomerFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "
|
|
8
|
-
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "
|
|
7
|
+
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "cardStatus", "autoCollect", "status"];
|
|
8
|
+
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "email" | "billingAddress" | "cardStatus" | "autoCollect";
|
|
9
9
|
export type InvoicingCustomerSortKey = ReturnType<typeof toInvoicingCustomerSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the customer-list column set,
|
|
@@ -6,17 +6,17 @@ exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = [
|
|
|
6
6
|
'name',
|
|
7
7
|
'email',
|
|
8
8
|
'billingAddress',
|
|
9
|
-
'
|
|
9
|
+
'cardStatus',
|
|
10
10
|
'autoCollect',
|
|
11
11
|
'status',
|
|
12
12
|
];
|
|
13
13
|
const toInvoicingCustomerSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_CUSTOMER_SORT_KEYS);
|
|
14
14
|
exports.toInvoicingCustomerSortKey = toInvoicingCustomerSortKey;
|
|
15
15
|
exports.INVOICING_CUSTOMER_COLUMNS = [
|
|
16
|
-
{ key: 'name', sortable:
|
|
16
|
+
{ key: 'name', sortable: true },
|
|
17
17
|
{ key: 'email', sortable: true },
|
|
18
18
|
{ key: 'billingAddress', sortable: false },
|
|
19
|
-
{ key: '
|
|
19
|
+
{ key: 'cardStatus', sortable: true },
|
|
20
20
|
{ key: 'autoCollect', sortable: true },
|
|
21
21
|
{ key: 'status', sortable: true },
|
|
22
22
|
];
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingDunningCaseFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "
|
|
8
|
-
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "
|
|
7
|
+
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "nextRetry", "daysPastDue", "failureReason", "status", "amount"];
|
|
8
|
+
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "daysPastDue" | "attempts" | "nextRetry" | "failureReason";
|
|
9
9
|
export type InvoicingDunningCaseSortKey = ReturnType<typeof toInvoicingDunningCaseSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the dunning-list column set,
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -6,8 +6,8 @@ exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
|
|
|
6
6
|
'customer',
|
|
7
7
|
'invoice',
|
|
8
8
|
'attempts',
|
|
9
|
-
'
|
|
10
|
-
'
|
|
9
|
+
'nextRetry',
|
|
10
|
+
'daysPastDue',
|
|
11
11
|
'failureReason',
|
|
12
12
|
'status',
|
|
13
13
|
'amount',
|
|
@@ -18,8 +18,8 @@ exports.INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
18
18
|
{ key: 'customer', sortable: true },
|
|
19
19
|
{ key: 'invoice', sortable: true },
|
|
20
20
|
{ key: 'attempts', sortable: true },
|
|
21
|
-
{ key: '
|
|
22
|
-
{ key: '
|
|
21
|
+
{ key: 'nextRetry', sortable: true },
|
|
22
|
+
{ key: 'daysPastDue', sortable: true },
|
|
23
23
|
{ key: 'failureReason', sortable: false },
|
|
24
24
|
{ key: 'status', sortable: true },
|
|
25
25
|
{ key: 'amount', sortable: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.27",
|
|
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",
|