@fluid-topics/public-api 1.0.66 → 1.0.68
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/build/cjs/index.js +10 -0
- package/build/cjs/types/ft-common/public.js +22 -21
- package/build/cjs/types/ft-server/public.js +21 -3
- package/build/mjs/index.d.ts +7 -1
- package/build/mjs/index.js +10 -0
- package/build/mjs/types/ft-common/public.d.ts +14 -14
- package/build/mjs/types/ft-common/public.js +19 -17
- package/build/mjs/types/ft-server/public.d.ts +13 -2
- package/build/mjs/types/ft-server/public.js +18 -2
- package/build/rollup/fluidtopics.min.js +1 -1
- package/build/test-results/web-components.xml +3 -3
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/types/ft-common/public.js +22 -21
- package/dist/cjs/types/ft-server/public.js +21 -3
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/index.d.ts +7 -1
- package/dist/mjs/index.js +10 -0
- package/dist/mjs/types/ft-common/public.d.ts +14 -14
- package/dist/mjs/types/ft-common/public.js +19 -17
- package/dist/mjs/types/ft-server/public.d.ts +13 -2
- package/dist/mjs/types/ft-server/public.js +18 -2
- package/package.json +1 -1
- package/.npmignore +0 -8
- package/.yarnrc +0 -1
- package/yarn.lock +0 -4132
|
@@ -95,6 +95,22 @@ export const isFtPaginationConfiguration = (o) => {
|
|
|
95
95
|
return isObject(o)
|
|
96
96
|
&& (isBoolean(o.splitCurrentPageToc));
|
|
97
97
|
};
|
|
98
|
+
export const isFtClusteredSemanticSearchReply = (o) => {
|
|
99
|
+
return isObject(o)
|
|
100
|
+
&& ((Array.isArray(o.documents)
|
|
101
|
+
&& o.documents.every((v) => isFtSemanticSearchResponseItem(v))))
|
|
102
|
+
&& ((Array.isArray(o.clusterId)
|
|
103
|
+
&& o.clusterId.every((v) => isString(v))));
|
|
104
|
+
};
|
|
105
|
+
export const isFtSemanticSearchResponseItem = (o) => {
|
|
106
|
+
return isObject(o)
|
|
107
|
+
&& ((isObject(o.metadata)
|
|
108
|
+
&& Object.keys(o.metadata).every((k) => isString(k))
|
|
109
|
+
&& Object.values(o.metadata).every((v) => (Array.isArray(v)
|
|
110
|
+
&& v.every((v) => isString(v))))))
|
|
111
|
+
&& (isString(o.excerpt))
|
|
112
|
+
&& (isNumber(o.relevance));
|
|
113
|
+
};
|
|
98
114
|
export const isFtSemanticSearchFilter = (o) => {
|
|
99
115
|
return isObject(o)
|
|
100
116
|
&& ((Array.isArray(o.values)
|
|
@@ -104,7 +120,7 @@ export const isFtSemanticSearchFilter = (o) => {
|
|
|
104
120
|
export const isFtSemanticSearchRequest = (o) => {
|
|
105
121
|
return isObject(o)
|
|
106
122
|
&& (isString(o.query))
|
|
107
|
-
&& ((Array.isArray(o.filters)
|
|
123
|
+
&& (o.filters == null || (Array.isArray(o.filters)
|
|
108
124
|
&& o.filters.every((v) => isFtSemanticSearchFilter(v))))
|
|
109
|
-
&& (isNumber(o.nbResults));
|
|
125
|
+
&& (o.nbResults == null || isNumber(o.nbResults));
|
|
110
126
|
};
|
package/package.json
CHANGED
package/.npmignore
DELETED
package/.yarnrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--frozen-lockfile false
|