@memberjunction/skip-types 0.9.7 → 0.9.9
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/types.d.ts +47 -12
- package/dist/types.js +27 -5
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -59,16 +59,42 @@ export declare class SkipAPIRequest {
|
|
|
59
59
|
* Defines the shape of the data that is returned by the Skip API Server
|
|
60
60
|
*/
|
|
61
61
|
export declare class SkipAPIResponse {
|
|
62
|
+
/**
|
|
63
|
+
* Used for all response phases, to indicate if the API request was successful or not
|
|
64
|
+
*/
|
|
62
65
|
success: boolean;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
analysis: string | null;
|
|
70
|
-
scriptText: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* The response phase indicates if the Skip API server is asking for additional data, a clarifying question, or if the analysis is complete and the information has been provided
|
|
68
|
+
* * clarifying_question: The Skip API server is asking for a clarifying question to be asked to the user - typecast the response to SkipAPIClarifyingQuestionResponse for all of the additional properties that are available in this response phase
|
|
69
|
+
* * data_request: The Skip API server is asking for additional data to be gathered - typecast the response to SkipAPIDataRequestResponse for all of the additional properties that are available in this response phase
|
|
70
|
+
* * analysis_complete: The Skip API server has completed the analysis and is providing the results - typecast the response to SkipAPIAnalysisCompleteResponse for all of the additional properties that are available in this response phase
|
|
71
|
+
*/
|
|
71
72
|
responsePhase: "clarifying_question" | "data_request" | "analysis_complete";
|
|
73
|
+
messages: SkipMessage[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'analysis_complete'
|
|
77
|
+
*/
|
|
78
|
+
export declare class SkipAPIAnalysisCompleteResponse extends SkipAPIResponse {
|
|
79
|
+
executionResults?: SubProcessResponse | null;
|
|
80
|
+
userExplanation?: string;
|
|
81
|
+
techExplanation?: string;
|
|
82
|
+
suggestedQuestions?: string[] | null;
|
|
83
|
+
reportTitle?: string | null;
|
|
84
|
+
analysis?: string | null;
|
|
85
|
+
scriptText?: string | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'clarifying_question'
|
|
89
|
+
*/
|
|
90
|
+
export declare class SkipAPIClarifyingQuestionResponse extends SkipAPIResponse {
|
|
91
|
+
clarifyingQuestion: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'data_request'
|
|
95
|
+
*/
|
|
96
|
+
export declare class SkipAPIDataRequestResponse extends SkipAPIResponse {
|
|
97
|
+
dataRequest: SkipDataRequest[];
|
|
72
98
|
}
|
|
73
99
|
/**
|
|
74
100
|
* This type is used to define the requested data whenever the Skip API server asks for additional data to be gathered
|
|
@@ -77,11 +103,15 @@ export declare class SkipDataRequest {
|
|
|
77
103
|
/**
|
|
78
104
|
* The type of request, either "sql" or "stored_query". Stored query refers to the name of a query that is stored in the system and can be executed to gather data. SQL refers to a fully executable SQL statement that can be executed to gather data.
|
|
79
105
|
*/
|
|
80
|
-
|
|
106
|
+
type: "sql" | "stored_query";
|
|
81
107
|
/**
|
|
82
108
|
* The text of the request - either a fully executable SQL statement or the name of a stored query
|
|
83
109
|
*/
|
|
84
|
-
|
|
110
|
+
text: string;
|
|
111
|
+
/**
|
|
112
|
+
* A description of the request, why it was requested, and what it is expected to provide
|
|
113
|
+
*/
|
|
114
|
+
description?: string;
|
|
85
115
|
}
|
|
86
116
|
export declare class SkipDataContextFieldInfo {
|
|
87
117
|
Name: string;
|
|
@@ -89,13 +119,16 @@ export declare class SkipDataContextFieldInfo {
|
|
|
89
119
|
Description?: string;
|
|
90
120
|
}
|
|
91
121
|
export declare class SkipDataContextItem {
|
|
92
|
-
|
|
122
|
+
/**
|
|
123
|
+
* The type of the item, either "view", "query", "full_entity", or "sql"
|
|
124
|
+
*/
|
|
125
|
+
Type: 'view' | 'query' | 'full_entity' | 'sql';
|
|
93
126
|
/**
|
|
94
127
|
* The ID of the view, query, or entity in the system
|
|
95
128
|
*/
|
|
96
129
|
RecordID: number;
|
|
97
130
|
/**
|
|
98
|
-
* The name of the view, query, or entity in the system
|
|
131
|
+
* The name of the view, query, or entity in the system. If Type = sql, this is the full SQL statement
|
|
99
132
|
*/
|
|
100
133
|
RecordName: string;
|
|
101
134
|
/**
|
|
@@ -113,6 +146,8 @@ export declare class SkipDataContextItem {
|
|
|
113
146
|
* within a given tier like in the MJAPI server or Skip Server or in the UI.
|
|
114
147
|
*/
|
|
115
148
|
Entity?: EntityInfo;
|
|
149
|
+
/** Additional Description has any other information that might be useful for someone (or an LLM) intepreting the contents of this data item */
|
|
150
|
+
AdditionalDescription?: string;
|
|
116
151
|
/**
|
|
117
152
|
* Generated description of the item which is dependent on the type of the item
|
|
118
153
|
*/
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SkipDataContext = exports.SkipDataContextItem = exports.SkipDataContextFieldInfo = exports.SkipDataRequest = exports.SkipAPIResponse = exports.SkipAPIRequest = exports.SkipMessage = exports.SubProcessResponse = void 0;
|
|
3
|
+
exports.SkipDataContext = exports.SkipDataContextItem = exports.SkipDataContextFieldInfo = exports.SkipDataRequest = exports.SkipAPIDataRequestResponse = exports.SkipAPIClarifyingQuestionResponse = exports.SkipAPIAnalysisCompleteResponse = exports.SkipAPIResponse = exports.SkipAPIRequest = exports.SkipMessage = exports.SubProcessResponse = void 0;
|
|
4
4
|
class SubProcessResponse {
|
|
5
5
|
}
|
|
6
6
|
exports.SubProcessResponse = SubProcessResponse;
|
|
@@ -22,6 +22,24 @@ exports.SkipAPIRequest = SkipAPIRequest;
|
|
|
22
22
|
class SkipAPIResponse {
|
|
23
23
|
}
|
|
24
24
|
exports.SkipAPIResponse = SkipAPIResponse;
|
|
25
|
+
/**
|
|
26
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'analysis_complete'
|
|
27
|
+
*/
|
|
28
|
+
class SkipAPIAnalysisCompleteResponse extends SkipAPIResponse {
|
|
29
|
+
}
|
|
30
|
+
exports.SkipAPIAnalysisCompleteResponse = SkipAPIAnalysisCompleteResponse;
|
|
31
|
+
/**
|
|
32
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'clarifying_question'
|
|
33
|
+
*/
|
|
34
|
+
class SkipAPIClarifyingQuestionResponse extends SkipAPIResponse {
|
|
35
|
+
}
|
|
36
|
+
exports.SkipAPIClarifyingQuestionResponse = SkipAPIClarifyingQuestionResponse;
|
|
37
|
+
/**
|
|
38
|
+
* Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'data_request'
|
|
39
|
+
*/
|
|
40
|
+
class SkipAPIDataRequestResponse extends SkipAPIResponse {
|
|
41
|
+
}
|
|
42
|
+
exports.SkipAPIDataRequestResponse = SkipAPIDataRequestResponse;
|
|
25
43
|
/**
|
|
26
44
|
* This type is used to define the requested data whenever the Skip API server asks for additional data to be gathered
|
|
27
45
|
*/
|
|
@@ -42,16 +60,20 @@ class SkipDataContextItem {
|
|
|
42
60
|
* Generated description of the item which is dependent on the type of the item
|
|
43
61
|
*/
|
|
44
62
|
get Description() {
|
|
63
|
+
let ret = '';
|
|
45
64
|
switch (this.Type) {
|
|
46
65
|
case 'view':
|
|
47
|
-
|
|
66
|
+
ret = `View: ${this.RecordName}, From Entity: ${this.EntityName}`;
|
|
48
67
|
case 'query':
|
|
49
|
-
|
|
68
|
+
ret = `Query: ${this.RecordName}`;
|
|
50
69
|
case 'full_entity':
|
|
51
|
-
|
|
70
|
+
ret = `Full Entity - All Records: ${this.EntityName}`;
|
|
52
71
|
default:
|
|
53
|
-
|
|
72
|
+
ret = `Unknown Type: ${this.Type}`;
|
|
54
73
|
}
|
|
74
|
+
if (this.AdditionalDescription && this.AdditionalDescription.length > 0)
|
|
75
|
+
ret += ` (More Info: ${this.AdditionalDescription})`;
|
|
76
|
+
return ret;
|
|
55
77
|
}
|
|
56
78
|
/**
|
|
57
79
|
* Populate the SkipDataContextItem from a UserViewEntity class instance
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAGD;;GAEG;AACH,MAAa,WAAW;CASvB;AATD,kCASC;AAED;;GAEG;AACH,MAAa,cAAc;CA2B1B;AA3BD,wCA2BC;AAED;;GAEG;AACH,MAAa,eAAe;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAGD;;GAEG;AACH,MAAa,WAAW;CASvB;AATD,kCASC;AAED;;GAEG;AACH,MAAa,cAAc;CA2B1B;AA3BD,wCA2BC;AAED;;GAEG;AACH,MAAa,eAAe;CAa3B;AAbD,0CAaC;AAED;;GAEG;AACH,MAAa,+BAAgC,SAAQ,eAAe;CAQnE;AARD,0EAQC;AAED;;GAEG;AACH,MAAa,iCAAkC,SAAQ,eAAe;CAErE;AAFD,8EAEC;AAED;;GAEG;AACH,MAAa,0BAA2B,SAAQ,eAAe;CAE9D;AAFD,gEAEC;AAED;;GAEG;AACH,MAAa,eAAe;CAa3B;AAbD,0CAaC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,mBAAmB;IAAhC;QAkBI;;UAEE;QACF,WAAM,GAA+B,EAAE,CAAC;IAmE5C,CAAC;IAlDG;;OAEG;IACH,IAAI,WAAW;QACX,IAAI,GAAG,GAAW,EAAE,CAAC;QACrB,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,MAAM;gBACP,GAAG,GAAG,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,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACpD,CAAC;CACJ;AAxFD,kDAwFC;AAED,MAAa,eAAe;IAA5B;QACI,UAAK,GAA0B,EAAE,CAAC;IAyBtC,CAAC;IAvBU,kBAAkB;QACrB,IAAI,IAAI,CAAC,KAAK;YACV,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,4CAA4C;;YAEnG,OAAO,KAAK,CAAC;IACrB,CAAC;IAEM,qBAAqB;QACxB,2JAA2J;QAC3J,MAAM,GAAG,GAAQ,EAAE,CAAC;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/C,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAEM,gCAAgC;QACnC,IAAI,OAAO,GAAW,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,OAAO,IAAI,aAAa,CAAC,gCAAgC,CAAC;QAC9D,CAAC;QACD,OAAO,IAAI,OAAO,GAAG,CAAC;IAC1B,CAAC;CACJ;AA1BD,0CA0BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/skip-types",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"description": "MemberJunction: Skip AI Assistant - Types that are used between the MJAPI and the Skip API as well as the UI within MemberJunction Explorer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|