Comparing version 8.2.1 to 8.3.0
@@ -26,3 +26,3 @@ /** | ||
*/ | ||
export declare type CreateAnalyzerOptions = CreateIdentityAnalyzerOptions | CreateDelimiterAnalyzerOptions | CreateStemAnalyzerOptions | CreateNormAnalyzerOptions | CreateNgramAnalyzerOptions | CreateTextAnalyzerOptions | CreateSegmentationAnalyzerOptions | CreateAqlAnalyzerOptions | CreatePipelineAnalyzerOptions | CreateStopwordsAnalyzerOptions | CreateCollationAnalyzerOptions | CreateMinHashAnalyzerOptions | CreateClassificationAnalyzerOptions | CreateNearestNeighborsAnalyzerOptions | CreateGeoJsonAnalyzerOptions | CreateGeoPointAnalyzerOptions; | ||
export declare type CreateAnalyzerOptions = CreateIdentityAnalyzerOptions | CreateDelimiterAnalyzerOptions | CreateStemAnalyzerOptions | CreateNormAnalyzerOptions | CreateNgramAnalyzerOptions | CreateTextAnalyzerOptions | CreateSegmentationAnalyzerOptions | CreateAqlAnalyzerOptions | CreatePipelineAnalyzerOptions | CreateStopwordsAnalyzerOptions | CreateCollationAnalyzerOptions | CreateMinHashAnalyzerOptions | CreateClassificationAnalyzerOptions | CreateNearestNeighborsAnalyzerOptions | CreateGeoJsonAnalyzerOptions | CreateGeoPointAnalyzerOptions | CreateGeoS2AnalyzerOptions; | ||
/** | ||
@@ -380,3 +380,3 @@ * Options for creating an Identity Analyzer. | ||
/** | ||
* Options for creating a MinHash Analyzer | ||
* (Enterprise Edition only.) Options for creating a MinHash Analyzer | ||
*/ | ||
@@ -407,3 +407,3 @@ export declare type CreateMinHashAnalyzerOptions = { | ||
/** | ||
* Options for creating a Classification Analyzer | ||
* (Enterprise Edition only.) Options for creating a Classification Analyzer | ||
*/ | ||
@@ -442,3 +442,3 @@ export declare type CreateClassificationAnalyzerOptions = { | ||
/** | ||
* Options for creating a NearestNeighbors Analyzer | ||
* (Enterprise Edition only.) Options for creating a NearestNeighbors Analyzer. | ||
*/ | ||
@@ -547,2 +547,53 @@ export declare type CreateNearestNeighborsAnalyzerOptions = { | ||
/** | ||
* (Enterprise Edition only.) Options for creating a Geo S2 Analyzer | ||
*/ | ||
export declare type CreateGeoS2AnalyzerOptions = { | ||
/** | ||
* Type of the Analyzer. | ||
*/ | ||
type: "geo_s2"; | ||
/** | ||
* Features to enable for this Analyzer. | ||
*/ | ||
features?: AnalyzerFeature[]; | ||
/** | ||
* Additional properties for the Analyzer. | ||
*/ | ||
properties: { | ||
/** | ||
* If set to `"centroid"`, only the centroid of the input geometry will be | ||
* computed and indexed. | ||
* | ||
* If set to `"point"` only GeoJSON objects of type Point will be indexed and | ||
* all other geometry types will be ignored. | ||
* | ||
* Default: `"shape"` | ||
*/ | ||
type?: "shape" | "centroid" | "point"; | ||
/** | ||
* Options for fine-tuning geo queries. | ||
* | ||
* Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }` | ||
*/ | ||
options?: { | ||
maxCells?: number; | ||
minLevel?: number; | ||
maxLevel?: number; | ||
}; | ||
/** | ||
* If set to `"latLngDouble"`, each latitude and longitude value is stored | ||
* as an 8-byte floating-point value (16 bytes per coordinate pair). | ||
* | ||
* If set to `"latLngInt"`, each latitude and longitude value is stored as | ||
* a 4-byte integer value (8 bytes per coordinate pair). | ||
* | ||
* If set to `"s2Point"`, each longitude-latitude pair is stored in the | ||
* native format of Google S2 (24 bytes per coordinate pair). | ||
* | ||
* Default: `"latLngDouble"` | ||
*/ | ||
format?: "latLngDouble" | "latLngInt" | "s2Point"; | ||
}; | ||
}; | ||
/** | ||
* Shared attributes of all Analyzer descriptions. | ||
@@ -563,3 +614,3 @@ */ | ||
*/ | ||
export declare type AnalyzerDescription = IdentityAnalyzerDescription | DelimiterAnalyzerDescription | StemAnalyzerDescription | NormAnalyzerDescription | NgramAnalyzerDescription | TextAnalyzerDescription | SegmentationAnalyzerDescription | AqlAnalyzerDescription | PipelineAnalyzerDescription | StopwordsAnalyzerDescription | CollationAnalyzerDescription | MinHashAnalyzerDescription | ClassificationAnalyzerDescription | NearestNeighborsAnalyzerDescription | GeoJsonAnalyzerDescription | GeoPointAnalyzerDescription; | ||
export declare type AnalyzerDescription = IdentityAnalyzerDescription | DelimiterAnalyzerDescription | StemAnalyzerDescription | NormAnalyzerDescription | NgramAnalyzerDescription | TextAnalyzerDescription | SegmentationAnalyzerDescription | AqlAnalyzerDescription | PipelineAnalyzerDescription | StopwordsAnalyzerDescription | CollationAnalyzerDescription | MinHashAnalyzerDescription | ClassificationAnalyzerDescription | NearestNeighborsAnalyzerDescription | GeoJsonAnalyzerDescription | GeoPointAnalyzerDescription | GeoS2AnalyzerDescription; | ||
/** | ||
@@ -744,2 +795,17 @@ * An object describing an Identity Analyzer. | ||
/** | ||
* (Enterprise Edition only.) An object describing a GeoS2 Analyzer | ||
*/ | ||
export declare type GeoS2AnalyzerDescription = GenericAnalyzerDescription & { | ||
type: "geo_s2"; | ||
properties: { | ||
type: "shape" | "centroid" | "point"; | ||
description: { | ||
maxCells: number; | ||
minLevel: number; | ||
maxLevel: number; | ||
}; | ||
format: "latLngDouble" | "latLngInt" | "s2Point"; | ||
}; | ||
}; | ||
/** | ||
* Represents an Analyzer in a {@link database.Database}. | ||
@@ -805,3 +871,3 @@ */ | ||
*/ | ||
create<Options extends CreateAnalyzerOptions>(options: Options): Promise<Options extends CreateIdentityAnalyzerOptions ? IdentityAnalyzerDescription : Options extends CreateDelimiterAnalyzerOptions ? DelimiterAnalyzerDescription : Options extends CreateStemAnalyzerOptions ? StemAnalyzerDescription : Options extends CreateNormAnalyzerOptions ? NormAnalyzerDescription : Options extends CreateNgramAnalyzerOptions ? NgramAnalyzerDescription : Options extends CreateTextAnalyzerOptions ? TextAnalyzerDescription : Options extends CreateSegmentationAnalyzerOptions ? SegmentationAnalyzerDescription : Options extends CreateAqlAnalyzerOptions ? AqlAnalyzerDescription : Options extends CreatePipelineAnalyzerOptions ? PipelineAnalyzerDescription : Options extends CreateStopwordsAnalyzerOptions ? StopwordsAnalyzerDescription : Options extends CreateCollationAnalyzerOptions ? CollationAnalyzerDescription : Options extends CreateMinHashAnalyzerOptions ? MinHashAnalyzerDescription : Options extends CreateClassificationAnalyzerOptions ? ClassificationAnalyzerDescription : Options extends CreateNearestNeighborsAnalyzerOptions ? NearestNeighborsAnalyzerDescription : Options extends CreateGeoJsonAnalyzerOptions ? GeoJsonAnalyzerDescription : Options extends CreateGeoPointAnalyzerOptions ? GeoPointAnalyzerDescription : AnalyzerDescription>; | ||
create<Options extends CreateAnalyzerOptions>(options: Options): Promise<Options extends CreateIdentityAnalyzerOptions ? IdentityAnalyzerDescription : Options extends CreateDelimiterAnalyzerOptions ? DelimiterAnalyzerDescription : Options extends CreateStemAnalyzerOptions ? StemAnalyzerDescription : Options extends CreateNormAnalyzerOptions ? NormAnalyzerDescription : Options extends CreateNgramAnalyzerOptions ? NgramAnalyzerDescription : Options extends CreateTextAnalyzerOptions ? TextAnalyzerDescription : Options extends CreateSegmentationAnalyzerOptions ? SegmentationAnalyzerDescription : Options extends CreateAqlAnalyzerOptions ? AqlAnalyzerDescription : Options extends CreatePipelineAnalyzerOptions ? PipelineAnalyzerDescription : Options extends CreateStopwordsAnalyzerOptions ? StopwordsAnalyzerDescription : Options extends CreateCollationAnalyzerOptions ? CollationAnalyzerDescription : Options extends CreateMinHashAnalyzerOptions ? MinHashAnalyzerDescription : Options extends CreateClassificationAnalyzerOptions ? ClassificationAnalyzerDescription : Options extends CreateNearestNeighborsAnalyzerOptions ? NearestNeighborsAnalyzerDescription : Options extends CreateGeoJsonAnalyzerOptions ? GeoJsonAnalyzerDescription : Options extends CreateGeoPointAnalyzerOptions ? GeoPointAnalyzerDescription : Options extends CreateGeoS2AnalyzerOptions ? GeoS2AnalyzerDescription : AnalyzerDescription>; | ||
/** | ||
@@ -808,0 +874,0 @@ * Deletes the Analyzer from the database. |
@@ -17,2 +17,56 @@ # Changelog | ||
## [8.3.0] - 2023-05-11 | ||
## Fixed | ||
- Fixed `updateUser` and `replaceUser` behavior ([#783](https://github.com/arangodb/arangojs/issues/783)) | ||
## Added | ||
- Added `renewAuthToken` method to `Database` ([#784](https://github.com/arangodb/arangojs/issues/784)) | ||
This method allows refreshing the authentication token passed to the | ||
`useBearerAuth` method or used by the `login` method. Note that ArangoDB | ||
will currently only return a new token if the token is going to expire | ||
in the next 150 seconds. | ||
- Added `returnOld` and `mergeObjects` to `CollectionInsertOptions` type | ||
These options are only available when using `overwriteMode`. | ||
- Added caching options to `InvertedIndex` and `ArangoSearchView` types | ||
These options were added in ArangoDB 3.10.2. | ||
- Added support for `ArangoSearchView` type `storedValues` shorthand notation | ||
Instead of using an object, attributes can also be defined as arrays of | ||
strings and arrays of arrays of strings. This was added in ArangoDB 3.10.3. | ||
- Added `peakMemoryUsage` and `executionTime` to `SingleExplainResult.stats` type | ||
These attributes were added in ArangoDB 3.10.4. | ||
- Added `geo_s2` Analyzer types | ||
This Analyzer was added in ArangoDB 3.10.5. | ||
- Added `refillIndexCaches` option to document operation options types | ||
This option was added in ArangoDB 3.11. | ||
- Added `optimizeTopK` to `ArangoSearchView` and `InvertedIndex` types | ||
This option was added in ArangoDB 3.11. | ||
- Added support for `allowRetry` option in `db.query` | ||
This feature was added in ArangoDB 3.11. | ||
- Added `x-arango-driver` header | ||
The arangojs driver now correctly identifies itself to ArangoDB, allowing the | ||
ArangoGraph Insights Platform to take advantage of the driver's support for | ||
cloud-optimized behaviors. | ||
## [8.2.1] - 2023-04-05 | ||
@@ -1589,2 +1643,3 @@ | ||
[8.3.0]: https://github.com/arangodb/arangojs/compare/v8.2.1...v8.3.0 | ||
[8.2.1]: https://github.com/arangodb/arangojs/compare/v8.2.0...v8.2.1 | ||
@@ -1591,0 +1646,0 @@ [8.2.0]: https://github.com/arangodb/arangojs/compare/v8.1.0...v8.2.0 |
@@ -454,2 +454,3 @@ "use strict"; | ||
"x-arango-version": String(this._arangoVersion), | ||
"x-arango-driver": `arangojs/8.3.0 (cloud)`, | ||
}; | ||
@@ -456,0 +457,0 @@ if (this._transactionId) { |
@@ -157,2 +157,3 @@ /** | ||
protected _hasMore: boolean; | ||
protected _nextBatchId?: string; | ||
protected _id: string | undefined; | ||
@@ -169,2 +170,3 @@ protected _hostUrl?: string; | ||
hasMore: boolean; | ||
nextBatchId?: string; | ||
id: string; | ||
@@ -171,0 +173,0 @@ count: number; |
@@ -53,2 +53,3 @@ "use strict"; | ||
this._hasMore = Boolean(body.id && body.hasMore); | ||
this._nextBatchId = body.nextBatchId; | ||
this._hostUrl = hostUrl; | ||
@@ -79,7 +80,14 @@ this._count = body.count; | ||
async _more() { | ||
if (!this.hasMore) | ||
if (!this._id || !this.hasMore) | ||
return; | ||
const body = await this._db.request({ | ||
method: "PUT", | ||
path: `/_api/cursor/${encodeURIComponent(this._id)}`, | ||
...(this._nextBatchId | ||
? { | ||
method: "POST", | ||
path: `/_api/cursor/${encodeURIComponent(this._id)}/${this._nextBatchId}`, | ||
} | ||
: { | ||
method: "PUT", | ||
path: `/_api/cursor/${encodeURIComponent(this._id)}`, | ||
}), | ||
hostUrl: this._hostUrl, | ||
@@ -90,2 +98,3 @@ allowDirtyRead: this._allowDirtyRead, | ||
this._hasMore = body.hasMore; | ||
this._nextBatchId = body.nextBatchId; | ||
} | ||
@@ -92,0 +101,0 @@ /** |
@@ -334,2 +334,9 @@ /** | ||
nested?: (string | InvertedIndexNestedFieldOptions)[]; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then field normalization | ||
* values will always be cached in memory. | ||
* | ||
* Defaults to the value of `cache` specified on the index itself. | ||
*/ | ||
cache?: boolean; | ||
}; | ||
@@ -350,2 +357,9 @@ /** | ||
compression?: Compression; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then stored values will | ||
* always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
cache?: boolean; | ||
}; | ||
@@ -408,4 +422,18 @@ /** | ||
compression?: Compression; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then primary sort columns | ||
* will always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
cache?: boolean; | ||
}; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then the primary key column | ||
* will always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
primaryKeyCache?: boolean; | ||
/** | ||
* Name of the default Analyzer to apply to the values of indexed fields. | ||
@@ -502,2 +530,13 @@ * | ||
inBackground?: boolean; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then field normalization | ||
* values will always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
cache?: boolean; | ||
/** | ||
* An array of strings defining sort expressions to optimize. | ||
*/ | ||
optimizeTopK?: string[]; | ||
}; | ||
@@ -609,7 +648,10 @@ /** | ||
nested?: InvertedIndexNestedField[]; | ||
cache?: boolean; | ||
}[]; | ||
searchField: boolean; | ||
cache?: boolean; | ||
storedValues: { | ||
fields: string[]; | ||
compression: Compression; | ||
cache?: boolean; | ||
}[]; | ||
@@ -622,3 +664,5 @@ primarySort: { | ||
compression: Compression; | ||
cache?: boolean; | ||
}; | ||
primaryKeyCache?: boolean; | ||
analyzer: string; | ||
@@ -636,2 +680,3 @@ features: AnalyzerFeature[]; | ||
writeBufferSizeMax: number; | ||
optimizeTopK: string[]; | ||
}; | ||
@@ -638,0 +683,0 @@ /** |
{ | ||
"name": "arangojs", | ||
"version": "8.2.1", | ||
"version": "8.3.0", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=14" |
@@ -147,3 +147,3 @@ /** | ||
* (Enterprise Edition only.) If set to `true`, then field normalization | ||
* values are always cached in memory. | ||
* values will always be cached in memory. | ||
* | ||
@@ -195,2 +195,25 @@ * Default: `false` | ||
/** | ||
* Options for creating a stored value in an ArangoSearch View. | ||
*/ | ||
export interface ArangoSearchViewStoredValueOptions { | ||
/** | ||
* Attribute paths for which values should be stored in the view index | ||
* in addition to those used for sorting via `primarySort`. | ||
*/ | ||
fields: string[]; | ||
/** | ||
* How the attribute values should be compressed. | ||
* | ||
* Default: `"lz4"` | ||
*/ | ||
compression?: Compression; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then stored values will | ||
* always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
cache?: boolean; | ||
} | ||
/** | ||
* Options for creating an ArangoSearch View. | ||
@@ -261,25 +284,24 @@ */ | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then primary sort columns | ||
* will always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
primarySortCache?: boolean; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then primary key columns | ||
* will always be cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
primaryKeyCache?: boolean; | ||
/** | ||
* Attribute paths for which values should be stored in the view index | ||
* in addition to those used for sorting via `primarySort`. | ||
*/ | ||
storedValues?: { | ||
/** | ||
* Attribute paths for which values should be stored in the view index | ||
* in addition to those used for sorting via `primarySort`. | ||
*/ | ||
fields: string[]; | ||
/** | ||
* How the attribute values should be compressed. | ||
* | ||
* Default: `"lz4"` | ||
*/ | ||
compression?: Compression; | ||
/** | ||
* (Enterprise Edition only.) If set to `true`, then stored values are | ||
* always cached in memory. | ||
* | ||
* Default: `false` | ||
*/ | ||
cache?: boolean; | ||
}[]; | ||
storedValues?: ArangoSearchViewStoredValueOptions[] | string[] | string[][]; | ||
/** | ||
* An array of strings defining sort expressions to optimize. | ||
*/ | ||
optimizeTopK?: string[]; | ||
}; | ||
@@ -390,2 +412,4 @@ /** | ||
primarySortCompression: Compression; | ||
primarySortCache: boolean; | ||
primaryKeyCache: boolean; | ||
storedValues: { | ||
@@ -397,2 +421,3 @@ fields: string[]; | ||
links: Record<string, Omit<ArangoSearchViewLink, "nested">>; | ||
optimizeTopK: string[]; | ||
}; | ||
@@ -399,0 +424,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2196021
20390