@memberjunction/skip-types 2.44.0 → 2.45.0
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/agent-types.d.ts +251 -0
- package/dist/agent-types.d.ts.map +1 -0
- package/dist/agent-types.js +76 -0
- package/dist/agent-types.js.map +1 -0
- package/dist/api-types.d.ts +212 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api-types.js +80 -0
- package/dist/api-types.js.map +1 -0
- package/dist/artifact-types.d.ts +142 -0
- package/dist/artifact-types.d.ts.map +1 -0
- package/dist/artifact-types.js +26 -0
- package/dist/artifact-types.js.map +1 -0
- package/dist/auth-types.d.ts +39 -0
- package/dist/auth-types.d.ts.map +1 -0
- package/dist/auth-types.js +32 -0
- package/dist/auth-types.js.map +1 -0
- package/dist/component-types.d.ts +355 -0
- package/dist/component-types.d.ts.map +1 -0
- package/dist/component-types.js +28 -0
- package/dist/component-types.js.map +1 -0
- package/dist/conversation-types.d.ts +141 -0
- package/dist/conversation-types.d.ts.map +1 -0
- package/dist/conversation-types.js +46 -0
- package/dist/conversation-types.js.map +1 -0
- package/dist/entity-metadata-types.d.ts +125 -0
- package/dist/entity-metadata-types.d.ts.map +1 -0
- package/dist/entity-metadata-types.js +78 -0
- package/dist/entity-metadata-types.js.map +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/query-types.d.ts +107 -0
- package/dist/query-types.d.ts.map +1 -0
- package/dist/query-types.js +65 -0
- package/dist/query-types.js.map +1 -0
- package/dist/response-types.d.ts +156 -0
- package/dist/response-types.d.ts.map +1 -0
- package/dist/response-types.js +63 -0
- package/dist/response-types.js.map +1 -0
- package/dist/shared.d.ts +44 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +3 -0
- package/dist/shared.js.map +1 -0
- package/dist/types.d.ts +31 -1057
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +45 -211
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +68 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +201 -0
- package/dist/util.js.map +1 -0
- package/package.json +3 -3
- package/readme.md +19 -19
package/readme.md
CHANGED
|
@@ -22,7 +22,7 @@ Types used for making requests to the Skip API:
|
|
|
22
22
|
- `SkipAPIRequestAPIKey` - API key configuration for LLM vendors
|
|
23
23
|
- `SkipAPIRunScriptRequest` - Request to run an existing script
|
|
24
24
|
- `SkipRequestPhase` - Defines the different phases of Skip requests:
|
|
25
|
-
- `initial_request` - Starting a new conversation or after
|
|
25
|
+
- `initial_request` - Starting a new conversation or after component creation
|
|
26
26
|
- `clarify_question_response` - Responding to Skip's clarifying questions
|
|
27
27
|
- `data_gathering_response` - Returning requested data to Skip
|
|
28
28
|
- `data_gathering_failure` - Reporting data gathering errors
|
|
@@ -51,20 +51,20 @@ Types used for handling responses from the Skip API:
|
|
|
51
51
|
- Includes id, name, userId, messages array
|
|
52
52
|
- Optional: description, artifacts
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### Component Types
|
|
55
55
|
|
|
56
|
-
Types for Skip-generated
|
|
56
|
+
Types for Skip-generated components and visualizations:
|
|
57
57
|
|
|
58
|
-
- `
|
|
59
|
-
- `
|
|
58
|
+
- `SkipComponent` - Component generated by Skip
|
|
59
|
+
- `SkipComponentCallbacks` - Interface for callbacks from components:
|
|
60
60
|
- `RefreshData()` - Refresh the data context
|
|
61
61
|
- `OpenEntityRecord(entityName, key)` - Open a specific record
|
|
62
62
|
- `UpdateUserState(userState)` - Update user-specific state
|
|
63
63
|
- `NotifyEvent(eventName, eventData)` - Send custom events
|
|
64
|
-
- `
|
|
65
|
-
- `
|
|
66
|
-
- `
|
|
67
|
-
- `SimpleDataContext` - Simplified data context for
|
|
64
|
+
- `SkipComponentInitFunction` - Initialization function for components
|
|
65
|
+
- `SkipComponentObject` - Interface exposed by components
|
|
66
|
+
- `SkipComponentOption` - Alternative component options
|
|
67
|
+
- `SimpleDataContext` - Simplified data context for components
|
|
68
68
|
|
|
69
69
|
### Learning Cycle Types
|
|
70
70
|
|
|
@@ -96,7 +96,7 @@ Types for Skip-generated reports and visualizations:
|
|
|
96
96
|
|
|
97
97
|
- `SkipAPIAnalysisCompleteResponse` - Response for completed analysis
|
|
98
98
|
- Includes dataContext, resultType, executionResults
|
|
99
|
-
- Optional:
|
|
99
|
+
- Optional: component, drillDown, scriptText, newDataItems
|
|
100
100
|
- `SkipAPIClarifyingQuestionResponse` - Response when Skip needs clarification
|
|
101
101
|
- `SkipAPIDataRequestResponse` - Response when Skip needs more data
|
|
102
102
|
- `SkipAPIChatWithRecordResponse` - Response for chat-with-record feature
|
|
@@ -172,8 +172,8 @@ function handleSkipResponse(result: MJAPISkipResult) {
|
|
|
172
172
|
// Handle plot data from executionResults.plotData
|
|
173
173
|
renderPlot(response.executionResults.plotData);
|
|
174
174
|
} else if (response.resultType === "html") {
|
|
175
|
-
// Handle custom
|
|
176
|
-
|
|
175
|
+
// Handle custom component
|
|
176
|
+
renderComponent(response.component);
|
|
177
177
|
}
|
|
178
178
|
} else if (result.ResponsePhase === SkipResponsePhase.clarifying_question) {
|
|
179
179
|
// Handle clarifying questions
|
|
@@ -190,22 +190,22 @@ function handleSkipResponse(result: MJAPISkipResult) {
|
|
|
190
190
|
}
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
### Working with Skip
|
|
193
|
+
### Working with Skip Components and Callbacks
|
|
194
194
|
|
|
195
195
|
```typescript
|
|
196
196
|
import {
|
|
197
|
-
|
|
197
|
+
SkipComponentInitFunction,
|
|
198
198
|
SimpleDataContext,
|
|
199
|
-
|
|
199
|
+
SkipComponentCallbacks
|
|
200
200
|
} from '@memberjunction/skip-types';
|
|
201
201
|
|
|
202
202
|
// Init function that would be called by the container application
|
|
203
|
-
const
|
|
203
|
+
const initComponent: SkipComponentInitFunction = (
|
|
204
204
|
data: SimpleDataContext,
|
|
205
205
|
userState?: any,
|
|
206
|
-
callbacks?:
|
|
206
|
+
callbacks?: SkipComponentCallbacks
|
|
207
207
|
) => {
|
|
208
|
-
// Initialize the
|
|
208
|
+
// Initialize the component with the data
|
|
209
209
|
renderChart(data.data_item_1);
|
|
210
210
|
|
|
211
211
|
// Set up event handlers that use callbacks
|
|
@@ -223,7 +223,7 @@ const initReport: SkipHTMLReportInitFunction = (
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
// Register the init function globally so it can be called from the container
|
|
226
|
-
window.
|
|
226
|
+
window.initSkipComponent = initComponent;
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
### Working with Learning Cycles
|