This type defines the shape of data that is passed back from the MJ API server to callers, typically the MJ Explorer UI

Constructors

Properties

AIMessageConversationDetailId: string

The Conversation Detail ID for the outbound system message that was generated by the Skip API server, stored in the database by the MJ API server, and is being passed back here.

ConversationId: string

The MemberJunction Conversation ID assigned to this conversation. This is used to track the conversation in the database, used for conversation history, and will be generated by the MJ API server if no existing Conversation ID was passed in with the request.

ResponsePhase: SkipResponsePhase

The phase of the conversation, defined in the SkipResponsePhase type

Result: string

Contains the JSON data that is returned from the Skip API server. This can be a SkipAPIAnalysisCompleteResponse, SkipAPIClarifyingQuestionResponse, or SkipAPIDataRequestResponse. To determine which type it is and to access the properties of the response, you will need to typecast this property to the appropriate type. For example:

if (result.ResponsePhase === 'analysis_complete') { // typecast the MJAPISkipResult object Result property const resultData = JSON.parse(result.Result); // now you can access the properties of the SkipAPIAnalysisCompleteResponse type in a strongly typed manner // and do whatever you want to do. }

Status: string

Contains a more detailed status of the API request. This is typically used to provide additional information about the request, such as an error message if the request was not successful

Success: boolean

Indicates if the API request was successful or not, true if successful, false if not

UserMessageConversationDetailId: string

The Conversation Detail ID for the inbound user message that was passed in with the request.