-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41d4df5
commit 36a3aeb
Showing
263 changed files
with
20,771 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,248 @@ | ||
# sdk-nodejs-zincsearch | ||
Nodejs SDK Client for Zinc Search | ||
# zincsearch-sdk | ||
|
||
ZincSearchSDK - JavaScript client for zincsearch-sdk | ||
Zinc Search engine API documents https://docs.zincsearch.com | ||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: | ||
|
||
- API version: 0.2.4 | ||
- Package version: 0.2.4 | ||
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen | ||
For more information, please visit [https://www.zincsearch.com](https://www.zincsearch.com) | ||
|
||
## Installation | ||
|
||
### For [Node.js](https://nodejs.org/) | ||
|
||
#### npm | ||
|
||
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). | ||
|
||
Then install it via: | ||
|
||
```shell | ||
npm install zincsearch-sdk --save | ||
``` | ||
|
||
Finally, you need to build the module: | ||
|
||
```shell | ||
npm run build | ||
``` | ||
|
||
##### Local development | ||
|
||
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: | ||
|
||
```shell | ||
npm link | ||
``` | ||
|
||
To use the link you just defined in your project, switch to the directory you want to use your zincsearch-sdk from, and run: | ||
|
||
```shell | ||
npm link /path/to/<JAVASCRIPT_CLIENT_DIR> | ||
``` | ||
|
||
Finally, you need to build the module: | ||
|
||
```shell | ||
npm run build | ||
``` | ||
|
||
#### git | ||
|
||
If the library is hosted at a git repository, e.g.https://github.com/zinclabs/sdk-nodejs-zincsearch | ||
then install it via: | ||
|
||
```shell | ||
npm install zinclabs/sdk-nodejs-zincsearch --save | ||
``` | ||
|
||
### For browser | ||
|
||
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following | ||
the above steps with Node.js and installing browserify with `npm install -g browserify`, | ||
perform the following (assuming *main.js* is your entry file): | ||
|
||
```shell | ||
browserify main.js > bundle.js | ||
``` | ||
|
||
Then include *bundle.js* in the HTML pages. | ||
|
||
### Webpack Configuration | ||
|
||
Using Webpack you may encounter the following error: "Module not found: Error: | ||
Cannot resolve module", most certainly you should disable AMD loader. Add/merge | ||
the following section to your webpack config: | ||
|
||
```javascript | ||
module: { | ||
rules: [ | ||
{ | ||
parser: { | ||
amd: false | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Getting Started | ||
|
||
Please follow the [installation](#installation) instruction and execute the following JS code: | ||
|
||
```javascript | ||
var ZincSearchSDK = require('zincsearch-sdk'); | ||
|
||
var defaultClient = ZincSearchSDK.ApiClient.instance; | ||
// Configure HTTP basic authorization: basicAuth | ||
var basicAuth = defaultClient.authentications['basicAuth']; | ||
basicAuth.username = 'YOUR USERNAME' | ||
basicAuth.password = 'YOUR PASSWORD' | ||
|
||
var api = new ZincSearchSDK.Default() | ||
var callback = function(error, data, response) { | ||
if (error) { | ||
console.error(error); | ||
} else { | ||
console.log('API called successfully. Returned data: ' + data); | ||
} | ||
}; | ||
api.healthz(callback); | ||
|
||
``` | ||
|
||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *http://localhost:4080* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*ZincSearchSDK.Default* | [**healthz**](docs/Default.md#healthz) | **GET** /healthz | Get healthz | ||
*ZincSearchSDK.Default* | [**version**](docs/Default.md#version) | **GET** /version | Get version | ||
*ZincSearchSDK.Document* | [**bulk**](docs/Document.md#bulk) | **POST** /api/_bulk | Bulk documents | ||
*ZincSearchSDK.Document* | [**delete**](docs/Document.md#delete) | **DELETE** /api/{index}/_doc/{id} | Delete document | ||
*ZincSearchSDK.Document* | [**esBulk**](docs/Document.md#esBulk) | **POST** /es/_bulk | ES bulk documents | ||
*ZincSearchSDK.Document* | [**index**](docs/Document.md#index) | **POST** /api/{index}/_doc | Create or update document | ||
*ZincSearchSDK.Document* | [**indexWithID**](docs/Document.md#indexWithID) | **PUT** /api/{index}/_doc/{id} | Create or update document with id | ||
*ZincSearchSDK.Document* | [**update**](docs/Document.md#update) | **POST** /api/{index}/_update/{id} | Update document with id | ||
*ZincSearchSDK.Index* | [**analyze**](docs/Index.md#analyze) | **POST** /api/_analyze | Analyze | ||
*ZincSearchSDK.Index* | [**analyzeIndex**](docs/Index.md#analyzeIndex) | **POST** /api/{index}/_analyze | Analyze | ||
*ZincSearchSDK.Index* | [**delete**](docs/Index.md#delete) | **DELETE** /api/index/{index} | Delete index | ||
*ZincSearchSDK.Index* | [**create**](docs/Index.md#create) | **POST** /api/index | Create index | ||
*ZincSearchSDK.Index* | [**createTemplate**](docs/Index.md#createTemplate) | **POST** /es/_index_template | Create update index template | ||
*ZincSearchSDK.Index* | [**deleteTemplate**](docs/Index.md#deleteTemplate) | **DELETE** /es/_index_template/{name} | Delete template | ||
*ZincSearchSDK.Index* | [**getMapping**](docs/Index.md#getMapping) | **GET** /api/{index}/_mapping | Get index mappings | ||
*ZincSearchSDK.Index* | [**getSettings**](docs/Index.md#getSettings) | **GET** /api/{index}/_settings | Get index settings | ||
*ZincSearchSDK.Index* | [**getTemplate**](docs/Index.md#getTemplate) | **GET** /es/_index_template/{name} | Get index template | ||
*ZincSearchSDK.Index* | [**list**](docs/Index.md#list) | **GET** /api/index | List indexes | ||
*ZincSearchSDK.Index* | [**listTemplates**](docs/Index.md#listTemplates) | **GET** /es/_index_template | List index teplates | ||
*ZincSearchSDK.Index* | [**refresh**](docs/Index.md#refresh) | **POST** /api/index/{index}/refresh | Resfresh index | ||
*ZincSearchSDK.Index* | [**setMapping**](docs/Index.md#setMapping) | **PUT** /api/{index}/_mapping | Set index mappings | ||
*ZincSearchSDK.Index* | [**setSettings**](docs/Index.md#setSettings) | **PUT** /api/{index}/_settings | Set index Settings | ||
*ZincSearchSDK.Index* | [**updateTemplate**](docs/Index.md#updateTemplate) | **PUT** /es/_index_template/{name} | Create update index template | ||
*ZincSearchSDK.Search* | [**mSearch**](docs/Search.md#mSearch) | **POST** /es/_msearch | Search V2 MultipleSearch for compatible ES | ||
*ZincSearchSDK.Search* | [**search**](docs/Search.md#search) | **POST** /es/{index}/_search | Search V2 DSL for compatible ES | ||
*ZincSearchSDK.Search* | [**searchV1**](docs/Search.md#searchV1) | **POST** /api/{index}/_search | Search V1 | ||
*ZincSearchSDK.User* | [**delete**](docs/User.md#delete) | **DELETE** /api/user/{id} | Delete user | ||
*ZincSearchSDK.User* | [**create**](docs/User.md#create) | **POST** /api/user | Create user | ||
*ZincSearchSDK.User* | [**list**](docs/User.md#list) | **GET** /api/user | List user | ||
*ZincSearchSDK.User* | [**login**](docs/User.md#login) | **POST** /api/login | Login | ||
*ZincSearchSDK.User* | [**update**](docs/User.md#update) | **PUT** /api/user | Update user | ||
|
||
|
||
## Documentation for Models | ||
|
||
- [ZincSearchSDK.AggregationHistogramBound](docs/AggregationHistogramBound.md) | ||
- [ZincSearchSDK.AuthLoginRequest](docs/AuthLoginRequest.md) | ||
- [ZincSearchSDK.AuthLoginResponse](docs/AuthLoginResponse.md) | ||
- [ZincSearchSDK.AuthLoginUser](docs/AuthLoginUser.md) | ||
- [ZincSearchSDK.CoreIndex](docs/CoreIndex.md) | ||
- [ZincSearchSDK.IndexAnalyzeResponse](docs/IndexAnalyzeResponse.md) | ||
- [ZincSearchSDK.IndexAnalyzeResponseToken](docs/IndexAnalyzeResponseToken.md) | ||
- [ZincSearchSDK.MetaAggregationAutoDateHistogram](docs/MetaAggregationAutoDateHistogram.md) | ||
- [ZincSearchSDK.MetaAggregationDateHistogram](docs/MetaAggregationDateHistogram.md) | ||
- [ZincSearchSDK.MetaAggregationDateRange](docs/MetaAggregationDateRange.md) | ||
- [ZincSearchSDK.MetaAggregationHistogram](docs/MetaAggregationHistogram.md) | ||
- [ZincSearchSDK.MetaAggregationIPRange](docs/MetaAggregationIPRange.md) | ||
- [ZincSearchSDK.MetaAggregationMetric](docs/MetaAggregationMetric.md) | ||
- [ZincSearchSDK.MetaAggregationRange](docs/MetaAggregationRange.md) | ||
- [ZincSearchSDK.MetaAggregationResponse](docs/MetaAggregationResponse.md) | ||
- [ZincSearchSDK.MetaAggregations](docs/MetaAggregations.md) | ||
- [ZincSearchSDK.MetaAggregationsTerms](docs/MetaAggregationsTerms.md) | ||
- [ZincSearchSDK.MetaAnalyzer](docs/MetaAnalyzer.md) | ||
- [ZincSearchSDK.MetaBoolQuery](docs/MetaBoolQuery.md) | ||
- [ZincSearchSDK.MetaDateRange](docs/MetaDateRange.md) | ||
- [ZincSearchSDK.MetaExistsQuery](docs/MetaExistsQuery.md) | ||
- [ZincSearchSDK.MetaFuzzyQuery](docs/MetaFuzzyQuery.md) | ||
- [ZincSearchSDK.MetaHTTPResponse](docs/MetaHTTPResponse.md) | ||
- [ZincSearchSDK.MetaHTTPResponseDocument](docs/MetaHTTPResponseDocument.md) | ||
- [ZincSearchSDK.MetaHTTPResponseError](docs/MetaHTTPResponseError.md) | ||
- [ZincSearchSDK.MetaHTTPResponseID](docs/MetaHTTPResponseID.md) | ||
- [ZincSearchSDK.MetaHTTPResponseIndex](docs/MetaHTTPResponseIndex.md) | ||
- [ZincSearchSDK.MetaHTTPResponseRecordCount](docs/MetaHTTPResponseRecordCount.md) | ||
- [ZincSearchSDK.MetaHTTPResponseTemplate](docs/MetaHTTPResponseTemplate.md) | ||
- [ZincSearchSDK.MetaHealthzResponse](docs/MetaHealthzResponse.md) | ||
- [ZincSearchSDK.MetaHighlight](docs/MetaHighlight.md) | ||
- [ZincSearchSDK.MetaHit](docs/MetaHit.md) | ||
- [ZincSearchSDK.MetaHits](docs/MetaHits.md) | ||
- [ZincSearchSDK.MetaIPRange](docs/MetaIPRange.md) | ||
- [ZincSearchSDK.MetaIdsQuery](docs/MetaIdsQuery.md) | ||
- [ZincSearchSDK.MetaIndexAnalysis](docs/MetaIndexAnalysis.md) | ||
- [ZincSearchSDK.MetaIndexSettings](docs/MetaIndexSettings.md) | ||
- [ZincSearchSDK.MetaIndexShard](docs/MetaIndexShard.md) | ||
- [ZincSearchSDK.MetaIndexSimple](docs/MetaIndexSimple.md) | ||
- [ZincSearchSDK.MetaIndexTemplate](docs/MetaIndexTemplate.md) | ||
- [ZincSearchSDK.MetaMappings](docs/MetaMappings.md) | ||
- [ZincSearchSDK.MetaMatchBoolPrefixQuery](docs/MetaMatchBoolPrefixQuery.md) | ||
- [ZincSearchSDK.MetaMatchPhrasePrefixQuery](docs/MetaMatchPhrasePrefixQuery.md) | ||
- [ZincSearchSDK.MetaMatchPhraseQuery](docs/MetaMatchPhraseQuery.md) | ||
- [ZincSearchSDK.MetaMatchQuery](docs/MetaMatchQuery.md) | ||
- [ZincSearchSDK.MetaMultiMatchQuery](docs/MetaMultiMatchQuery.md) | ||
- [ZincSearchSDK.MetaPrefixQuery](docs/MetaPrefixQuery.md) | ||
- [ZincSearchSDK.MetaProperty](docs/MetaProperty.md) | ||
- [ZincSearchSDK.MetaQuery](docs/MetaQuery.md) | ||
- [ZincSearchSDK.MetaQueryStringQuery](docs/MetaQueryStringQuery.md) | ||
- [ZincSearchSDK.MetaRange](docs/MetaRange.md) | ||
- [ZincSearchSDK.MetaRangeQuery](docs/MetaRangeQuery.md) | ||
- [ZincSearchSDK.MetaRegexpQuery](docs/MetaRegexpQuery.md) | ||
- [ZincSearchSDK.MetaSearchResponse](docs/MetaSearchResponse.md) | ||
- [ZincSearchSDK.MetaShards](docs/MetaShards.md) | ||
- [ZincSearchSDK.MetaSimpleQueryStringQuery](docs/MetaSimpleQueryStringQuery.md) | ||
- [ZincSearchSDK.MetaTemplate](docs/MetaTemplate.md) | ||
- [ZincSearchSDK.MetaTemplateTemplate](docs/MetaTemplateTemplate.md) | ||
- [ZincSearchSDK.MetaTermQuery](docs/MetaTermQuery.md) | ||
- [ZincSearchSDK.MetaTotal](docs/MetaTotal.md) | ||
- [ZincSearchSDK.MetaUser](docs/MetaUser.md) | ||
- [ZincSearchSDK.MetaVersionResponse](docs/MetaVersionResponse.md) | ||
- [ZincSearchSDK.MetaWildcardQuery](docs/MetaWildcardQuery.md) | ||
- [ZincSearchSDK.MetaZincQuery](docs/MetaZincQuery.md) | ||
- [ZincSearchSDK.V1AggregationBucket](docs/V1AggregationBucket.md) | ||
- [ZincSearchSDK.V1AggregationDateRange](docs/V1AggregationDateRange.md) | ||
- [ZincSearchSDK.V1AggregationNumberRange](docs/V1AggregationNumberRange.md) | ||
- [ZincSearchSDK.V1AggregationParams](docs/V1AggregationParams.md) | ||
- [ZincSearchSDK.V1AggregationResponse](docs/V1AggregationResponse.md) | ||
- [ZincSearchSDK.V1Hit](docs/V1Hit.md) | ||
- [ZincSearchSDK.V1Hits](docs/V1Hits.md) | ||
- [ZincSearchSDK.V1QueryHighlight](docs/V1QueryHighlight.md) | ||
- [ZincSearchSDK.V1QueryParams](docs/V1QueryParams.md) | ||
- [ZincSearchSDK.V1SearchResponse](docs/V1SearchResponse.md) | ||
- [ZincSearchSDK.V1Total](docs/V1Total.md) | ||
- [ZincSearchSDK.V1ZincQuery](docs/V1ZincQuery.md) | ||
|
||
|
||
## Documentation for Authorization | ||
|
||
|
||
|
||
### basicAuth | ||
|
||
- **Type**: HTTP basic authentication | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ZincSearchSDK.AggregationHistogramBound | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**max** | **Number** | maximum | [optional] | ||
**min** | **Number** | minimum | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ZincSearchSDK.AuthLoginRequest | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | **String** | | [optional] | ||
**password** | **String** | | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ZincSearchSDK.AuthLoginResponse | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**user** | [**AuthLoginUser**](AuthLoginUser.md) | | [optional] | ||
**validated** | **Boolean** | | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ZincSearchSDK.AuthLoginUser | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | **String** | | [optional] | ||
**name** | **String** | | [optional] | ||
**role** | **String** | | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ZincSearchSDK.CoreIndex | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**createAt** | **String** | | [optional] | ||
**docNum** | **Number** | | [optional] | ||
**docTimeMax** | **Number** | | [optional] | ||
**docTimeMin** | **Number** | | [optional] | ||
**mappings** | [**MetaMappings**](MetaMappings.md) | | [optional] | ||
**name** | **String** | | [optional] | ||
**settings** | [**MetaIndexSettings**](MetaIndexSettings.md) | | [optional] | ||
**shardNum** | **Number** | | [optional] | ||
**shards** | [**[MetaIndexShard]**](MetaIndexShard.md) | | [optional] | ||
**storageSize** | **Number** | | [optional] | ||
**storageType** | **String** | | [optional] | ||
**updateAt** | **String** | | [optional] | ||
|
||
|
Oops, something went wrong.