@memberjunction/skip-types 2.43.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.
Files changed (54) hide show
  1. package/dist/agent-types.d.ts +251 -0
  2. package/dist/agent-types.d.ts.map +1 -0
  3. package/dist/agent-types.js +76 -0
  4. package/dist/agent-types.js.map +1 -0
  5. package/dist/api-types.d.ts +212 -0
  6. package/dist/api-types.d.ts.map +1 -0
  7. package/dist/api-types.js +80 -0
  8. package/dist/api-types.js.map +1 -0
  9. package/dist/artifact-types.d.ts +142 -0
  10. package/dist/artifact-types.d.ts.map +1 -0
  11. package/dist/artifact-types.js +26 -0
  12. package/dist/artifact-types.js.map +1 -0
  13. package/dist/auth-types.d.ts +39 -0
  14. package/dist/auth-types.d.ts.map +1 -0
  15. package/dist/auth-types.js +32 -0
  16. package/dist/auth-types.js.map +1 -0
  17. package/dist/component-types.d.ts +355 -0
  18. package/dist/component-types.d.ts.map +1 -0
  19. package/dist/component-types.js +28 -0
  20. package/dist/component-types.js.map +1 -0
  21. package/dist/conversation-types.d.ts +141 -0
  22. package/dist/conversation-types.d.ts.map +1 -0
  23. package/dist/conversation-types.js +46 -0
  24. package/dist/conversation-types.js.map +1 -0
  25. package/dist/entity-metadata-types.d.ts +125 -0
  26. package/dist/entity-metadata-types.d.ts.map +1 -0
  27. package/dist/entity-metadata-types.js +78 -0
  28. package/dist/entity-metadata-types.js.map +1 -0
  29. package/dist/index.d.ts +11 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +12 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/query-types.d.ts +107 -0
  34. package/dist/query-types.d.ts.map +1 -0
  35. package/dist/query-types.js +65 -0
  36. package/dist/query-types.js.map +1 -0
  37. package/dist/response-types.d.ts +156 -0
  38. package/dist/response-types.d.ts.map +1 -0
  39. package/dist/response-types.js +63 -0
  40. package/dist/response-types.js.map +1 -0
  41. package/dist/shared.d.ts +44 -0
  42. package/dist/shared.d.ts.map +1 -0
  43. package/dist/shared.js +3 -0
  44. package/dist/shared.js.map +1 -0
  45. package/dist/types.d.ts +31 -1028
  46. package/dist/types.d.ts.map +1 -1
  47. package/dist/types.js +45 -211
  48. package/dist/types.js.map +1 -1
  49. package/dist/util.d.ts +68 -0
  50. package/dist/util.d.ts.map +1 -0
  51. package/dist/util.js +201 -0
  52. package/dist/util.js.map +1 -0
  53. package/package.json +3 -3
  54. package/readme.md +140 -47
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @fileoverview Conversation and messaging types for Skip API
3
+ *
4
+ * This file contains types related to conversations and messaging within the Skip API system.
5
+ * These types define the structure for:
6
+ *
7
+ * - Conversation data structures (SkipConversation)
8
+ * - Individual message format (SkipMessage)
9
+ * - Sub-process execution results (SkipSubProcessResponse)
10
+ *
11
+ * Conversations in Skip are the fundamental unit for tracking user interactions and AI responses.
12
+ * Each conversation contains an ordered array of messages that represent the back-and-forth
13
+ * dialogue between users and the Skip AI system. Messages can include user inputs, system
14
+ * responses, error information, feedback, and internal processing metadata.
15
+ *
16
+ * Sub-process responses are used when Skip executes code in a sandboxed environment and needs
17
+ * to communicate the results back to the main API server.
18
+ *
19
+ * @author MemberJunction
20
+ * @since 2.0.0
21
+ */
22
+ import type { SkipAPIArtifact } from './artifact-types';
23
+ /**
24
+ * Whenever Skip executes it's analysis phase, it uses a sandboxed sub-process to execute code securely and
25
+ * this shape of data is used to communicate the results of that sub-process back to the Skip API server.
26
+ * This data type is in turn used within the SkipAPIAnalysisCompleteResponse type.
27
+ */
28
+ export declare class SkipSubProcessResponse {
29
+ status: "success" | "error";
30
+ /**
31
+ * For result types of data, this is the data that was returned from the sub-process to show in the table
32
+ */
33
+ tableData: any[] | null;
34
+ /**
35
+ * For result type of plot, this is the data that was returned from the sub-process to show in the plot
36
+ */
37
+ plotData: {
38
+ data: any[];
39
+ layout: any;
40
+ } | null;
41
+ /**
42
+ * If the request failed, this is the error message that was returned from the sub-process.
43
+ */
44
+ errorMessage: string | null;
45
+ }
46
+ /**
47
+ * Defines the shape of the conversations that can be passed back and forth with the Skip API Server - primarily used for the learning cycle process
48
+ */
49
+ export declare class SkipConversation {
50
+ /**
51
+ * The unique identifier for the conversation
52
+ */
53
+ id: string;
54
+ /**
55
+ * The user-friendly name for the conversation
56
+ */
57
+ name: string;
58
+ /**
59
+ * The unique identifier for the user that the conversation is associated with
60
+ */
61
+ userId?: string;
62
+ /**
63
+ * The name of the user that the conversation is associated with
64
+ */
65
+ user?: string;
66
+ /**
67
+ * Optional, more detailed description of the conversation
68
+ */
69
+ description?: string;
70
+ /**
71
+ * Array of messages that make up the conversation in chronological order, showing the earliest messages first and the more recents messages last
72
+ */
73
+ messages: SkipMessage[];
74
+ /**
75
+ * Optional, this is an array of artifacts that are associated with the conversation. The AI Agent can request to add new artifacts during a response, this array is provided by the caller to ensure that the agent
76
+ * knows about existing artifacts/versions
77
+ */
78
+ artifacts?: SkipAPIArtifact[];
79
+ /**
80
+ * When the conversation was created
81
+ */
82
+ createdAt: Date;
83
+ /**
84
+ * The date the conversation header record was last updated - this is NOT the same as the most recent conversation detail, for that interrogate the conversation details
85
+ */
86
+ updatedAt: Date;
87
+ }
88
+ /**
89
+ * Defines the shape of the individual message that makes up the messages array that is passed back and
90
+ * forth with the Skip API Server
91
+ */
92
+ export declare class SkipMessage {
93
+ /**
94
+ * The role of the message, either "user" or "system"
95
+ */
96
+ role: "user" | "system";
97
+ /**
98
+ * The content of the message, either the user's input or the system's response
99
+ */
100
+ content: string;
101
+ /**
102
+ * The conversation detail ID for the message, used to track the message
103
+ */
104
+ conversationDetailID: string;
105
+ /**
106
+ * If the message reflects an error message the information is provided here
107
+ */
108
+ error?: string;
109
+ /**
110
+ * hiddenToUser - this is true if a message is only for internal system puprose and not shown to a user
111
+ */
112
+ hiddenToUser?: boolean;
113
+ /**
114
+ * Rating scale between 1 and 10, 1 reflecting the lowest rating and 10 reflecting the highest rating from the user in terms of their satisfaction with the response
115
+ */
116
+ userRating?: number;
117
+ /**
118
+ * Optional, text feedback from the user reflecting their satisfaction with the response. Of course the subsequent messages can contain this, but this is an element that the UI will
119
+ * surface that allows a user to specifically provide feedback on each message.
120
+ */
121
+ userFeedback?: string;
122
+ /**
123
+ * Optional, this text is from Skip during the generation of a particular response and represents the step-wise reasoning Skip went through to get to a particular response. This information along with the preceding messages, User Rating and User Feedback can
124
+ * be very helpful during a learning cycle to build notes and other artifacts that can train Skip to learn more about the user/organization's preferences and the context of the conversation.
125
+ */
126
+ reflectionInsights?: string;
127
+ /**
128
+ * Optional, this text contains an AI generated summary of the prior messages in the conversation going back in time through the last such summary. This allows "compression" of a longer conversation to preserve space in a context window, improve performance and simplify
129
+ * inference.
130
+ */
131
+ summaryOfEarlierConveration?: string;
132
+ /**
133
+ * The date and time the message was created
134
+ */
135
+ createdAt?: Date;
136
+ /**
137
+ * The date and time the message was last updated
138
+ */
139
+ updatedAt?: Date;
140
+ }
141
+ //# sourceMappingURL=conversation-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-types.d.ts","sourceRoot":"","sources":["../src/conversation-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,sBAAsB;IAC/B,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9C;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,WAAW;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CACpB"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Conversation and messaging types for Skip API
4
+ *
5
+ * This file contains types related to conversations and messaging within the Skip API system.
6
+ * These types define the structure for:
7
+ *
8
+ * - Conversation data structures (SkipConversation)
9
+ * - Individual message format (SkipMessage)
10
+ * - Sub-process execution results (SkipSubProcessResponse)
11
+ *
12
+ * Conversations in Skip are the fundamental unit for tracking user interactions and AI responses.
13
+ * Each conversation contains an ordered array of messages that represent the back-and-forth
14
+ * dialogue between users and the Skip AI system. Messages can include user inputs, system
15
+ * responses, error information, feedback, and internal processing metadata.
16
+ *
17
+ * Sub-process responses are used when Skip executes code in a sandboxed environment and needs
18
+ * to communicate the results back to the main API server.
19
+ *
20
+ * @author MemberJunction
21
+ * @since 2.0.0
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.SkipMessage = exports.SkipConversation = exports.SkipSubProcessResponse = void 0;
25
+ /**
26
+ * Whenever Skip executes it's analysis phase, it uses a sandboxed sub-process to execute code securely and
27
+ * this shape of data is used to communicate the results of that sub-process back to the Skip API server.
28
+ * This data type is in turn used within the SkipAPIAnalysisCompleteResponse type.
29
+ */
30
+ class SkipSubProcessResponse {
31
+ }
32
+ exports.SkipSubProcessResponse = SkipSubProcessResponse;
33
+ /**
34
+ * Defines the shape of the conversations that can be passed back and forth with the Skip API Server - primarily used for the learning cycle process
35
+ */
36
+ class SkipConversation {
37
+ }
38
+ exports.SkipConversation = SkipConversation;
39
+ /**
40
+ * Defines the shape of the individual message that makes up the messages array that is passed back and
41
+ * forth with the Skip API Server
42
+ */
43
+ class SkipMessage {
44
+ }
45
+ exports.SkipMessage = SkipMessage;
46
+ //# sourceMappingURL=conversation-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-types.js","sourceRoot":"","sources":["../src/conversation-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAIH;;;;GAIG;AACH,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAED;;GAEG;AACH,MAAa,gBAAgB;CA0C5B;AA1CD,4CA0CC;AAED;;;GAGG;AACH,MAAa,WAAW;CAuDvB;AAvDD,kCAuDC"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * @fileoverview Entity metadata and schema types for Skip API
3
+ *
4
+ * This file contains types that describe database entities, fields, relationships, and metadata
5
+ * structures used by the Skip API system. These types define the structure for:
6
+ *
7
+ * - Entity schema information (SkipEntityInfo)
8
+ * - Field definitions and metadata (SkipEntityFieldInfo, SkipEntityFieldValueInfo)
9
+ * - Entity relationships (SkipEntityRelationshipInfo)
10
+ * - Column descriptions for report data (SkipColumnInfo)
11
+ *
12
+ * These types are essential for communicating database schema information to Skip, allowing
13
+ * the AI to understand the structure, relationships, and constraints of the underlying data.
14
+ * This metadata enables Skip to generate appropriate SQL queries, understand data relationships,
15
+ * and provide meaningful analysis and reports.
16
+ *
17
+ * The entity metadata includes information about primary keys, foreign keys, data types,
18
+ * constraints, and relationships that Skip uses to navigate and query the database effectively.
19
+ *
20
+ * @author MemberJunction
21
+ * @since 2.0.0
22
+ */
23
+ /**
24
+ * For each Skip API Analysis result, it is possible for Skip to provide a set of tableDataColumns that describe the data that is being returned in this shape.
25
+ */
26
+ export declare class SkipColumnInfo {
27
+ fieldName: string;
28
+ displayName: string;
29
+ simpleDataType: 'string' | 'number' | 'date' | 'boolean';
30
+ description: string;
31
+ }
32
+ /**
33
+ * Enumerates the possible values for a given field
34
+ */
35
+ export declare class SkipEntityFieldValueInfo {
36
+ /**
37
+ * Actual value for the possible value for the field
38
+ */
39
+ value: string;
40
+ /**
41
+ * Optional, the display value for the field value
42
+ */
43
+ displayValue?: string;
44
+ }
45
+ /**
46
+ * Comprehensive metadata about individual entity fields, including data types, constraints,
47
+ * relationships, and UI display preferences. This information helps Skip understand how
48
+ * to work with each field in queries and analysis.
49
+ */
50
+ export declare class SkipEntityFieldInfo {
51
+ entityID: string;
52
+ sequence: number;
53
+ name: string;
54
+ displayName?: string;
55
+ description?: string;
56
+ isPrimaryKey: boolean;
57
+ isUnique: boolean;
58
+ category?: string;
59
+ type: string;
60
+ length: number;
61
+ precision: number;
62
+ scale: number;
63
+ sqlFullType: string;
64
+ allowsNull: boolean;
65
+ defaultValue: string;
66
+ autoIncrement: boolean;
67
+ valueListType?: string;
68
+ extendedType?: string;
69
+ defaultInView: boolean;
70
+ defaultColumnWidth: number;
71
+ isVirtual: boolean;
72
+ isNameField: boolean;
73
+ relatedEntityID?: string;
74
+ relatedEntityFieldName?: string;
75
+ relatedEntity?: string;
76
+ relatedEntitySchemaName?: string;
77
+ relatedEntityBaseView?: string;
78
+ possibleValues?: SkipEntityFieldValueInfo[];
79
+ }
80
+ /**
81
+ * Defines relationships between entities, including foreign key relationships and
82
+ * many-to-many relationships through junction tables. This information allows Skip
83
+ * to understand how entities are connected and generate appropriate JOIN queries.
84
+ */
85
+ export declare class SkipEntityRelationshipInfo {
86
+ entityID: string;
87
+ relatedEntityID: string;
88
+ type: string;
89
+ entityKeyField: string;
90
+ relatedEntityJoinField: string;
91
+ joinView: string;
92
+ joinEntityJoinField: string;
93
+ joinEntityInverseJoinField: string;
94
+ entity: string;
95
+ entityBaseView: string;
96
+ relatedEntity: string;
97
+ relatedEntityBaseView: string;
98
+ }
99
+ /**
100
+ * Complete metadata about a database entity including its fields, relationships,
101
+ * and optionally sample data. This is the primary structure used to communicate
102
+ * entity schema information to Skip for analysis and query generation.
103
+ */
104
+ export declare class SkipEntityInfo {
105
+ id: string;
106
+ name: string;
107
+ description?: string;
108
+ schemaName: string;
109
+ baseView: string;
110
+ fields: SkipEntityFieldInfo[];
111
+ relatedEntities: SkipEntityRelationshipInfo[];
112
+ /**
113
+ * If rows packed is set to anything other than none, the data is provided in the rows property.
114
+ */
115
+ rowsPacked?: 'None' | 'Sample' | 'All';
116
+ /**
117
+ * If rowsPacked === 'Sample', this additional property is used to indicate the method used to sample the rows
118
+ */
119
+ rowsSampleMethod?: 'random' | 'top n' | 'bottom n';
120
+ /**
121
+ * Optional, the metadata can include an array of rows that can be used to provide context to Skip for the data that is being passed in.
122
+ */
123
+ rows?: any[];
124
+ }
125
+ //# sourceMappingURL=entity-metadata-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-metadata-types.d.ts","sourceRoot":"","sources":["../src/entity-metadata-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;GAEG;AACH,qBAAa,cA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C,EAAE,wBAAwB,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,qBAAa,0BAA0B;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAG,MAAM,CAAC;IACpB,QAAQ,EAAG,MAAM,CAAC;IAClB,MAAM,EAAE,mBAAmB,EAAE,CAAK;IAClC,eAAe,EAAE,0BAA0B,EAAE,CAAM;IAEnD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAU;IAChD;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAY;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAM;CACrB"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Entity metadata and schema types for Skip API
4
+ *
5
+ * This file contains types that describe database entities, fields, relationships, and metadata
6
+ * structures used by the Skip API system. These types define the structure for:
7
+ *
8
+ * - Entity schema information (SkipEntityInfo)
9
+ * - Field definitions and metadata (SkipEntityFieldInfo, SkipEntityFieldValueInfo)
10
+ * - Entity relationships (SkipEntityRelationshipInfo)
11
+ * - Column descriptions for report data (SkipColumnInfo)
12
+ *
13
+ * These types are essential for communicating database schema information to Skip, allowing
14
+ * the AI to understand the structure, relationships, and constraints of the underlying data.
15
+ * This metadata enables Skip to generate appropriate SQL queries, understand data relationships,
16
+ * and provide meaningful analysis and reports.
17
+ *
18
+ * The entity metadata includes information about primary keys, foreign keys, data types,
19
+ * constraints, and relationships that Skip uses to navigate and query the database effectively.
20
+ *
21
+ * @author MemberJunction
22
+ * @since 2.0.0
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.SkipEntityInfo = exports.SkipEntityRelationshipInfo = exports.SkipEntityFieldInfo = exports.SkipEntityFieldValueInfo = exports.SkipColumnInfo = void 0;
26
+ /**
27
+ * For each Skip API Analysis result, it is possible for Skip to provide a set of tableDataColumns that describe the data that is being returned in this shape.
28
+ */
29
+ class SkipColumnInfo {
30
+ }
31
+ exports.SkipColumnInfo = SkipColumnInfo;
32
+ /**
33
+ * Enumerates the possible values for a given field
34
+ */
35
+ class SkipEntityFieldValueInfo {
36
+ }
37
+ exports.SkipEntityFieldValueInfo = SkipEntityFieldValueInfo;
38
+ /**
39
+ * Comprehensive metadata about individual entity fields, including data types, constraints,
40
+ * relationships, and UI display preferences. This information helps Skip understand how
41
+ * to work with each field in queries and analysis.
42
+ */
43
+ class SkipEntityFieldInfo {
44
+ }
45
+ exports.SkipEntityFieldInfo = SkipEntityFieldInfo;
46
+ /**
47
+ * Defines relationships between entities, including foreign key relationships and
48
+ * many-to-many relationships through junction tables. This information allows Skip
49
+ * to understand how entities are connected and generate appropriate JOIN queries.
50
+ */
51
+ class SkipEntityRelationshipInfo {
52
+ }
53
+ exports.SkipEntityRelationshipInfo = SkipEntityRelationshipInfo;
54
+ /**
55
+ * Complete metadata about a database entity including its fields, relationships,
56
+ * and optionally sample data. This is the primary structure used to communicate
57
+ * entity schema information to Skip for analysis and query generation.
58
+ */
59
+ class SkipEntityInfo {
60
+ constructor() {
61
+ this.fields = [];
62
+ this.relatedEntities = [];
63
+ /**
64
+ * If rows packed is set to anything other than none, the data is provided in the rows property.
65
+ */
66
+ this.rowsPacked = 'None';
67
+ /**
68
+ * If rowsPacked === 'Sample', this additional property is used to indicate the method used to sample the rows
69
+ */
70
+ this.rowsSampleMethod = 'random';
71
+ /**
72
+ * Optional, the metadata can include an array of rows that can be used to provide context to Skip for the data that is being passed in.
73
+ */
74
+ this.rows = [];
75
+ }
76
+ }
77
+ exports.SkipEntityInfo = SkipEntityInfo;
78
+ //# sourceMappingURL=entity-metadata-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-metadata-types.js","sourceRoot":"","sources":["../src/entity-metadata-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACH,MAAa,cAAc;CAK1B;AALD,wCAKC;AAED;;GAEG;AACH,MAAa,wBAAwB;CASpC;AATD,4DASC;AAED;;;;GAIG;AACH,MAAa,mBAAmB;CA8B/B;AA9BD,kDA8BC;AAED;;;;GAIG;AACH,MAAa,0BAA0B;CAatC;AAbD,gEAaC;AAED;;;;GAIG;AACH,MAAa,cAAc;IAA3B;QAMI,WAAM,GAAyB,EAAE,CAAC;QAClC,oBAAe,GAAiC,EAAE,CAAC;QAEnD;;WAEG;QACH,eAAU,GAA+B,MAAM,CAAC;QAChD;;WAEG;QACH,qBAAgB,GAAqC,QAAQ,CAAC;QAC9D;;WAEG;QACH,SAAI,GAAW,EAAE,CAAC;IACtB,CAAC;CAAA;AArBD,wCAqBC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,12 @@
1
- export * from './types';
1
+ export * from './api-types';
2
+ export * from './conversation-types';
3
+ export * from './response-types';
4
+ export * from './entity-metadata-types';
5
+ export * from './query-types';
6
+ export * from './agent-types';
7
+ export * from './artifact-types';
8
+ export * from './auth-types';
9
+ export * from './component-types';
10
+ export * from './shared';
11
+ export * from './util';
2
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -14,5 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
17
+ // Re-export all types from organized modules
18
+ __exportStar(require("./api-types"), exports);
19
+ __exportStar(require("./conversation-types"), exports);
20
+ __exportStar(require("./response-types"), exports);
21
+ __exportStar(require("./entity-metadata-types"), exports);
22
+ __exportStar(require("./query-types"), exports);
23
+ __exportStar(require("./agent-types"), exports);
24
+ __exportStar(require("./artifact-types"), exports);
25
+ __exportStar(require("./auth-types"), exports);
26
+ __exportStar(require("./component-types"), exports);
27
+ __exportStar(require("./shared"), exports);
28
+ __exportStar(require("./util"), exports);
18
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,0DAAwC;AACxC,gDAA8B;AAC9B,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,oDAAkC;AAClC,2CAAyB;AAEzB,yCAAuB"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @fileoverview Query and data request types for Skip API
3
+ *
4
+ * This file contains types related to database queries, stored queries, and data requests
5
+ * within the Skip API system. These types define the structure for:
6
+ *
7
+ * - Stored query metadata (SkipQueryInfo, SkipQueryFieldInfo)
8
+ * - Data request specifications (SkipDataRequest, SkipDataRequestType)
9
+ * - Learning cycle query change tracking (SkipLearningCycleQueryChange)
10
+ *
11
+ * These types enable Skip to understand and work with pre-defined queries stored in the
12
+ * MemberJunction metadata system, as well as handle dynamic data requests that Skip
13
+ * generates during analysis. The query metadata includes information about query
14
+ * parameters, field definitions, quality rankings, and approval status.
15
+ *
16
+ * Data requests allow Skip to ask for additional data beyond what was initially provided,
17
+ * either through custom SQL statements or by referencing stored queries. This capability
18
+ * enables Skip to iteratively refine its analysis by gathering the exact data it needs.
19
+ *
20
+ * @author MemberJunction
21
+ * @since 2.0.0
22
+ */
23
+ /**
24
+ * Describes the different types of data requests the Skip API server can make for additional data.
25
+ * * sql: The Skip API server is asking for additional data to be gathered using a fully executable SQL statement
26
+ * * stored_query: The Skip API server is asking for additional data to be gathered using a stored query that is defined in the system within the Queries entity.
27
+ */
28
+ export declare const SkipDataRequestType: {
29
+ readonly sql: "sql";
30
+ readonly stored_query: "stored_query";
31
+ };
32
+ export type SkipDataRequestType = typeof SkipDataRequestType[keyof typeof SkipDataRequestType];
33
+ /**
34
+ * This type is used to define the requested data whenever the Skip API server asks for additional data to be gathered
35
+ */
36
+ export declare class SkipDataRequest {
37
+ /**
38
+ * The type of request, as defined in the `SkipDataRequestType` type
39
+ */
40
+ type: SkipDataRequestType;
41
+ /**
42
+ * The text of the request - either a fully executable SQL statement or the name of a stored query
43
+ */
44
+ text: string;
45
+ /**
46
+ * A description of the request, why it was requested, and what it is expected to provide
47
+ */
48
+ description?: string;
49
+ }
50
+ /**
51
+ * Metadata about individual fields within a stored query, including their data types,
52
+ * source entity mappings, and computed field information. This helps Skip understand
53
+ * the structure and meaning of query results.
54
+ */
55
+ export declare class SkipQueryFieldInfo {
56
+ name: string;
57
+ queryID: string;
58
+ description: string;
59
+ sequence: number;
60
+ /**
61
+ * The base type, not including parameters, in SQL. For example this field would be nvarchar or decimal, and wouldn't include type parameters. The SQLFullType field provides that information.
62
+ */
63
+ sqlBaseType: string;
64
+ /**
65
+ * The full SQL type for the field, for example datetime or nvarchar(10) etc.
66
+ */
67
+ sqlFullType: string;
68
+ sourceEntityID: string;
69
+ sourceFieldName: string;
70
+ isComputed: boolean;
71
+ computationDescription: string;
72
+ isSummary: boolean;
73
+ summaryDescription: string;
74
+ createdAt: Date;
75
+ updatedAt: Date;
76
+ sourceEntity: string;
77
+ }
78
+ /**
79
+ * Complete metadata about a stored query, including its SQL, approval status, quality ranking,
80
+ * and field definitions. This information allows Skip to understand and utilize pre-built
81
+ * queries for analysis and reporting.
82
+ */
83
+ export declare class SkipQueryInfo {
84
+ id: string;
85
+ name: string;
86
+ description: string;
87
+ categoryID: string;
88
+ sql: string;
89
+ originalSQL: string;
90
+ feedback: string;
91
+ status: 'Pending' | 'In-Review' | 'Approved' | 'Rejected' | 'Obsolete';
92
+ qualityRank: number;
93
+ createdAt: Date;
94
+ updatedAt: Date;
95
+ category: string;
96
+ fields: SkipQueryFieldInfo[];
97
+ }
98
+ /**
99
+ * Represents a change to a query during the learning cycle process, allowing Skip
100
+ * to add new queries, update existing ones, or mark queries for deletion based on
101
+ * its analysis of conversation patterns and user needs.
102
+ */
103
+ export declare class SkipLearningCycleQueryChange {
104
+ query: SkipQueryInfo;
105
+ changeType: 'add' | 'update' | 'delete';
106
+ }
107
+ //# sourceMappingURL=query-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-types.d.ts","sourceRoot":"","sources":["../src/query-types.ts"],"names":[],"mappings":"AAAA;;;;;;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IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,4BAA4B;IACrC,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC3C"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Query and data request types for Skip API
4
+ *
5
+ * This file contains types related to database queries, stored queries, and data requests
6
+ * within the Skip API system. These types define the structure for:
7
+ *
8
+ * - Stored query metadata (SkipQueryInfo, SkipQueryFieldInfo)
9
+ * - Data request specifications (SkipDataRequest, SkipDataRequestType)
10
+ * - Learning cycle query change tracking (SkipLearningCycleQueryChange)
11
+ *
12
+ * These types enable Skip to understand and work with pre-defined queries stored in the
13
+ * MemberJunction metadata system, as well as handle dynamic data requests that Skip
14
+ * generates during analysis. The query metadata includes information about query
15
+ * parameters, field definitions, quality rankings, and approval status.
16
+ *
17
+ * Data requests allow Skip to ask for additional data beyond what was initially provided,
18
+ * either through custom SQL statements or by referencing stored queries. This capability
19
+ * enables Skip to iteratively refine its analysis by gathering the exact data it needs.
20
+ *
21
+ * @author MemberJunction
22
+ * @since 2.0.0
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.SkipLearningCycleQueryChange = exports.SkipQueryInfo = exports.SkipQueryFieldInfo = exports.SkipDataRequest = exports.SkipDataRequestType = void 0;
26
+ /**
27
+ * Describes the different types of data requests the Skip API server can make for additional data.
28
+ * * sql: The Skip API server is asking for additional data to be gathered using a fully executable SQL statement
29
+ * * stored_query: The Skip API server is asking for additional data to be gathered using a stored query that is defined in the system within the Queries entity.
30
+ */
31
+ exports.SkipDataRequestType = {
32
+ sql: "sql",
33
+ stored_query: "stored_query"
34
+ };
35
+ /**
36
+ * This type is used to define the requested data whenever the Skip API server asks for additional data to be gathered
37
+ */
38
+ class SkipDataRequest {
39
+ }
40
+ exports.SkipDataRequest = SkipDataRequest;
41
+ /**
42
+ * Metadata about individual fields within a stored query, including their data types,
43
+ * source entity mappings, and computed field information. This helps Skip understand
44
+ * the structure and meaning of query results.
45
+ */
46
+ class SkipQueryFieldInfo {
47
+ }
48
+ exports.SkipQueryFieldInfo = SkipQueryFieldInfo;
49
+ /**
50
+ * Complete metadata about a stored query, including its SQL, approval status, quality ranking,
51
+ * and field definitions. This information allows Skip to understand and utilize pre-built
52
+ * queries for analysis and reporting.
53
+ */
54
+ class SkipQueryInfo {
55
+ }
56
+ exports.SkipQueryInfo = SkipQueryInfo;
57
+ /**
58
+ * Represents a change to a query during the learning cycle process, allowing Skip
59
+ * to add new queries, update existing ones, or mark queries for deletion based on
60
+ * its analysis of conversation patterns and user needs.
61
+ */
62
+ class SkipLearningCycleQueryChange {
63
+ }
64
+ exports.SkipLearningCycleQueryChange = SkipLearningCycleQueryChange;
65
+ //# sourceMappingURL=query-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-types.js","sourceRoot":"","sources":["../src/query-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,KAAK;IACV,YAAY,EAAE,cAAc;CACtB,CAAC;AAGX;;GAEG;AACH,MAAa,eAAe;CAa3B;AAbD,0CAaC;AAED;;;;GAIG;AACH,MAAa,kBAAkB;CAsB9B;AAtBD,gDAsBC;AAED;;;;GAIG;AACH,MAAa,aAAa;CAczB;AAdD,sCAcC;AAED;;;;GAIG;AACH,MAAa,4BAA4B;CAGxC;AAHD,oEAGC"}