[PRODENG-211] integrate JS-API with monorepo (part 1) (#9081)

* integrate JS-API with monorepo

* [ci:force] fix token issue

[ci:force] migrate docs folder

[ci:force] clean personal tokens

* [ci:force] gha workflow support

* [ci:force] npm publish target

* fix js-api test linting

* [ci:force] fix test linting, mocks, https scheme

* [ci:force] fix https scheme

* [ci:force] typescript mappings

* [ci:force] update scripts

* lint fixes

* linting fixes

* fix linting

* [ci:force] linting fixes

* linting fixes

* [ci:force] remove js-api upstream and corresponding scripts

* [ci:force] jsdoc fixes

* fix jsdoc linting

* [ci:force] jsdoc fixes

* [ci:force] jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* [ci:force] fix jsdoc

* [ci:force] reduce code duplication

* replace 'chai' expect with node.js assert

* replace 'chai' expect with node.js assert

* [ci:force] remove chai and chai-spies for js-api testing

* [ci:force] cleanup and fix imports

* [ci:force] fix linting

* [ci:force] fix unit test

* [ci:force] fix sonar linting findings

* [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle)

* [ci:force] switch activiti api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch search api models to interfaces

* [ci:force] switch content api models to interfaces where applicable
This commit is contained in:
Denys Vuika
2023-11-21 10:27:51 +00:00
committed by GitHub
parent 804fa2ffd4
commit ea2c0ce229
1334 changed files with 82605 additions and 1068 deletions

View File

@@ -0,0 +1,12 @@
# ContentInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mimeType** | **string** | | [default to null]
**mimeTypeName** | **string** | | [default to null]
**sizeInBytes** | **number** | | [default to null]
**encoding** | **string** | | [optional] [default to null]
**mimeTypeGroup** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,8 @@
# ModelError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**ErrorError**](ErrorError.md) | | [optional] [default to null]

View File

@@ -0,0 +1,13 @@
# ErrorError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**errorKey** | **string** | | [optional] [default to null]
**statusCode** | **number** | | [default to null]
**briefSummary** | **string** | | [default to null]
**stackTrace** | **string** | | [default to null]
**descriptionURL** | **string** | | [default to null]
**logId** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,13 @@
# GenericBucket
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **string** | The bucket label | [optional] [default to null]
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
**display** | **any** | An optional field for additional display information | [optional] [default to null]
**metrics** | [**GenericMetric[]**](GenericMetric.md) | An array of buckets and values | [optional] [default to null]
**facets** | **any[]** | Additional list of nested facets | [optional] [default to null]
**bucketInfo** | [**GenericBucketBucketInfo**](GenericBucketBucketInfo.md) | | [optional] [default to null]

View File

@@ -0,0 +1,11 @@
# GenericBucketBucketInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**start** | **string** | The start of range | [optional] [default to null]
**startInclusive** | **boolean** | Includes values greater or equal to \"start\" | [optional] [default to null]
**end** | **string** | The end of range | [optional] [default to null]
**endInclusive** | **boolean** | Includes values less than or equal to \"end\" | [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# GenericFacetResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | The facet type, eg. interval, range, pivot, stats | [optional] [default to null]
**label** | **string** | The field name or its explicit label, if provided on the request | [optional] [default to null]
**buckets** | [**GenericBucket[]**](GenericBucket.md) | An array of buckets and values | [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# GenericMetric
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | The type of metric, e.g. count | [optional] [default to null]
**value** | **any** | The metric value, e.g. {\"count\": 34}
| [optional] [default to null]

View File

@@ -0,0 +1,26 @@
# Node
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**name** | **string** | The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |.
The character . must not be used at the end of the name.
| [default to null]
**nodeType** | **string** | | [default to null]
**isFolder** | **boolean** | | [default to null]
**isFile** | **boolean** | | [default to null]
**isLocked** | **boolean** | | [optional] [default to null]
**modifiedAt** | [**Date**](Date.md) | | [default to null]
**modifiedByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
**createdAt** | [**Date**](Date.md) | | [default to null]
**createdByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
**parentId** | **string** | | [optional] [default to null]
**isLink** | **boolean** | | [optional] [default to null]
**content** | [**ContentInfo**](ContentInfo.md) | | [optional] [default to null]
**aspectNames** | **string[]** | | [optional] [default to null]
**properties** | **any** | | [optional] [default to null]
**allowableOperations** | **string[]** | | [optional] [default to null]
**path** | [**PathInfo**](PathInfo.md) | | [optional] [default to null]

View File

@@ -0,0 +1,23 @@
# Pagination
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **number** | The number of objects in the entries array.
| [default to null]
**hasMoreItems** | **boolean** | A boolean value which is **true** if there are more entities in the collection
beyond those in this response. A true value means a request with a larger value
for the **skipCount** or the **maxItems** parameter will return more entities.
| [default to null]
**totalItems** | **number** | An integer describing the total number of entities in the collection.
The API might not be able to determine this value,
in which case this property will not be present.
| [optional] [default to null]
**skipCount** | **number** | An integer describing how many entities exist in the collection before
those included in this list.
| [default to null]
**maxItems** | **number** | The value of the **maxItems** parameter used to generate this list,
or if there was no **maxItems** parameter the default value is 100
| [default to null]

View File

@@ -0,0 +1,9 @@
# PathElement
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional] [default to null]
**name** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# PathInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**elements** | [**PathElement[]**](PathElement.md) | | [optional] [default to null]
**name** | **string** | | [optional] [default to null]
**isComplete** | **boolean** | | [optional] [default to null]

View File

@@ -0,0 +1,43 @@
# RequestDefaults
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**textAttributes** | **string[]** | A list of query fields/properties used to expand TEXT: queries.
The default is cm:content.
You could include all content properties using d:content or list all individual content properties or types.
As more terms are included the query size, complexity, memory impact and query time will increase.
| [optional] [default to null]
**defaultFTSOperator** | **string** | The default way to combine query parts when AND or OR is not explicitly stated - includes ! - +
one two three
(one two three)
| [optional] [default to null]
**defaultFTSFieldOperator** | **string** | The default way to combine query parts in field query groups when AND or OR is not explicitly stated - includes ! - +
FIELD:(one two three)
| [optional] [default to null]
**namespace** | **string** | The default name space to use if one is not provided | [optional] [default to null]
**defaultFieldName** | **string** | | [optional] [default to null]
<a name="RequestDefaults.DefaultFTSOperatorEnum"></a>
## Enum: RequestDefaults.DefaultFTSOperatorEnum
* `AND` (value: `'AND'`)
* `OR` (value: `'OR'`)
<a name="RequestDefaults.DefaultFTSFieldOperatorEnum"></a>
## Enum: RequestDefaults.DefaultFTSFieldOperatorEnum
* `AND` (value: `'AND'`)
* `OR` (value: `'OR'`)

View File

@@ -0,0 +1,42 @@
# RequestFacetField
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The facet field | [optional] [default to null]
**label** | **string** | A label to include in place of the facet field | [optional] [default to null]
**prefix** | **string** | Restricts the possible constraints to only indexed values with a specified prefix. | [optional] [default to null]
**sort** | **string** | | [optional] [default to null]
**method** | **string** | | [optional] [default to null]
**missing** | **boolean** | When true, count results that match the query but which have no facet value for the field (in addition to the Term-based constraints). | [optional] [default to null]
**limit** | **number** | | [optional] [default to null]
**offset** | **number** | | [optional] [default to null]
**mincount** | **number** | The minimum count required for a facet field to be included in the response. | [optional] [default to null]
**facetEnumCacheMinDf** | **number** | | [optional] [default to null]
**excludeFilters** | **string[]** | Filter Queries with tags listed here will not be included in facet counts.
This is used for multi-select facetting.
| [optional] [default to null]
<a name="RequestFacetField.SortEnum"></a>
## Enum: RequestFacetField.SortEnum
* `COUNT` (value: `'COUNT'`)
* `INDEX` (value: `'INDEX'`)
<a name="RequestFacetField.MethodEnum"></a>
## Enum: RequestFacetField.MethodEnum
* `ENUM` (value: `'ENUM'`)
* `FC` (value: `'FC'`)

View File

@@ -0,0 +1,9 @@
# RequestFacetFields
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**facets** | [**RequestFacetField[]**](RequestFacetField.md) | Define specific fields on which to facet (adds SOLR facet.field and f.<field>.facet.* options)
| [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# RequestFacetIntervals
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sets** | [**RequestFacetSet[]**](RequestFacetSet.md) | Sets the intervals for all fields. | [optional] [default to null]
**intervals** | [**RequestFacetIntervalsIntervals[]**](RequestFacetIntervalsIntervals.md) | Specifies the fields to facet by interval. | [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# RequestFacetIntervalsIntervals
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The field to facet on | [optional] [default to null]
**label** | **string** | A label to use to identify the field facet | [optional] [default to null]
**sets** | [**RequestFacetSet[]**](RequestFacetSet.md) | Sets the intervals for all fields. | [optional] [default to null]

View File

@@ -0,0 +1,7 @@
# RequestFacetQueries
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,9 @@
# RequestFacetQueriesInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **string** | A facet query | [optional] [default to null]
**label** | **string** | A label to include in place of the facet query | [optional] [default to null]

View File

@@ -0,0 +1,12 @@
# RequestFacetSet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **string** | A label to use to identify the set | [optional] [default to null]
**start** | **string** | The start of the range | [optional] [default to null]
**end** | **string** | The end of the range | [optional] [default to null]
**startInclusive** | **boolean** | When true, the set will include values greater or equal to \"start\" | [optional] [default to null]
**endInclusive** | **boolean** | When true, the set will include values less than or equal to \"end\" | [optional] [default to null]

View File

@@ -0,0 +1,7 @@
# RequestFields
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,7 @@
# RequestFilterQueries
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,11 @@
# RequestFilterQueriesInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **string** | The filter query expression.
For multi-select facets selected facets must be order together
| [optional] [default to null]
**tags** | **string[]** | Tags used exclude the filters from facet evaluation for multi-select facet support | [optional] [default to null]

View File

@@ -0,0 +1,15 @@
# RequestHighlight
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**prefix** | **string** | The string used to mark the start of a highlight in a fragment. | [optional] [default to null]
**postfix** | **string** | The string used to mark the end of a highlight in a fragment. | [optional] [default to null]
**snippetCount** | **number** | The maximum number of distinct highlight snippets to return for each highlight field. | [optional] [default to null]
**fragmentSize** | **number** | The character length of each snippet. | [optional] [default to null]
**maxAnalyzedChars** | **number** | The number of characters to be considered for highlighting. Matches after this count will not be shown. | [optional] [default to null]
**mergeContiguous** | **boolean** | If fragments over lap they can be merged into one larger fragment | [optional] [default to null]
**usePhraseHighlighter** | **boolean** | Should phrases be identified. | [optional] [default to null]
**fields** | [**RequestHighlightFields[]**](RequestHighlightFields.md) | The fields to highlight and field specific configuration properties for each field | [optional] [default to null]

View File

@@ -0,0 +1,13 @@
# RequestHighlightFields
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The name of the field to highlight. | [optional] [default to null]
**snippetCount** | **number** | | [optional] [default to null]
**fragmentSize** | **number** | | [optional] [default to null]
**mergeContiguous** | **boolean** | | [optional] [default to null]
**prefix** | **string** | | [optional] [default to null]
**postfix** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,7 @@
# RequestInclude
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,9 @@
# RequestLimits
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**permissionEvaluationTime** | **number** | Maximum time for post query permission evaluation | [optional] [default to null]
**permissionEvaluationCount** | **number** | Maximum count of post query permission evaluations | [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# RequestLocalization
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**timezone** | **string** | A valid timezone id supported by @see java.time.ZoneId | [optional] [default to null]
**locales** | **string[]** | A list of Locales defined by IETF BCP 47. The ordering is significant. The first locale (leftmost) is used for sort and query localization, whereas the remaining locales are used for query only. | [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# RequestPagination
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**maxItems** | **number** | The maximum number of items to return in the query results | [optional] [default to null]
**skipCount** | **number** | The number of items to skip from the start of the query set | [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# RequestPivot
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **string** | A key corresponding to a matching field facet label or stats. | [optional] [default to null]
**pivots** | [**RequestPivot[]**](RequestPivot.md) | | [optional] [default to null]

View File

@@ -0,0 +1,23 @@
# RequestQuery
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**language** | **string** | The query language in which the query is written. | [optional] [default to null]
**userQuery** | **string** | The exact search request typed in by the user | [optional] [default to null]
**query** | **string** | The query which may have been generated in some way from the userQuery | [default to null]
<a name="RequestQuery.LanguageEnum"></a>
## Enum: RequestQuery.LanguageEnum
* `Afts` (value: `'afts'`)
* `Lucene` (value: `'lucene'`)
* `Cmis` (value: `'cmis'`)

View File

@@ -0,0 +1,16 @@
# RequestRange
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The name of the field to perform range | [optional] [default to null]
**start** | **string** | The start of the range | [optional] [default to null]
**end** | **string** | The end of the range | [optional] [default to null]
**gap** | **string** | Bucket size | [optional] [default to null]
**hardend** | **boolean** | If true means that the last bucket will end at “end” even if it is less than “gap” wide. | [optional] [default to null]
**other** | **string[]** | before, after, between, non, all | [optional] [default to null]
**include** | **string[]** | lower, upper, edge, outer, all | [optional] [default to null]
**label** | **string** | A label to include as a pivot reference | [optional] [default to null]
**excludeFilters** | **string[]** | Filter queries to exclude when calculating statistics | [optional] [default to null]

View File

@@ -0,0 +1,22 @@
# RequestScope
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**locations** | **string** | The locations to include in the query
| [optional] [default to null]
<a name="RequestScope.LocationsEnum"></a>
## Enum: RequestScope.LocationsEnum
* `Nodes` (value: `'nodes'`)
* `Versions` (value: `'versions'`)
* `DeletedNodes` (value: `'deleted-nodes'`)

View File

@@ -0,0 +1,7 @@
# RequestSortDefinition
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,23 @@
# RequestSortDefinitionInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | How to order - using a field, when position of the document in the index, score/relevance. | [optional] [default to null]
**field** | **string** | The name of the field | [optional] [default to null]
**ascending** | **boolean** | The sort order. (The ordering of nulls is determined by the SOLR configuration) | [optional] [default to null]
<a name="RequestSortDefinitionInner.TypeEnum"></a>
## Enum: RequestSortDefinitionInner.TypeEnum
* `FIELD` (value: `'FIELD'`)
* `DOCUMENT` (value: `'DOCUMENT'`)
* `SCORE` (value: `'SCORE'`)

View File

@@ -0,0 +1,8 @@
# RequestSpellcheck
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,23 @@
# RequestStats
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The stats field | [optional] [default to null]
**label** | **string** | A label to include for reference the stats field | [optional] [default to null]
**min** | **boolean** | The minimum value of the field | [optional] [default to null]
**max** | **boolean** | The maximum value of the field | [optional] [default to null]
**sum** | **boolean** | The sum of all values of the field | [optional] [default to null]
**countValues** | **boolean** | The number which have a value for this field | [optional] [default to null]
**missing** | **boolean** | The number which do not have a value for this field | [optional] [default to null]
**mean** | **boolean** | The average | [optional] [default to null]
**stddev** | **boolean** | Standard deviation | [optional] [default to null]
**sumOfSquares** | **boolean** | Sum of all values squared | [optional] [default to null]
**distinctValues** | **boolean** | The set of all distinct values for the field (This can be very expensive to calculate) | [optional] [default to null]
**countDistinct** | **boolean** | The number of distinct values (This can be very expensive to calculate) | [optional] [default to null]
**cardinality** | **boolean** | A statistical approximation of the number of distinct values | [optional] [default to null]
**cardinalityAccuracy** | **number** | Number between 0.0 and 1.0 indicating how aggressively the algorithm should try to be accurate. Used with boolean cardinality flag. | [optional] [default to 0.3]
**excludeFilters** | **string[]** | A list of filters to exclude | [optional] [default to null]
**percentiles** | **number[]** | A list of percentile values, e.g. \"1,99,99.9\" | [optional] [default to null]

View File

@@ -0,0 +1,7 @@
# RequestTemplates
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,9 @@
# RequestTemplatesInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | The template name | [optional] [default to null]
**template** | **string** | The template | [optional] [default to null]

View File

@@ -0,0 +1,8 @@
# ResponseConsistency
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**lastTxId** | **number** | The id of the last indexed transaction | [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# ResultBuckets
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **string** | The field name or its explicit label, if provided on the request | [optional] [default to null]
**buckets** | [**ResultBucketsBuckets[]**](ResultBucketsBuckets.md) | An array of buckets and values | [optional] [default to null]

View File

@@ -0,0 +1,11 @@
# ResultBucketsBuckets
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **string** | The bucket label | [optional] [default to null]
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
**count** | **number** | The count for the bucket | [optional] [default to null]
**display** | **any** | An optional field for additional display information | [optional] [default to null]

View File

@@ -0,0 +1,31 @@
# ResultNode
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**name** | **string** | The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |.
The character . must not be used at the end of the name.
| [default to null]
**nodeType** | **string** | | [default to null]
**isFolder** | **boolean** | | [default to null]
**isFile** | **boolean** | | [default to null]
**isLocked** | **boolean** | | [optional] [default to null]
**modifiedAt** | [**Date**](Date.md) | | [default to null]
**modifiedByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
**createdAt** | [**Date**](Date.md) | | [default to null]
**createdByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
**parentId** | **string** | | [optional] [default to null]
**isLink** | **boolean** | | [optional] [default to null]
**content** | [**ContentInfo**](ContentInfo.md) | | [optional] [default to null]
**aspectNames** | **string[]** | | [optional] [default to null]
**properties** | **any** | | [optional] [default to null]
**allowableOperations** | **string[]** | | [optional] [default to null]
**path** | [**PathInfo**](PathInfo.md) | | [optional] [default to null]
**search** | [**SearchEntry**](SearchEntry.md) | | [optional] [default to null]
**archivedByUser** | [**UserInfo**](UserInfo.md) | | [optional] [default to null]
**archivedAt** | [**Date**](Date.md) | | [optional] [default to null]
**versionLabel** | **string** | | [optional] [default to null]
**versionComment** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,18 @@
# ResultSetContext
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**consistency** | [**ResponseConsistency**](ResponseConsistency.md) | | [optional] [default to null]
**request** | [**SearchRequest**](SearchRequest.md) | | [optional] [default to null]
**facetQueries** | [**ResultSetContextFacetQueries[]**](ResultSetContextFacetQueries.md) | The counts from facet queries | [optional] [default to null]
**facetsFields** | [**ResultBuckets[]**](ResultBuckets.md) | The counts from field facets | [optional] [default to null]
**facets** | [**GenericFacetResponse[]**](GenericFacetResponse.md) | The faceted response | [optional] [default to null]
**spellcheck** | [**ResultSetContextSpellcheck[]**](ResultSetContextSpellcheck.md) | Suggested corrections
If zero results were found for the original query then a single entry of type \"searchInsteadFor\" will be returned.
If alternatives were found that return more results than the original query they are returned as \"didYouMean\" options.
The highest quality suggestion is first.
| [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# ResultSetContextFacetQueries
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **string** | | [optional] [default to null]
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
**count** | **number** | | [optional] [default to null]

View File

@@ -0,0 +1,20 @@
# ResultSetContextSpellcheck
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | | [optional] [default to null]
**suggestion** | **string[]** | A suggested alternative query | [optional] [default to null]
<a name="ResultSetContextSpellcheck.TypeEnum"></a>
## Enum: ResultSetContextSpellcheck.TypeEnum
* `SearchInsteadFor` (value: `'searchInsteadFor'`)
* `DidYouMean` (value: `'didYouMean'`)

View File

@@ -0,0 +1,8 @@
# ResultSetPaging
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**list** | [**ResultSetPagingList**](ResultSetPagingList.md) | | [optional] [default to null]

View File

@@ -0,0 +1,10 @@
# ResultSetPagingList
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pagination** | [**Pagination**](Pagination.md) | | [optional] [default to null]
**context** | [**ResultSetContext**](ResultSetContext.md) | | [optional] [default to null]
**entries** | [**ResultSetRowEntry[]**](ResultSetRowEntry.md) | | [optional] [default to null]

View File

@@ -0,0 +1,8 @@
# ResultSetRowEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entry** | [**ResultNode**](ResultNode.md) | | [default to null]

View File

@@ -0,0 +1,359 @@
# SearchApi
All URIs are relative to *https://localhost/alfresco/api/-default-/public/search/versions/1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**search**](SearchApi.md#search) | **POST** /search | Searches Alfresco
<a name="search"></a>
# **search**
> ResultSetPaging search(queryBody)
Searches Alfresco
**Note**: this endpoint is available in Alfresco 5.2 and newer versions.
**You specify all the parameters in this API in a JSON body**, URL parameters are not supported.
A basic query looks like this:
JSON
{
\"query\": {
\"query\": \"foo\"
}
}
**Note:** These are the minimum possible query parameters.
The default search language is **afts** ([Alfresco Full Text Search](http://docs.alfresco.com/5.1/concepts/rm-searchsyntax-intro.html)), but you can also specify **cmis**, and **lucene**.
A basic CMIS query looks like this:
JSON
{
\"query\": {
\"query\": \"select * from cmis:folder\",
\"language\": \"cmis\"
}
}
By default, **results are limited to the first 100.**
Results can be restricted using \"paging\". For example:
JSON
\"paging\": {
\"maxItems\": \"50\",
\"skipCount\": \"28\"
}
This example would ensure that results are **limited by Final Size**,
skipping the first 28 results and returning the next 50.
Alternatively, you can limit the results by using the **limits JSON body parameter**. For example,
JSON
\"limits\": {
\"permissionEvaluationTime\": 20000,
\"permissionEvaluationCount\": 2000
}
You can use the **include JSON body parameter** to return additional information.
This works in the same way as in the /nodes/{nodeId}/children method in the core API. For example:
JSON
\"include\": [\"aspectNames\", \"properties\", \"isLink\"]
You can use the **fields JSON body parameter** to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.
This works in the same way as in the /nodes/{nodeId}/children method in the core API. For example:
JSON
\"fields\": [\"id\", \"name\", \"search\"]
You can sort the results using the **sort JSON body parameter**, for example:
JSON
\"sort\": [{\"type\":\"FIELD\", \"field\":\"cm:description\", \"ascending\":\"true\"}]
**Note:** the **sort** parameter is not supported for CMIS queries.
By default, search uses the **\"nodes\" location**, which is the **content store known as workspace://SpacesStore**.
To change the scope to another location you can use the **locations JSON body parameter**. You can specify either **nodes** (the default), **versions** or **deleted-nodes**. For example,
JSON
\"scope\": {
\"locations\": [\"deleted-nodes\"]
}
You can specify templates using the **templates JSON body parameter**, for example:
JSON
\"templates\": [{\"name\": \"_PERSON\",\"template\": \"|%firstName OR |%lastName OR |%userName\"},
{\"name\": \"mytemplate\",\"template\": \"%cm:content\"}]
**Note: Spell checking only works on Search Services (Solr 6) if you have already enabled suggestions.**
For **spell checking** you can use a query like this:
JSON
{
\"query\": {
\"query\": \"cm:title:alfrezco\"
},
\"spellcheck\": {\"query\": \"alfrezco\"}
}
If you are already specifying \"userQuery\" then the following may be easier
and produces the same result :
JSON
{
\"query\": {
\"query\": \"cm:title:alfrezco\",
\"userQuery\": \"alfrezco\"
},
\"spellcheck\": {}
}
The spellcheck response includes a spellCheck context like this:
JSON
\"context\": {
\"spellCheck\": {
\"type\": \"searchInsteadFor\",
\"suggestions\": [\"alfresco\"]
}
},
To specify defaults, you use a **defaults JSON body parameter**, for example:
JSON
\"defaults\": {
\"textAttributes\": [
\"cm:content\", \"cm:name\"
],
\"defaultFTSOperator\": \"AND\",
\"defaultFTSFieldOperator\": \"OR\",
\"namespace\": \"cm\",
\"defaultFieldName\": \"PATH\"
}
You can specify several filter queries using the **filterQueries JSON body parameter**, for example:
JSON
\"filterQueries\": [{\"query\": \"TYPE:'cm:folder'\"},{\"query\": \"cm:creator:mjackson\"}]
You can specify several facet queries using the **facetQueries JSON body parameter**, for example:
JSON
\"facetQueries\": [{\"query\": \"created:2016\",\"label\": \"CreatedThisYear\"}]
The response will contain a matching \"context\" section, the \"label\" will match the facet query.
JSON
\"context\": {
\"facetQueries\": [
{\"label\": \"CreatedThisYear\",\"count\": 3}
]
},
A complete query for facetting via the content.size field looks this:
JSON
{
\"query\": {
\"query\": \"presentation\",
\"language\": \"afts\"
},
\"facetQueries\": [
{\"query\": \"content.size:[0 TO 10240]\", \"label\": \"xtra small\"},
{\"query\": \"content.size:[10240 TO 102400]\", \"label\": \"small\"},
{\"query\": \"content.size:[102400 TO 1048576]\", \"label\": \"medium\"},
{\"query\": \"content.size:[1048576 TO 16777216]\", \"label\": \"large\"},
{\"query\": \"content.size:[16777216 TO 134217728]\", \"label\": \"xtra large\"},
{\"query\": \"content.size:[134217728 TO MAX]\", \"label\": \"XX large\"}
],
\"facetFields\": {\"facets\": [{\"field\": \"'content.size'\"}]}
}
The response will contain a matching \"context\" section, the \"label\" will match the facet query.
JSON
\"context\": {
\"facetQueries\": [
{ \"label\": \"small\",\"count\": 2 },
{ \"label\": \"large\",\"count\": 0 },
{ \"label\": \"xtra small\",\"count\": 5 },
{ \"label\": \"xtra large\",\"count\": 56},
{ \"label\": \"medium\",\"count\": 4 },
{ \"label\": \"XX large\", \"count\": 1 }
]
},
You can specify several facet fields using the **facetFields JSON body parameter**, for example:
JSON
\"facetFields\": {\"facets\": [{\"field\": \"creator\", \"mincount\": 1}, {\"field\": \"modifier\", \"mincount\": 1}]}
The response will contain a matching \"context\" section, the \"label\" will match the facet field.
JSON
\"context\": {
\"facetsFields\": [
{ \"label\": \"creator\",
\"buckets\": [
{ \"label\": \"System\", \"count\": 75 },
{ \"label\": \"mjackson\", \"count\": 5 }
]},
{ \"label\": \"modifier\",
\"buckets\": [
{ \"label\": \"System\", \"count\": 72 },
{ \"label\": \"mjackson\", \"count\": 5 },
{ \"label\": \"admin\", \"count\": 3 }
]}
]
},
Grouping facet queries that go together can be done by specifying the group label in the fact queries as follow:
JSON
{
\"query\": {
\"query\": \"presentation\"
},
\"facetQueries\": [
{\"query\": \"content.size:[0 TO 102400]\", \"label\": \"small\", \"group\":\"foo\"},
{\"query\": \"content.size:[102400 TO 1048576]\", \"label\": \"medium\",\"group\":\"foo\"},
{\"query\": \"content.size:[1048576 TO 16777216]\", \"label\": \"large\",\"group\":\"foo\"}
]
}
The above query returns the results a faceted field grouped under the label foo:
JSON
{
\"context\": {\"facetsFields\": [{
\"label\": \"foo\",
\"buckets\": [
{
\"count\": 109,
\"label\": \"small\",
\"filterQuery\": \"content.size:[0 TO 102400]\"
},
{
\"count\": 0,
\"label\": \"large\",
\"filterQuery\": \"content.size:[1048576 TO 16777216]\"
},
{
\"count\": 0,
\"label\": \"medium\",
\"filterQuery\": \"content.size:[102400 TO 1048576]\"
}
]
}]
}
Range Faceting is supported by the **ranges JSON body parameter**, for example:
JSON
{
\"query\": {
\"query\": \"presentation\"
},
\"ranges\": [
{
\"field\": \"content.size\",
\"start\": \"0\",
\"end\": \"100\",
\"gap\": \"20\",
\"hardend\": true
},
{
\"field\": \"created\",
\"start\": \"2015-09-29T10:45:15.729Z\",
\"end\": \"2016-09-29T10:45:15.729Z\",
\"gap\": \"+100DAY\"
}]
}
An example query for **search highlighting** could look like this:
JSON
{
\"query\": {
\"query\": \"description:workflow\",
\"userQuery\":\"workflow\"
},
\"highlight\": {
\"prefix\": \"¿\",
\"postfix\": \"?\",
\"mergeContiguous\": true,
\"fields\": [
{
\"field\": \"cm:title\"
},
{
\"field\": \"description\",
\"prefix\": \"(\",
\"postfix\": \")\"
}
]
}
}
The example above changes the highlighting prefix and postfix from the
default <em> for all fields to ¿? and just for the \"description\" field to ().
The highlight information is added in each node entry response; here is
an example partial response:
\"entry\": {
\"createdAt\": \"2016-10-12T15:24:31.202+0000\",
\"isFolder\": true,
\"search\": {
\"score\": 1,
\"highlight\": [
{
\"field\": \"cm:title\",
\"snippets\": [
\"Customized ¿Workflow? Process Definitions\"
]
},
{
\"field\": \"description\",
\"snippets\": [
\"Customized (Workflow) Process Definitions\"
]
}
]
},
### Example
```javascript
import SearchApi from 'SearchApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let searchApi = new SearchApi(this.alfrescoApi);
searchApi.search(queryBody).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**queryBody** | [**SearchRequest**](SearchRequest.md)| Generic query API
|
### Return type
[**ResultSetPaging**](ResultSetPaging.md)

View File

@@ -0,0 +1,10 @@
# SearchEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**score** | **number** | The score for this row | [optional] [default to null]
**highlight** | [**SearchEntryHighlight[]**](SearchEntryHighlight.md) | Highlight fragments if requested and available. A match can happen in any of the requested field.
| [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# SearchEntryHighlight
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | The field where a match occurred (one of the fields defined on the request) | [optional] [default to null]
**snippets** | **string[]** | Any number of snippets for the specified field highlighting the matching text | [optional] [default to null]

View File

@@ -0,0 +1,27 @@
# SearchRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | [**RequestQuery**](RequestQuery.md) | | [default to null]
**paging** | [**RequestPagination**](RequestPagination.md) | | [optional] [default to null]
**include** | [**RequestInclude**](RequestInclude.md) | | [optional] [default to null]
**includeRequest** | **boolean** | When true, include the original request in the response | [optional] [default to null]
**fields** | [**RequestFields**](RequestFields.md) | | [optional] [default to null]
**sort** | [**RequestSortDefinition**](RequestSortDefinition.md) | | [optional] [default to null]
**templates** | [**RequestTemplates**](RequestTemplates.md) | | [optional] [default to null]
**defaults** | [**RequestDefaults**](RequestDefaults.md) | | [optional] [default to null]
**localization** | [**RequestLocalization**](RequestLocalization.md) | | [optional] [default to null]
**filterQueries** | [**RequestFilterQueries**](RequestFilterQueries.md) | | [optional] [default to null]
**facetQueries** | [**RequestFacetQueries**](RequestFacetQueries.md) | | [optional] [default to null]
**facetFields** | [**RequestFacetFields**](RequestFacetFields.md) | | [optional] [default to null]
**facetIntervals** | [**RequestFacetIntervals**](RequestFacetIntervals.md) | | [optional] [default to null]
**pivots** | [**RequestPivot[]**](RequestPivot.md) | | [optional] [default to null]
**stats** | [**RequestStats[]**](RequestStats.md) | | [optional] [default to null]
**spellcheck** | [**RequestSpellcheck**](RequestSpellcheck.md) | | [optional] [default to null]
**scope** | [**RequestScope**](RequestScope.md) | | [optional] [default to null]
**limits** | [**RequestLimits**](RequestLimits.md) | | [optional] [default to null]
**highlight** | [**RequestHighlight**](RequestHighlight.md) | | [optional] [default to null]
**ranges** | [**RequestRange[]**](RequestRange.md) | | [optional] [default to null]

View File

@@ -0,0 +1,9 @@
# UserInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**displayName** | **string** | | [default to null]
**id** | **string** | | [default to null]