@memberjunction/skip-types 5.26.0 → 5.27.1
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 +2 -2
- package/dist/agent-types.d.ts.map +1 -1
- package/dist/api-types.d.ts +5 -3
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/response-types.d.ts +9 -1
- package/dist/response-types.d.ts.map +1 -1
- package/dist/response-types.js.map +1 -1
- package/dist/util.d.ts +5 -145
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +5 -374
- package/dist/util.js.map +1 -1
- package/package.json +7 -7
- package/dist/entity-metadata-types.d.ts +0 -156
- package/dist/entity-metadata-types.d.ts.map +0 -1
- package/dist/entity-metadata-types.js +0 -2
- package/dist/entity-metadata-types.js.map +0 -1
package/dist/agent-types.d.ts
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* Notes provide a way for Skip to store and retrieve organizational knowledge, user
|
|
21
21
|
* preferences, and contextual information that improves future interactions.
|
|
22
22
|
*/
|
|
23
|
+
import type { EntityInfo } from '@memberjunction/core';
|
|
23
24
|
import type { SkipConversation } from './conversation-types.js';
|
|
24
|
-
import type { SkipEntityInfo } from './entity-metadata-types.js';
|
|
25
25
|
import type { SkipQueryInfo, SkipLearningCycleQueryChange } from './query-types.js';
|
|
26
26
|
import type { SkipAPIRequestAPIKey } from './auth-types.js';
|
|
27
27
|
/**
|
|
@@ -185,7 +185,7 @@ export declare class SkipAPILearningCycleRequest {
|
|
|
185
185
|
/**
|
|
186
186
|
* Summary entity metadata that is passed into the Skip Server so that Skip has knowledge of the schema of the calling MJAPI environment
|
|
187
187
|
*/
|
|
188
|
-
entities:
|
|
188
|
+
entities: EntityInfo[];
|
|
189
189
|
/**
|
|
190
190
|
* Stored queries in the MJ metadata that Skip can use and learn from
|
|
191
191
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-types.d.ts","sourceRoot":"","sources":["../src/agent-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"agent-types.d.ts","sourceRoot":"","sources":["../src/agent-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD;;GAEG;AACH,qBAAa,oBAAoB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,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;;OAEG;IACH,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAElC;;OAEG;IACH,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAEhC;;OAEG;IACH,qBAAqB,EAAE,IAAI,CAAC;IAE5B;;;OAGG;IACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;;GAGG;AACH,qBAAa,4BAA4B;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAE3C;;OAEG;IACH,YAAY,EAAE,4BAA4B,EAAE,CAAC;IAE7C;;OAEG;IACH,cAAc,EAAE,8BAA8B,EAAE,CAAC;CACpD"}
|
package/dist/api-types.d.ts
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* across all Skip API interactions regardless of the specific functionality being invoked.
|
|
13
13
|
*/
|
|
14
14
|
import { DataContext } from '@memberjunction/data-context';
|
|
15
|
+
import type { EntityInfo } from '@memberjunction/core';
|
|
15
16
|
import type { SkipMessage } from './conversation-types.js';
|
|
16
|
-
import type { SkipEntityInfo } from './entity-metadata-types.js';
|
|
17
17
|
import type { SkipQueryInfo, SkipQueryCatalogEntry } from './query-types.js';
|
|
18
18
|
import type { SkipAPIRequestAPIKey } from './auth-types.js';
|
|
19
19
|
import type { SkipAPIArtifact } from './artifact-types.js';
|
|
@@ -126,9 +126,11 @@ export declare class SkipAPIRequest {
|
|
|
126
126
|
*/
|
|
127
127
|
dataContext?: DataContext;
|
|
128
128
|
/**
|
|
129
|
-
* Summary entity metadata that is passed into the Skip Server so that Skip has knowledge of the schema of the calling MJAPI environment
|
|
129
|
+
* Summary entity metadata that is passed into the Skip Server so that Skip has knowledge of the schema of the calling MJAPI environment.
|
|
130
|
+
* Uses MemberJunction's native EntityInfo type directly — no intermediate conversion needed.
|
|
131
|
+
* Serialized via EntityInfo.toJSON() and reconstructed via new EntityInfo(data) on the receiving side.
|
|
130
132
|
*/
|
|
131
|
-
entities:
|
|
133
|
+
entities: EntityInfo[];
|
|
132
134
|
/**
|
|
133
135
|
* Stored queries in the MJ metadata that Skip can use and learn from
|
|
134
136
|
*/
|
package/dist/api-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-types.d.ts","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"api-types.d.ts","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;;CAOnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,MA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IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAEnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE9B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAED;;GAEG;AACH,qBAAa,eAAe;IACxB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACvD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/api-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-types.js","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,eAAe,EAAE,iBAAiB;IAClC,yBAAyB,EAAE,2BAA2B;IACtD,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;IAChD,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;CAClC,CAAC;AAGX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,2BAA2B,EAAE,6BAA6B;CACpD,CAAC;AAGX;;GAEG;AACH,MAAM,OAAO,eAAe;CAgD3B;AAED;;GAEG;AACH,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"api-types.js","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,eAAe,EAAE,iBAAiB;IAClC,yBAAyB,EAAE,2BAA2B;IACtD,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;IAChD,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;CAClC,CAAC;AAGX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,2BAA2B,EAAE,6BAA6B;CACpD,CAAC;AAGX;;GAEG;AACH,MAAM,OAAO,eAAe;CAgD3B;AAED;;GAEG;AACH,MAAM,OAAO,cAAc;CAyH1B;AAED;;GAEG;AACH,MAAM,OAAO,eAAe;CA8B3B;AAED;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,cAAc;CAK1D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export * from './api-types.js';
|
|
2
2
|
export * from './conversation-types.js';
|
|
3
3
|
export * from './response-types.js';
|
|
4
|
-
export * from './entity-metadata-types.js';
|
|
5
4
|
export * from './query-types.js';
|
|
6
5
|
export * from './agent-types.js';
|
|
7
6
|
export * from './artifact-types.js';
|
|
8
7
|
export * from './auth-types.js';
|
|
9
|
-
export * from './util.js';
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
export * from './api-types.js';
|
|
3
3
|
export * from './conversation-types.js';
|
|
4
4
|
export * from './response-types.js';
|
|
5
|
-
export * from './entity-metadata-types.js';
|
|
6
5
|
export * from './query-types.js';
|
|
7
6
|
export * from './agent-types.js';
|
|
8
7
|
export * from './artifact-types.js';
|
|
9
8
|
export * from './auth-types.js';
|
|
10
|
-
export * from './util.js';
|
|
11
9
|
//# 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,6CAA6C;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
|
package/dist/response-types.d.ts
CHANGED
|
@@ -17,11 +17,19 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { SkipAPIResponse } from './api-types.js';
|
|
19
19
|
import type { SkipSubProcessResponse } from './conversation-types.js';
|
|
20
|
-
import type { SkipColumnInfo } from './entity-metadata-types.js';
|
|
21
20
|
import type { SkipDataRequest } from './query-types.js';
|
|
22
21
|
import type { SkipAPIArtifactRequest } from './artifact-types.js';
|
|
23
22
|
import { ComponentOption, SimpleDataContext } from '@memberjunction/interactive-component-types';
|
|
24
23
|
import { AgentResponseForm } from '@memberjunction/ai-core-plus';
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
*/
|
|
27
|
+
export interface SkipColumnInfo {
|
|
28
|
+
fieldName: string;
|
|
29
|
+
displayName: string;
|
|
30
|
+
simpleDataType: 'string' | 'number' | 'date' | 'boolean';
|
|
31
|
+
description: string;
|
|
32
|
+
}
|
|
25
33
|
/**
|
|
26
34
|
* Defines an individual filter that will be used to filter the data in the view to the specific row or rows that the user clicked on for a drill down
|
|
27
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.d.ts","sourceRoot":"","sources":["../src/response-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"response-types.d.ts","sourceRoot":"","sources":["../src/response-types.ts"],"names":[],"mappings":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Ac,EAAE,CAAC;IACpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IAEjC;;OAEG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAErC;;;;OAIG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC;CAC5C;AAED;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,eAAe;IAClE;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,eAAe;IAC3D,WAAW,EAAE,eAAe,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,eAAe;IAC9D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../src/response-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../src/response-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiB9C;;GAEG;AACH,MAAM,OAAO,8BAA8B;CAG1C;AAED;;GAEG;AACH,MAAM,OAAO,wBAAwB;CAepC;AAED;;GAEG;AACH,MAAM,OAAO,+BAAgC,SAAQ,eAAe;CAyEnE;AAED;;GAEG;AACH,MAAM,OAAO,iCAAkC,SAAQ,eAAe;CAiBrE;AAED;;GAEG;AACH,MAAM,OAAO,0BAA2B,SAAQ,eAAe;CAE9D;AAED;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,eAAe;CAKjE"}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,149 +1,9 @@
|
|
|
1
|
-
import { EntityFieldInfo, EntityFieldValueInfo, EntityInfo, EntityOrganicKeyInfo, EntityOrganicKeyRelatedEntityInfo, EntityRelationshipInfo } from "@memberjunction/core";
|
|
2
|
-
import { SimpleEntityInfo, SimpleEntityFieldInfo } from "@memberjunction/interactive-component-types";
|
|
3
|
-
import { SkipEntityFieldInfo, SkipEntityFieldValueInfo, SkipEntityInfo, SkipEntityOrganicKeyInfo, SkipEntityOrganicKeyRelatedEntityInfo, SkipEntityRelationshipInfo } from "./entity-metadata-types.js";
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
2
|
+
* Utility functions for working with Skip types.
|
|
6
3
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @returns A SkipEntityInfo object with mapped fields and relationships
|
|
12
|
-
*/
|
|
13
|
-
export declare function MapEntityInfoToSkipEntityInfo(e: EntityInfo): SkipEntityInfo;
|
|
14
|
-
/**
|
|
15
|
-
* Maps a MemberJunction EntityOrganicKeyInfo object to a SkipEntityOrganicKeyInfo object.
|
|
16
|
-
*
|
|
17
|
-
* Organic keys express cross-entity relationships via shared business data (email, acronym,
|
|
18
|
-
* domain, etc.) rather than database FK constraints.
|
|
19
|
-
*
|
|
20
|
-
* @param ok - The source EntityOrganicKeyInfo from MemberJunction core
|
|
21
|
-
* @returns A SkipEntityOrganicKeyInfo object
|
|
22
|
-
*/
|
|
23
|
-
export declare function MapEntityOrganicKeyInfoToSkipEntityOrganicKeyInfo(ok: EntityOrganicKeyInfo): SkipEntityOrganicKeyInfo;
|
|
24
|
-
/**
|
|
25
|
-
* Maps a MemberJunction EntityOrganicKeyRelatedEntityInfo to its Skip equivalent.
|
|
26
|
-
* Looks up the related entity's schema name and base view from the global Metadata
|
|
27
|
-
* provider, since they are not stored on the organic key related entity directly.
|
|
28
|
-
*
|
|
29
|
-
* @param re - The source EntityOrganicKeyRelatedEntityInfo from MemberJunction core
|
|
30
|
-
* @returns A SkipEntityOrganicKeyRelatedEntityInfo, or null if the related entity cannot be resolved
|
|
31
|
-
*/
|
|
32
|
-
export declare function MapEntityOrganicKeyRelatedEntityInfoToSkipEntityOrganicKeyRelatedEntityInfo(re: EntityOrganicKeyRelatedEntityInfo): SkipEntityOrganicKeyRelatedEntityInfo | null;
|
|
33
|
-
/**
|
|
34
|
-
* Maps an array of MemberJunction EntityInfo objects to SkipEntityInfo objects.
|
|
35
|
-
*
|
|
36
|
-
* @param entities - Array of EntityInfo from @memberjunction/core
|
|
37
|
-
* @returns Array of SkipEntityInfo objects
|
|
38
|
-
*/
|
|
39
|
-
export declare function MapEntityInfoArrayToSkipEntityInfoArray(entities: EntityInfo[]): SkipEntityInfo[];
|
|
40
|
-
/**
|
|
41
|
-
* Converts a SkipEntityInfo to a partial EntityInfo object.
|
|
42
|
-
* Note: This creates a plain object with EntityInfo-compatible properties,
|
|
43
|
-
* not a full EntityInfo instance (which requires database context).
|
|
44
|
-
*
|
|
45
|
-
* @param skipEntity - The SkipEntityInfo to convert
|
|
46
|
-
* @returns A partial EntityInfo-compatible object
|
|
47
|
-
*/
|
|
48
|
-
export declare function MapSkipEntityInfoToEntityInfo(skipEntity: SkipEntityInfo): Partial<EntityInfo>;
|
|
49
|
-
/**
|
|
50
|
-
* Maps a MemberJunction EntityFieldInfo object to a SkipEntityFieldInfo object.
|
|
51
|
-
*
|
|
52
|
-
* This function converts detailed field metadata from MemberJunction's format to the Skip
|
|
53
|
-
* query system format, preserving all field properties including type information, constraints,
|
|
54
|
-
* relationships, and validation rules.
|
|
55
|
-
*
|
|
56
|
-
* @param f - The EntityFieldInfo object to be mapped
|
|
57
|
-
* @returns A SkipEntityFieldInfo object with all field properties mapped
|
|
58
|
-
*/
|
|
59
|
-
export declare function MapEntityFieldInfoToSkipEntityFieldInfo(f: EntityFieldInfo): SkipEntityFieldInfo;
|
|
60
|
-
/**
|
|
61
|
-
* Converts a SkipEntityFieldInfo to a partial EntityFieldInfo object.
|
|
62
|
-
* Note: This creates a plain object with EntityFieldInfo-compatible properties,
|
|
63
|
-
* not a full EntityFieldInfo instance (which requires database context).
|
|
64
|
-
*
|
|
65
|
-
* @param skipField - The SkipEntityFieldInfo to convert
|
|
66
|
-
* @returns A partial EntityFieldInfo-compatible object
|
|
67
|
-
*/
|
|
68
|
-
export declare function MapSkipEntityFieldInfoToEntityFieldInfo(skipField: SkipEntityFieldInfo): Partial<EntityFieldInfo>;
|
|
69
|
-
/**
|
|
70
|
-
* Maps a MemberJunction EntityFieldValueInfo object to a SkipEntityFieldValueInfo object.
|
|
71
|
-
*
|
|
72
|
-
* This function converts possible field values (used for dropdown lists, enums, and constraints)
|
|
73
|
-
* from MemberJunction's format to the Skip query system format. These values represent the
|
|
74
|
-
* allowed values for fields with restricted value lists.
|
|
75
|
-
*
|
|
76
|
-
* @param pv - The EntityFieldValueInfo object representing a possible value
|
|
77
|
-
* @returns A SkipEntityFieldValueInfo object with mapped value information
|
|
78
|
-
*/
|
|
79
|
-
export declare function MapEntityFieldValueInfoToSkipEntityFieldValueInfo(pv: EntityFieldValueInfo): SkipEntityFieldValueInfo;
|
|
80
|
-
/**
|
|
81
|
-
* Maps a MemberJunction EntityRelationshipInfo object to a SkipEntityRelationshipInfo object.
|
|
82
|
-
*
|
|
83
|
-
* This function converts entity relationship metadata from MemberJunction's format to the Skip
|
|
84
|
-
* query system format. Relationships define how entities are connected through foreign keys,
|
|
85
|
-
* joins, and other associations, enabling complex queries across related data.
|
|
86
|
-
*
|
|
87
|
-
* @param re - The EntityRelationshipInfo object to be mapped
|
|
88
|
-
* @returns A SkipEntityRelationshipInfo object with all relationship properties mapped
|
|
89
|
-
*/
|
|
90
|
-
export declare function MapEntityRelationshipInfoToSkipEntityRelationshipInfo(re: EntityRelationshipInfo): SkipEntityRelationshipInfo;
|
|
91
|
-
/**
|
|
92
|
-
* Maps a SimpleEntityInfo object to a SkipEntityInfo object.
|
|
93
|
-
*
|
|
94
|
-
* @param simpleEntity - The SimpleEntityInfo from @memberjunction/interactive-component-types
|
|
95
|
-
* @returns A SkipEntityInfo object
|
|
96
|
-
*/
|
|
97
|
-
export declare function MapSimpleEntityInfoToSkipEntityInfo(simpleEntity: SimpleEntityInfo): SkipEntityInfo;
|
|
98
|
-
/**
|
|
99
|
-
* Maps an array of SimpleEntityInfo objects to SkipEntityInfo objects.
|
|
100
|
-
*
|
|
101
|
-
* @param entities - Array of SimpleEntityInfo from @memberjunction/interactive-component-types
|
|
102
|
-
* @returns Array of SkipEntityInfo objects
|
|
103
|
-
*/
|
|
104
|
-
export declare function MapSimpleEntityInfoArrayToSkipEntityInfoArray(entities: SimpleEntityInfo[]): SkipEntityInfo[];
|
|
105
|
-
/**
|
|
106
|
-
* Converts a SkipEntityInfo to a SimpleEntityInfo object.
|
|
107
|
-
*
|
|
108
|
-
* @param skipEntity - The SkipEntityInfo to convert
|
|
109
|
-
* @returns A new SimpleEntityInfo instance
|
|
110
|
-
*/
|
|
111
|
-
export declare function MapSkipEntityInfoToSimpleEntityInfo(skipEntity: SkipEntityInfo): SimpleEntityInfo;
|
|
112
|
-
/**
|
|
113
|
-
* Maps a SimpleEntityFieldInfo object to a SkipEntityFieldInfo object.
|
|
114
|
-
*
|
|
115
|
-
* @param simpleField - The SimpleEntityFieldInfo from @memberjunction/interactive-component-types
|
|
116
|
-
* @returns A SkipEntityFieldInfo object
|
|
117
|
-
*/
|
|
118
|
-
export declare function MapSimpleEntityFieldInfoToSkipEntityFieldInfo(simpleField: SimpleEntityFieldInfo): SkipEntityFieldInfo;
|
|
119
|
-
/**
|
|
120
|
-
* Converts a SkipEntityFieldInfo to a SimpleEntityFieldInfo object.
|
|
121
|
-
*
|
|
122
|
-
* @param skipField - The SkipEntityFieldInfo to convert
|
|
123
|
-
* @returns A new SimpleEntityFieldInfo instance
|
|
124
|
-
*/
|
|
125
|
-
export declare function MapSkipEntityFieldInfoToSimpleEntityFieldInfo(skipField: SkipEntityFieldInfo): SimpleEntityFieldInfo;
|
|
126
|
-
/**
|
|
127
|
-
* Helper function to check if a field exists in a SkipEntityInfo
|
|
128
|
-
*
|
|
129
|
-
* @param entity - The SkipEntityInfo to check
|
|
130
|
-
* @param fieldName - The field name to check
|
|
131
|
-
* @returns True if the field exists, false otherwise
|
|
132
|
-
*/
|
|
133
|
-
export declare function skipEntityHasField(entity: SkipEntityInfo, fieldName: string): boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Helper function to get a field by name from a SkipEntityInfo
|
|
136
|
-
*
|
|
137
|
-
* @param entity - The SkipEntityInfo to search
|
|
138
|
-
* @param fieldName - The field name to find
|
|
139
|
-
* @returns The SkipEntityFieldInfo if found, undefined otherwise
|
|
140
|
-
*/
|
|
141
|
-
export declare function skipEntityGetField(entity: SkipEntityInfo, fieldName: string): SkipEntityFieldInfo | undefined;
|
|
142
|
-
/**
|
|
143
|
-
* Helper function to get all field names as a Set for efficient lookup
|
|
144
|
-
*
|
|
145
|
-
* @param entity - The SkipEntityInfo to get field names from
|
|
146
|
-
* @returns Set of all field names in the entity
|
|
4
|
+
* NOTE: Entity metadata conversion functions (MapEntityInfoToSkipEntityInfo, etc.)
|
|
5
|
+
* have been removed. Entity metadata is now passed directly as EntityInfo objects
|
|
6
|
+
* from @memberjunction/core — no intermediate Skip-specific entity types are needed.
|
|
7
|
+
* Use EntityInfo.toJSON() for serialization and new EntityInfo(data) for deserialization.
|
|
147
8
|
*/
|
|
148
|
-
export declare function skipEntityGetFieldNameSet(entity: SkipEntityInfo): Set<string>;
|
|
149
9
|
//# sourceMappingURL=util.d.ts.map
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/dist/util.js
CHANGED
|
@@ -1,378 +1,9 @@
|
|
|
1
|
-
import { Metadata } from "@memberjunction/core";
|
|
2
|
-
import { UUIDsEqual } from "@memberjunction/global";
|
|
3
|
-
import { SimpleEntityInfo, SimpleEntityFieldInfo } from "@memberjunction/interactive-component-types";
|
|
4
|
-
// ============================================================================
|
|
5
|
-
// EntityInfo <-> SkipEntityInfo conversions
|
|
6
|
-
// ============================================================================
|
|
7
1
|
/**
|
|
8
|
-
*
|
|
2
|
+
* Utility functions for working with Skip types.
|
|
9
3
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @returns A SkipEntityInfo object with mapped fields and relationships
|
|
15
|
-
*/
|
|
16
|
-
export function MapEntityInfoToSkipEntityInfo(e) {
|
|
17
|
-
return {
|
|
18
|
-
id: e.ID,
|
|
19
|
-
name: e.Name,
|
|
20
|
-
description: e.Description,
|
|
21
|
-
schemaName: e.SchemaName,
|
|
22
|
-
baseView: e.BaseView,
|
|
23
|
-
fields: e.Fields.map(f => MapEntityFieldInfoToSkipEntityFieldInfo(f)),
|
|
24
|
-
relatedEntities: e.RelatedEntities?.map(r => MapEntityRelationshipInfoToSkipEntityRelationshipInfo(r)) || [],
|
|
25
|
-
organicKeys: (e.OrganicKeys ?? [])
|
|
26
|
-
.filter(ok => ok.Status === 'Active')
|
|
27
|
-
.map(ok => MapEntityOrganicKeyInfoToSkipEntityOrganicKeyInfo(ok)),
|
|
28
|
-
rowsPacked: e.RowsToPackWithSchema,
|
|
29
|
-
rowsSampleMethod: e.RowsToPackSampleMethod
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Maps a MemberJunction EntityOrganicKeyInfo object to a SkipEntityOrganicKeyInfo object.
|
|
34
|
-
*
|
|
35
|
-
* Organic keys express cross-entity relationships via shared business data (email, acronym,
|
|
36
|
-
* domain, etc.) rather than database FK constraints.
|
|
37
|
-
*
|
|
38
|
-
* @param ok - The source EntityOrganicKeyInfo from MemberJunction core
|
|
39
|
-
* @returns A SkipEntityOrganicKeyInfo object
|
|
40
|
-
*/
|
|
41
|
-
export function MapEntityOrganicKeyInfoToSkipEntityOrganicKeyInfo(ok) {
|
|
42
|
-
return {
|
|
43
|
-
id: ok.ID,
|
|
44
|
-
name: ok.Name,
|
|
45
|
-
description: ok.Description ?? undefined,
|
|
46
|
-
matchFieldNames: ok.MatchFieldNamesArray,
|
|
47
|
-
normalizationStrategy: ok.NormalizationStrategy,
|
|
48
|
-
customNormalizationExpression: ok.CustomNormalizationExpression ?? undefined,
|
|
49
|
-
sequence: ok.Sequence,
|
|
50
|
-
relatedEntities: ok.RelatedEntities
|
|
51
|
-
.map(re => MapEntityOrganicKeyRelatedEntityInfoToSkipEntityOrganicKeyRelatedEntityInfo(re))
|
|
52
|
-
.filter((re) => re !== null)
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Maps a MemberJunction EntityOrganicKeyRelatedEntityInfo to its Skip equivalent.
|
|
57
|
-
* Looks up the related entity's schema name and base view from the global Metadata
|
|
58
|
-
* provider, since they are not stored on the organic key related entity directly.
|
|
59
|
-
*
|
|
60
|
-
* @param re - The source EntityOrganicKeyRelatedEntityInfo from MemberJunction core
|
|
61
|
-
* @returns A SkipEntityOrganicKeyRelatedEntityInfo, or null if the related entity cannot be resolved
|
|
62
|
-
*/
|
|
63
|
-
export function MapEntityOrganicKeyRelatedEntityInfoToSkipEntityOrganicKeyRelatedEntityInfo(re) {
|
|
64
|
-
const relatedEntity = Metadata.Provider?.Entities?.find(ent => UUIDsEqual(ent.ID, re.RelatedEntityID));
|
|
65
|
-
if (!relatedEntity) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
id: re.ID,
|
|
70
|
-
relatedEntityID: re.RelatedEntityID,
|
|
71
|
-
relatedEntityName: relatedEntity.Name,
|
|
72
|
-
relatedEntitySchemaName: relatedEntity.SchemaName,
|
|
73
|
-
relatedEntityBaseView: relatedEntity.BaseView,
|
|
74
|
-
isDirectMatch: re.IsDirectMatch,
|
|
75
|
-
isTransitiveMatch: re.IsTransitiveMatch,
|
|
76
|
-
relatedEntityFieldNames: re.IsDirectMatch ? re.RelatedEntityFieldNamesArray : undefined,
|
|
77
|
-
transitiveObjectName: re.TransitiveObjectName ?? undefined,
|
|
78
|
-
transitiveObjectMatchFieldNames: re.IsTransitiveMatch ? re.TransitiveObjectMatchFieldNamesArray : undefined,
|
|
79
|
-
transitiveObjectOutputFieldName: re.TransitiveObjectOutputFieldName ?? undefined,
|
|
80
|
-
relatedEntityJoinFieldName: re.RelatedEntityJoinFieldName ?? undefined,
|
|
81
|
-
displayName: re.DisplayName ?? undefined,
|
|
82
|
-
sequence: re.Sequence
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Maps an array of MemberJunction EntityInfo objects to SkipEntityInfo objects.
|
|
87
|
-
*
|
|
88
|
-
* @param entities - Array of EntityInfo from @memberjunction/core
|
|
89
|
-
* @returns Array of SkipEntityInfo objects
|
|
90
|
-
*/
|
|
91
|
-
export function MapEntityInfoArrayToSkipEntityInfoArray(entities) {
|
|
92
|
-
return entities.map(e => MapEntityInfoToSkipEntityInfo(e));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Converts a SkipEntityInfo to a partial EntityInfo object.
|
|
96
|
-
* Note: This creates a plain object with EntityInfo-compatible properties,
|
|
97
|
-
* not a full EntityInfo instance (which requires database context).
|
|
98
|
-
*
|
|
99
|
-
* @param skipEntity - The SkipEntityInfo to convert
|
|
100
|
-
* @returns A partial EntityInfo-compatible object
|
|
101
|
-
*/
|
|
102
|
-
export function MapSkipEntityInfoToEntityInfo(skipEntity) {
|
|
103
|
-
return {
|
|
104
|
-
ID: skipEntity.id,
|
|
105
|
-
Name: skipEntity.name,
|
|
106
|
-
Description: skipEntity.description,
|
|
107
|
-
SchemaName: skipEntity.schemaName,
|
|
108
|
-
BaseView: skipEntity.baseView,
|
|
109
|
-
RowsToPackWithSchema: skipEntity.rowsPacked,
|
|
110
|
-
RowsToPackSampleMethod: skipEntity.rowsSampleMethod
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
// ============================================================================
|
|
114
|
-
// EntityFieldInfo <-> SkipEntityFieldInfo conversions
|
|
115
|
-
// ============================================================================
|
|
116
|
-
/**
|
|
117
|
-
* Maps a MemberJunction EntityFieldInfo object to a SkipEntityFieldInfo object.
|
|
118
|
-
*
|
|
119
|
-
* This function converts detailed field metadata from MemberJunction's format to the Skip
|
|
120
|
-
* query system format, preserving all field properties including type information, constraints,
|
|
121
|
-
* relationships, and validation rules.
|
|
122
|
-
*
|
|
123
|
-
* @param f - The EntityFieldInfo object to be mapped
|
|
124
|
-
* @returns A SkipEntityFieldInfo object with all field properties mapped
|
|
125
|
-
*/
|
|
126
|
-
export function MapEntityFieldInfoToSkipEntityFieldInfo(f) {
|
|
127
|
-
return {
|
|
128
|
-
entityID: f.EntityID,
|
|
129
|
-
sequence: f.Sequence,
|
|
130
|
-
name: f.Name,
|
|
131
|
-
displayName: f.DisplayName,
|
|
132
|
-
description: f.Description,
|
|
133
|
-
isPrimaryKey: f.IsPrimaryKey,
|
|
134
|
-
isUnique: f.IsUnique,
|
|
135
|
-
category: f.Category,
|
|
136
|
-
type: f.Type,
|
|
137
|
-
length: f.Length,
|
|
138
|
-
precision: f.Precision,
|
|
139
|
-
scale: f.Scale,
|
|
140
|
-
sqlFullType: f.SQLFullType,
|
|
141
|
-
allowsNull: f.AllowsNull,
|
|
142
|
-
defaultValue: f.DefaultValue,
|
|
143
|
-
autoIncrement: f.AutoIncrement,
|
|
144
|
-
valueListType: f.ValueListType,
|
|
145
|
-
extendedType: f.ExtendedType,
|
|
146
|
-
defaultInView: f.DefaultInView,
|
|
147
|
-
defaultColumnWidth: f.DefaultColumnWidth,
|
|
148
|
-
isVirtual: f.IsVirtual,
|
|
149
|
-
isNameField: f.IsNameField,
|
|
150
|
-
relatedEntityID: f.RelatedEntityID,
|
|
151
|
-
relatedEntityFieldName: f.RelatedEntityFieldName,
|
|
152
|
-
relatedEntity: f.RelatedEntity,
|
|
153
|
-
relatedEntitySchemaName: f.RelatedEntitySchemaName,
|
|
154
|
-
relatedEntityBaseView: f.RelatedEntityBaseView,
|
|
155
|
-
possibleValues: f.EntityFieldValues?.map(v => ({
|
|
156
|
-
value: v.Value,
|
|
157
|
-
displayValue: v.Code !== v.Value ? v.Code : undefined
|
|
158
|
-
}))
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Converts a SkipEntityFieldInfo to a partial EntityFieldInfo object.
|
|
163
|
-
* Note: This creates a plain object with EntityFieldInfo-compatible properties,
|
|
164
|
-
* not a full EntityFieldInfo instance (which requires database context).
|
|
165
|
-
*
|
|
166
|
-
* @param skipField - The SkipEntityFieldInfo to convert
|
|
167
|
-
* @returns A partial EntityFieldInfo-compatible object
|
|
168
|
-
*/
|
|
169
|
-
export function MapSkipEntityFieldInfoToEntityFieldInfo(skipField) {
|
|
170
|
-
return {
|
|
171
|
-
EntityID: skipField.entityID,
|
|
172
|
-
Sequence: skipField.sequence,
|
|
173
|
-
Name: skipField.name,
|
|
174
|
-
DisplayName: skipField.displayName,
|
|
175
|
-
Description: skipField.description,
|
|
176
|
-
IsPrimaryKey: skipField.isPrimaryKey,
|
|
177
|
-
IsUnique: skipField.isUnique,
|
|
178
|
-
Category: skipField.category,
|
|
179
|
-
Type: skipField.type,
|
|
180
|
-
Length: skipField.length,
|
|
181
|
-
Precision: skipField.precision,
|
|
182
|
-
Scale: skipField.scale,
|
|
183
|
-
AllowsNull: skipField.allowsNull,
|
|
184
|
-
DefaultValue: skipField.defaultValue,
|
|
185
|
-
AutoIncrement: skipField.autoIncrement,
|
|
186
|
-
ValueListType: skipField.valueListType,
|
|
187
|
-
ExtendedType: skipField.extendedType,
|
|
188
|
-
DefaultInView: skipField.defaultInView,
|
|
189
|
-
DefaultColumnWidth: skipField.defaultColumnWidth,
|
|
190
|
-
IsVirtual: skipField.isVirtual,
|
|
191
|
-
IsNameField: skipField.isNameField,
|
|
192
|
-
RelatedEntityID: skipField.relatedEntityID,
|
|
193
|
-
RelatedEntityFieldName: skipField.relatedEntityFieldName
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
// ============================================================================
|
|
197
|
-
// EntityFieldValueInfo <-> SkipEntityFieldValueInfo conversions
|
|
198
|
-
// ============================================================================
|
|
199
|
-
/**
|
|
200
|
-
* Maps a MemberJunction EntityFieldValueInfo object to a SkipEntityFieldValueInfo object.
|
|
201
|
-
*
|
|
202
|
-
* This function converts possible field values (used for dropdown lists, enums, and constraints)
|
|
203
|
-
* from MemberJunction's format to the Skip query system format. These values represent the
|
|
204
|
-
* allowed values for fields with restricted value lists.
|
|
205
|
-
*
|
|
206
|
-
* @param pv - The EntityFieldValueInfo object representing a possible value
|
|
207
|
-
* @returns A SkipEntityFieldValueInfo object with mapped value information
|
|
208
|
-
*/
|
|
209
|
-
export function MapEntityFieldValueInfoToSkipEntityFieldValueInfo(pv) {
|
|
210
|
-
return {
|
|
211
|
-
value: pv.Value,
|
|
212
|
-
displayValue: pv.Value
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
// ============================================================================
|
|
216
|
-
// EntityRelationshipInfo <-> SkipEntityRelationshipInfo conversions
|
|
217
|
-
// ============================================================================
|
|
218
|
-
/**
|
|
219
|
-
* Maps a MemberJunction EntityRelationshipInfo object to a SkipEntityRelationshipInfo object.
|
|
220
|
-
*
|
|
221
|
-
* This function converts entity relationship metadata from MemberJunction's format to the Skip
|
|
222
|
-
* query system format. Relationships define how entities are connected through foreign keys,
|
|
223
|
-
* joins, and other associations, enabling complex queries across related data.
|
|
224
|
-
*
|
|
225
|
-
* @param re - The EntityRelationshipInfo object to be mapped
|
|
226
|
-
* @returns A SkipEntityRelationshipInfo object with all relationship properties mapped
|
|
227
|
-
*/
|
|
228
|
-
export function MapEntityRelationshipInfoToSkipEntityRelationshipInfo(re) {
|
|
229
|
-
return {
|
|
230
|
-
entityID: re.EntityID,
|
|
231
|
-
entity: re.Entity,
|
|
232
|
-
entityBaseView: re.EntityBaseView,
|
|
233
|
-
entityKeyField: re.EntityKeyField,
|
|
234
|
-
relatedEntityID: re.RelatedEntityID,
|
|
235
|
-
relatedEntityJoinField: re.RelatedEntityJoinField,
|
|
236
|
-
relatedEntityBaseView: re.RelatedEntityBaseView,
|
|
237
|
-
relatedEntity: re.RelatedEntity,
|
|
238
|
-
type: re.Type,
|
|
239
|
-
joinEntityInverseJoinField: re.JoinEntityInverseJoinField,
|
|
240
|
-
joinView: re.JoinView,
|
|
241
|
-
joinEntityJoinField: re.JoinEntityJoinField,
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
// ============================================================================
|
|
245
|
-
// SimpleEntityInfo <-> SkipEntityInfo conversions
|
|
246
|
-
// ============================================================================
|
|
247
|
-
/**
|
|
248
|
-
* Maps a SimpleEntityInfo object to a SkipEntityInfo object.
|
|
249
|
-
*
|
|
250
|
-
* @param simpleEntity - The SimpleEntityInfo from @memberjunction/interactive-component-types
|
|
251
|
-
* @returns A SkipEntityInfo object
|
|
252
|
-
*/
|
|
253
|
-
export function MapSimpleEntityInfoToSkipEntityInfo(simpleEntity) {
|
|
254
|
-
return {
|
|
255
|
-
id: '',
|
|
256
|
-
name: simpleEntity.name,
|
|
257
|
-
description: simpleEntity.description,
|
|
258
|
-
schemaName: '',
|
|
259
|
-
baseView: '',
|
|
260
|
-
fields: simpleEntity.fields.map(f => MapSimpleEntityFieldInfoToSkipEntityFieldInfo(f)),
|
|
261
|
-
relatedEntities: [],
|
|
262
|
-
organicKeys: []
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Maps an array of SimpleEntityInfo objects to SkipEntityInfo objects.
|
|
267
|
-
*
|
|
268
|
-
* @param entities - Array of SimpleEntityInfo from @memberjunction/interactive-component-types
|
|
269
|
-
* @returns Array of SkipEntityInfo objects
|
|
270
|
-
*/
|
|
271
|
-
export function MapSimpleEntityInfoArrayToSkipEntityInfoArray(entities) {
|
|
272
|
-
return entities.map(e => MapSimpleEntityInfoToSkipEntityInfo(e));
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Converts a SkipEntityInfo to a SimpleEntityInfo object.
|
|
276
|
-
*
|
|
277
|
-
* @param skipEntity - The SkipEntityInfo to convert
|
|
278
|
-
* @returns A new SimpleEntityInfo instance
|
|
279
|
-
*/
|
|
280
|
-
export function MapSkipEntityInfoToSimpleEntityInfo(skipEntity) {
|
|
281
|
-
return new SimpleEntityInfo({
|
|
282
|
-
name: skipEntity.name,
|
|
283
|
-
description: skipEntity.description,
|
|
284
|
-
fields: skipEntity.fields.map(f => MapSkipEntityFieldInfoToSimpleEntityFieldInfo(f))
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
// ============================================================================
|
|
288
|
-
// SimpleEntityFieldInfo <-> SkipEntityFieldInfo conversions
|
|
289
|
-
// ============================================================================
|
|
290
|
-
/**
|
|
291
|
-
* Maps a SimpleEntityFieldInfo object to a SkipEntityFieldInfo object.
|
|
292
|
-
*
|
|
293
|
-
* @param simpleField - The SimpleEntityFieldInfo from @memberjunction/interactive-component-types
|
|
294
|
-
* @returns A SkipEntityFieldInfo object
|
|
295
|
-
*/
|
|
296
|
-
export function MapSimpleEntityFieldInfoToSkipEntityFieldInfo(simpleField) {
|
|
297
|
-
return {
|
|
298
|
-
entityID: '',
|
|
299
|
-
sequence: simpleField.sequence,
|
|
300
|
-
name: simpleField.name,
|
|
301
|
-
displayName: undefined,
|
|
302
|
-
description: simpleField.description,
|
|
303
|
-
isPrimaryKey: simpleField.isPrimaryKey,
|
|
304
|
-
isUnique: false,
|
|
305
|
-
category: undefined,
|
|
306
|
-
type: simpleField.type,
|
|
307
|
-
length: 0,
|
|
308
|
-
precision: 0,
|
|
309
|
-
scale: 0,
|
|
310
|
-
sqlFullType: '',
|
|
311
|
-
allowsNull: simpleField.allowsNull,
|
|
312
|
-
defaultValue: '',
|
|
313
|
-
autoIncrement: false,
|
|
314
|
-
valueListType: undefined,
|
|
315
|
-
extendedType: undefined,
|
|
316
|
-
defaultInView: simpleField.defaultInView,
|
|
317
|
-
defaultColumnWidth: 0,
|
|
318
|
-
isVirtual: false,
|
|
319
|
-
isNameField: false,
|
|
320
|
-
relatedEntityID: undefined,
|
|
321
|
-
relatedEntityFieldName: undefined,
|
|
322
|
-
relatedEntity: undefined,
|
|
323
|
-
relatedEntitySchemaName: undefined,
|
|
324
|
-
relatedEntityBaseView: undefined,
|
|
325
|
-
possibleValues: simpleField.possibleValues?.map(v => ({ value: v }))
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Converts a SkipEntityFieldInfo to a SimpleEntityFieldInfo object.
|
|
330
|
-
*
|
|
331
|
-
* @param skipField - The SkipEntityFieldInfo to convert
|
|
332
|
-
* @returns A new SimpleEntityFieldInfo instance
|
|
333
|
-
*/
|
|
334
|
-
export function MapSkipEntityFieldInfoToSimpleEntityFieldInfo(skipField) {
|
|
335
|
-
return new SimpleEntityFieldInfo({
|
|
336
|
-
name: skipField.name,
|
|
337
|
-
sequence: skipField.sequence,
|
|
338
|
-
defaultInView: skipField.defaultInView,
|
|
339
|
-
type: skipField.type,
|
|
340
|
-
allowsNull: skipField.allowsNull,
|
|
341
|
-
isPrimaryKey: skipField.isPrimaryKey,
|
|
342
|
-
description: skipField.description,
|
|
343
|
-
possibleValues: skipField.possibleValues?.map(v => v.value)
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
// ============================================================================
|
|
347
|
-
// Helper functions for working with SkipEntityInfo
|
|
348
|
-
// ============================================================================
|
|
349
|
-
/**
|
|
350
|
-
* Helper function to check if a field exists in a SkipEntityInfo
|
|
351
|
-
*
|
|
352
|
-
* @param entity - The SkipEntityInfo to check
|
|
353
|
-
* @param fieldName - The field name to check
|
|
354
|
-
* @returns True if the field exists, false otherwise
|
|
355
|
-
*/
|
|
356
|
-
export function skipEntityHasField(entity, fieldName) {
|
|
357
|
-
return entity.fields.some(f => f.name === fieldName);
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Helper function to get a field by name from a SkipEntityInfo
|
|
361
|
-
*
|
|
362
|
-
* @param entity - The SkipEntityInfo to search
|
|
363
|
-
* @param fieldName - The field name to find
|
|
364
|
-
* @returns The SkipEntityFieldInfo if found, undefined otherwise
|
|
365
|
-
*/
|
|
366
|
-
export function skipEntityGetField(entity, fieldName) {
|
|
367
|
-
return entity.fields.find(f => f.name === fieldName);
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Helper function to get all field names as a Set for efficient lookup
|
|
371
|
-
*
|
|
372
|
-
* @param entity - The SkipEntityInfo to get field names from
|
|
373
|
-
* @returns Set of all field names in the entity
|
|
4
|
+
* NOTE: Entity metadata conversion functions (MapEntityInfoToSkipEntityInfo, etc.)
|
|
5
|
+
* have been removed. Entity metadata is now passed directly as EntityInfo objects
|
|
6
|
+
* from @memberjunction/core — no intermediate Skip-specific entity types are needed.
|
|
7
|
+
* Use EntityInfo.toJSON() for serialization and new EntityInfo(data) for deserialization.
|
|
374
8
|
*/
|
|
375
|
-
export function skipEntityGetFieldNameSet(entity) {
|
|
376
|
-
return new Set(entity.fields.map(f => f.name));
|
|
377
|
-
}
|
|
378
9
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/skip-types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.27.1",
|
|
5
5
|
"description": "MemberJunction: Skip AI Assistant - Types that are used between the MJAPI and the Skip API as well as the UI within MemberJunction Explorer",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"typescript": "^5.9.3"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@memberjunction/ai-core-plus": "5.
|
|
24
|
-
"@memberjunction/core": "5.
|
|
25
|
-
"@memberjunction/data-context": "5.
|
|
26
|
-
"@memberjunction/global": "5.
|
|
27
|
-
"@memberjunction/interactive-component-types": "5.
|
|
28
|
-
"@memberjunction/sql-dialect": "5.
|
|
23
|
+
"@memberjunction/ai-core-plus": "5.27.1",
|
|
24
|
+
"@memberjunction/core": "5.27.1",
|
|
25
|
+
"@memberjunction/data-context": "5.27.1",
|
|
26
|
+
"@memberjunction/global": "5.27.1",
|
|
27
|
+
"@memberjunction/interactive-component-types": "5.27.1",
|
|
28
|
+
"@memberjunction/sql-dialect": "5.27.1"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 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.
|
|
3
|
-
*/
|
|
4
|
-
export interface SkipColumnInfo {
|
|
5
|
-
fieldName: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
simpleDataType: 'string' | 'number' | 'date' | 'boolean';
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Enumerates the possible values for a given field
|
|
12
|
-
*/
|
|
13
|
-
export interface SkipEntityFieldValueInfo {
|
|
14
|
-
/**
|
|
15
|
-
* Possible value
|
|
16
|
-
*/
|
|
17
|
-
value: string;
|
|
18
|
-
/**
|
|
19
|
-
* Value to show user, if different from value
|
|
20
|
-
*/
|
|
21
|
-
displayValue?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Describes a single field in an entity.
|
|
25
|
-
*/
|
|
26
|
-
export interface SkipEntityFieldInfo {
|
|
27
|
-
entityID: string;
|
|
28
|
-
sequence: number;
|
|
29
|
-
name: string;
|
|
30
|
-
displayName?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
isPrimaryKey: boolean;
|
|
33
|
-
isUnique: boolean;
|
|
34
|
-
category?: string;
|
|
35
|
-
type: string;
|
|
36
|
-
length: number;
|
|
37
|
-
precision: number;
|
|
38
|
-
scale: number;
|
|
39
|
-
sqlFullType: string;
|
|
40
|
-
allowsNull: boolean;
|
|
41
|
-
defaultValue: string;
|
|
42
|
-
autoIncrement: boolean;
|
|
43
|
-
valueListType?: string;
|
|
44
|
-
extendedType?: string;
|
|
45
|
-
defaultInView: boolean;
|
|
46
|
-
defaultColumnWidth: number;
|
|
47
|
-
isVirtual: boolean;
|
|
48
|
-
isNameField: boolean;
|
|
49
|
-
relatedEntityID?: string;
|
|
50
|
-
relatedEntityFieldName?: string;
|
|
51
|
-
relatedEntity?: string;
|
|
52
|
-
relatedEntitySchemaName?: string;
|
|
53
|
-
relatedEntityBaseView?: string;
|
|
54
|
-
possibleValues?: SkipEntityFieldValueInfo[];
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Defines relationships between entities, including foreign key relationships and
|
|
58
|
-
* many-to-many relationships through junction tables.
|
|
59
|
-
*/
|
|
60
|
-
export interface SkipEntityRelationshipInfo {
|
|
61
|
-
entityID: string;
|
|
62
|
-
relatedEntityID: string;
|
|
63
|
-
type: string;
|
|
64
|
-
entityKeyField: string;
|
|
65
|
-
relatedEntityJoinField: string;
|
|
66
|
-
joinView: string;
|
|
67
|
-
joinEntityJoinField: string;
|
|
68
|
-
joinEntityInverseJoinField: string;
|
|
69
|
-
entity: string;
|
|
70
|
-
entityBaseView: string;
|
|
71
|
-
relatedEntity: string;
|
|
72
|
-
relatedEntityBaseView: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Information about a related entity matched via an organic key.
|
|
76
|
-
* Either direct (relatedEntityFieldNames) or transitive (transitiveObjectName + bridge fields).
|
|
77
|
-
*/
|
|
78
|
-
export interface SkipEntityOrganicKeyRelatedEntityInfo {
|
|
79
|
-
id: string;
|
|
80
|
-
relatedEntityID: string;
|
|
81
|
-
relatedEntityName: string;
|
|
82
|
-
relatedEntitySchemaName: string;
|
|
83
|
-
relatedEntityBaseView: string;
|
|
84
|
-
/** True if this is a direct field-to-field match. */
|
|
85
|
-
isDirectMatch: boolean;
|
|
86
|
-
/** True if this is a transitive match through a bridge view. */
|
|
87
|
-
isTransitiveMatch: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* For direct matches: field names in the related entity, positionally aligned
|
|
90
|
-
* with the parent organic key's matchFieldNames.
|
|
91
|
-
*/
|
|
92
|
-
relatedEntityFieldNames?: string[];
|
|
93
|
-
/** For transitive matches: schema-qualified name of the bridge view/table. */
|
|
94
|
-
transitiveObjectName?: string;
|
|
95
|
-
/** For transitive matches: fields in the bridge that match the organic key. */
|
|
96
|
-
transitiveObjectMatchFieldNames?: string[];
|
|
97
|
-
/** For transitive matches: output field from the bridge that joins to the related entity. */
|
|
98
|
-
transitiveObjectOutputFieldName?: string;
|
|
99
|
-
/** For transitive matches: field in the related entity matching the bridge output. */
|
|
100
|
-
relatedEntityJoinFieldName?: string;
|
|
101
|
-
displayName?: string;
|
|
102
|
-
sequence: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Information about an organic key defined on an entity.
|
|
106
|
-
* Organic keys express cross-entity relationships via shared business data
|
|
107
|
-
* (email, acronym, domain, etc.) rather than database FK constraints.
|
|
108
|
-
*/
|
|
109
|
-
export interface SkipEntityOrganicKeyInfo {
|
|
110
|
-
id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
description?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Comma-delimited field names parsed into an array. Single value for simple
|
|
115
|
-
* keys, multiple for compound keys.
|
|
116
|
-
*/
|
|
117
|
-
matchFieldNames: string[];
|
|
118
|
-
/** How to normalize values before comparison. */
|
|
119
|
-
normalizationStrategy: 'LowerCaseTrim' | 'Trim' | 'ExactMatch' | 'Custom';
|
|
120
|
-
/** SQL expression template (uses {{FieldName}} placeholder) when strategy is Custom. */
|
|
121
|
-
customNormalizationExpression?: string;
|
|
122
|
-
sequence: number;
|
|
123
|
-
relatedEntities: SkipEntityOrganicKeyRelatedEntityInfo[];
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Info about a single entity including fields and relationships
|
|
127
|
-
*/
|
|
128
|
-
export interface SkipEntityInfo {
|
|
129
|
-
id: string;
|
|
130
|
-
name: string;
|
|
131
|
-
description?: string;
|
|
132
|
-
schemaName: string;
|
|
133
|
-
baseView: string;
|
|
134
|
-
fields: SkipEntityFieldInfo[];
|
|
135
|
-
relatedEntities: SkipEntityRelationshipInfo[];
|
|
136
|
-
/**
|
|
137
|
-
* Organic keys defined on this entity. Empty array if none.
|
|
138
|
-
* Organic keys express cross-entity relationships via shared business data
|
|
139
|
-
* (email, acronym, domain, etc.) rather than database FK constraints. Skip
|
|
140
|
-
* should treat these as additional valid join paths beyond `relatedEntities`.
|
|
141
|
-
*/
|
|
142
|
-
organicKeys: SkipEntityOrganicKeyInfo[];
|
|
143
|
-
/**
|
|
144
|
-
* If rows packed is set to anything other than none, the data is provided in the rows property.
|
|
145
|
-
*/
|
|
146
|
-
rowsPacked?: 'None' | 'Sample' | 'All';
|
|
147
|
-
/**
|
|
148
|
-
* If rowsPacked === 'Sample', this additional property is used to indicate the method used to sample the rows
|
|
149
|
-
*/
|
|
150
|
-
rowsSampleMethod?: 'random' | 'top n' | 'bottom n';
|
|
151
|
-
/**
|
|
152
|
-
* 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.
|
|
153
|
-
*/
|
|
154
|
-
rows?: unknown[];
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=entity-metadata-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity-metadata-types.d.ts","sourceRoot":"","sources":["../src/entity-metadata-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAA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