@zealicsolutions/web-ui 1.0.140-beta.193 → 1.0.140-beta.194
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/dist/cjs/contexts/WebpageContext/WebpageContext.d.ts +37 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContext.d.ts +37 -0
- package/dist/esm/contexts/WebpageContext/WebpageContext.js.map +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js.map +1 -1
- package/dist/esm/molecules/Button/hooks/useButtonAction.js +1 -1
- package/dist/esm/molecules/Button/hooks/useButtonAction.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,31 @@ export type CortexRwoContextType = {
|
|
|
17
17
|
/** Input parameters from form fields for multi-parameter actions */
|
|
18
18
|
inputParams?: Record<string, unknown>;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Context parameter mapping - maps agent contextKey to a source field
|
|
22
|
+
*/
|
|
23
|
+
export type CortexContextParamMapping = {
|
|
24
|
+
/** The agent's required context key (e.g., "studyId") */
|
|
25
|
+
contextKey: string;
|
|
26
|
+
/** The source type (currently only "webpage" is supported) */
|
|
27
|
+
contextSource: 'webpage';
|
|
28
|
+
/** The source field to get the value from (e.g., "primaryRwoId") */
|
|
29
|
+
contextSourceField: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Cortex configuration for webpage-level AI support
|
|
33
|
+
* This structure is stored in webpage.config.cortexConfig
|
|
34
|
+
*/
|
|
35
|
+
export type CortexConfig = {
|
|
36
|
+
/** The Cortex agent ID to use for this webpage */
|
|
37
|
+
cortexAgentId?: string;
|
|
38
|
+
/** Whether AI support is enabled for this webpage */
|
|
39
|
+
withAISupport?: boolean;
|
|
40
|
+
/** Context parameter mapping configuration */
|
|
41
|
+
contextMapping?: {
|
|
42
|
+
contextParams: CortexContextParamMapping[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
20
45
|
export type OpenAIChatOptions = {
|
|
21
46
|
/** Optional override for cortexAgentId */
|
|
22
47
|
cortexAgentId?: string;
|
|
@@ -25,12 +50,24 @@ export type OpenAIChatOptions = {
|
|
|
25
50
|
* This is populated by the button action based on sourceDataModelFieldId.
|
|
26
51
|
*/
|
|
27
52
|
cortexRwoContext?: CortexRwoContextType;
|
|
53
|
+
/**
|
|
54
|
+
* Input parameters resolved from the button's organism context.
|
|
55
|
+
* These are merged with webpage-level context in CortexProvider.
|
|
56
|
+
*/
|
|
57
|
+
inputParams?: Record<string, unknown>;
|
|
28
58
|
};
|
|
29
59
|
export type WebpageContextType = {
|
|
30
60
|
webpageId?: string;
|
|
31
61
|
webpageName?: string;
|
|
62
|
+
/** @deprecated Use cortexConfig.withAISupport instead */
|
|
32
63
|
withAISupport?: boolean;
|
|
64
|
+
/** @deprecated Use cortexConfig.cortexAgentId instead */
|
|
33
65
|
cortexAgentId?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Cortex configuration including agent ID, AI support flag, and context mapping.
|
|
68
|
+
* This is the new structure that replaces legacy withAISupport and cortexAgentId.
|
|
69
|
+
*/
|
|
70
|
+
cortexConfig?: CortexConfig;
|
|
34
71
|
/**
|
|
35
72
|
* Current RWO context for the webpage.
|
|
36
73
|
* Includes rwoRecordId from URL when present.
|