@omnia/fx-models 7.8.144-preview → 7.8.145-preview
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/Constants.d.ts
CHANGED
package/Constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
import { GuidValue } from "@omnia/fx-
|
|
2
|
-
|
|
1
|
+
import { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
|
2
|
+
import { EnterprisePropertyDefinition } from "../enterprise-properties";
|
|
3
|
+
export declare class SemanticSearchQueryableProperty {
|
|
3
4
|
internalName: string;
|
|
4
5
|
dataType: SemanticSearchPropertyDataType;
|
|
6
|
+
constructor(internalName: string, dataType: SemanticSearchPropertyDataType);
|
|
7
|
+
isEnterpriseProperty: () => boolean;
|
|
8
|
+
getProviderInternalName: () => string;
|
|
9
|
+
}
|
|
10
|
+
export declare class SemanticSearchQueryableEnterpriseProperty extends SemanticSearchQueryableProperty {
|
|
11
|
+
constructor(definition: EnterprisePropertyDefinition);
|
|
12
|
+
private static getSemanticSearchDataType;
|
|
13
|
+
}
|
|
14
|
+
export interface SemanticSearchQueryablePropertyCreation {
|
|
15
|
+
internalName: string;
|
|
16
|
+
dataType: SemanticSearchPropertyDataType;
|
|
17
|
+
isEnterpriseProperty: boolean;
|
|
5
18
|
}
|
|
6
19
|
export declare enum SemanticSearchPropertyDataType {
|
|
7
20
|
String = 0,
|
|
@@ -11,9 +24,8 @@ export declare enum SemanticSearchPropertyDataType {
|
|
|
11
24
|
DateTimeOffset = 4
|
|
12
25
|
}
|
|
13
26
|
export interface SemanticSearchPropertyDefinition {
|
|
14
|
-
|
|
27
|
+
property: SemanticSearchQueryableProperty;
|
|
15
28
|
multilingualTitle: string;
|
|
16
29
|
displayTypeTitle: string;
|
|
17
30
|
providerId: GuidValue;
|
|
18
|
-
dataType?: SemanticSearchPropertyDataType;
|
|
19
31
|
}
|
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SemanticSearchPropertyDataType = void 0;
|
|
3
|
+
exports.SemanticSearchPropertyDataType = exports.SemanticSearchQueryableEnterpriseProperty = exports.SemanticSearchQueryableProperty = void 0;
|
|
4
|
+
const Constants_1 = require("../Constants");
|
|
5
|
+
const Enums_1 = require("../Enums");
|
|
6
|
+
class SemanticSearchQueryableProperty {
|
|
7
|
+
constructor(internalName, dataType) {
|
|
8
|
+
this.isEnterpriseProperty = () => this.internalName.startsWith(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix);
|
|
9
|
+
this.getProviderInternalName = () => {
|
|
10
|
+
if (this.isEnterpriseProperty()) {
|
|
11
|
+
return this.internalName.substring(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix.length);
|
|
12
|
+
}
|
|
13
|
+
return this.internalName;
|
|
14
|
+
};
|
|
15
|
+
this.internalName = internalName;
|
|
16
|
+
this.dataType = dataType;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.SemanticSearchQueryableProperty = SemanticSearchQueryableProperty;
|
|
20
|
+
class SemanticSearchQueryableEnterpriseProperty extends SemanticSearchQueryableProperty {
|
|
21
|
+
constructor(definition) {
|
|
22
|
+
const dataType = SemanticSearchQueryableEnterpriseProperty.getSemanticSearchDataType(definition);
|
|
23
|
+
super(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix + definition.internalName, dataType);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SemanticSearchQueryableEnterpriseProperty = SemanticSearchQueryableEnterpriseProperty;
|
|
27
|
+
SemanticSearchQueryableEnterpriseProperty.getSemanticSearchDataType = (definition) => {
|
|
28
|
+
switch (definition.enterprisePropertyDataType.indexedType) {
|
|
29
|
+
case Enums_1.PropertyIndexedType.Text:
|
|
30
|
+
return SemanticSearchPropertyDataType.String;
|
|
31
|
+
case Enums_1.PropertyIndexedType.Boolean:
|
|
32
|
+
return SemanticSearchPropertyDataType.Int32;
|
|
33
|
+
case Enums_1.PropertyIndexedType.Taxonomy:
|
|
34
|
+
return SemanticSearchPropertyDataType.StringCollection;
|
|
35
|
+
case Enums_1.PropertyIndexedType.DateTime:
|
|
36
|
+
return SemanticSearchPropertyDataType.DateTimeOffset;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
4
40
|
var SemanticSearchPropertyDataType;
|
|
5
41
|
(function (SemanticSearchPropertyDataType) {
|
|
6
42
|
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["String"] = 0] = "String";
|