arangojs 8.0.0 → 8.2.0

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/indexes.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"indexes.d.ts","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEzE;;GAEG;AACH,oBAAY,4BAA4B,GAAG;IACzC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,oBAAY,qBAAqB,GAC7B;IACE,IAAI,EAAE,KAAK,CAAC;IACZ;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,YA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GAAG,MAAM,CAAC;AAEnE;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,MAAM,GACrB,MAAM,CAqBR"}
package/indexes.js CHANGED
@@ -33,9 +33,10 @@ function _indexHandle(selector, collectionName) {
33
33
  if (normalizedHead !== collectionName) {
34
34
  throw new Error(`Index ID "${selector}" does not match collection name "${collectionName}"`);
35
35
  }
36
- return [normalizedHead, ...tail].join("/");
36
+ selector = tail.join("/").normalize("NFC");
37
+ return [normalizedHead, selector].join("/");
37
38
  }
38
- return `${collectionName}/${selector}`;
39
+ return `${collectionName}/${String(selector).normalize("NFC")}`;
39
40
  }
40
41
  exports._indexHandle = _indexHandle;
41
42
  //# sourceMappingURL=indexes.js.map
package/indexes.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"indexes.js","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAypBH;;GAEG;AACH,SAAgB,YAAY,CAC1B,QAAuB,EACvB,cAAsB;IAEtB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,OAAO,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SAClD;QACD,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,cAAc,KAAK,cAAc,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,aAAa,QAAQ,qCAAqC,cAAc,GAAG,CAC5E,CAAC;SACH;QACD,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC5C;IACD,OAAO,GAAG,cAAc,IAAI,QAAQ,EAAE,CAAC;AACzC,CAAC;AAvBD,oCAuBC","sourcesContent":["/**\n * ```ts\n * import type {\n * FulltextIndex,\n * GeoIndex,\n * PersistentIndex,\n * PrimaryIndex,\n * TtlIndex,\n * ZkdIndex,\n * } from \"arangojs/indexes\";\n * ```\n *\n * The \"indexes\" module provides index-related types for TypeScript.\n *\n * @packageDocumentation\n */\n\nimport { AnalyzerFeature } from \"./analyzer\";\nimport { Compression, Direction, TierConsolidationPolicy } from \"./view\";\n\n/**\n * Options for creating a persistent index.\n */\nexport type EnsurePersistentIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"persistent\";\n /**\n * An array of attribute paths.\n */\n fields: string[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will omit documents that do not contain at\n * least one of the attribute paths in `fields` and these documents will be\n * ignored for uniqueness checks.\n *\n * Default: `false`\n */\n sparse?: boolean;\n /**\n * If set to `false`, inserting duplicate index values from the same\n * document will lead to a unique constraint error if this is a unique index.\n *\n * Default: `true`\n */\n deduplicate?: boolean;\n /**\n * If set to `false`, index selectivity estimates will be disabled for this\n * index.\n *\n * Default: `true`\n */\n estimates?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n /**\n * If set to `true`, an in-memory hash cache will be put in front of the\n * persistent index.\n *\n * Default: `false`\n */\n cacheEnabled?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: string[];\n};\n\n/**\n * Options for creating a geo index.\n */\nexport type EnsureGeoIndexOptions =\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: false;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * Attribute paths for the document's latitude and longitude values.\n */\n fields: [string, string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n }\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: boolean;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * An array containing the attribute path for an array containing two values,\n * the first of which will be interpreted as the latitude, the second as the\n * longitude. If `geoJson` is set to `true`, the order is reversed to match\n * the GeoJSON format.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n };\n\n/**\n * Options for creating a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type EnsureFulltextIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"fulltext\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Minimum character length of words to index.\n */\n minLength?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a TTL index.\n */\nexport type EnsureTtlIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"ttl\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Duration in seconds after the attribute value at which the document will\n * be considered as expired.\n */\n expireAfter: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a ZKD index.\n */\nexport type EnsureZkdIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"zkd\";\n /**\n * An array containing attribute paths for the dimensions.\n */\n fields: string[];\n /**\n * Data type of the dimension attributes.\n */\n fieldValueTypes: \"double\";\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * (Enterprise Edition only.) Options for a nested field in an inverted index.\n */\nexport type InvertedIndexNestedFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the parent options or on the index\n * itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * Sub-objects to index to allow querying for co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for an attribute path in an inverted index.\n */\nexport type InvertedIndexFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the index itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Defaults to the value of `includeAllFields` specified on the index itself.\n */\n includeAllFields?: boolean;\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `trackListPositions` specified on the index\n * itself.\n */\n trackListPositions?: boolean;\n /**\n * (Enterprise Edition only.) Sub-objects to index to allow querying for\n * co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for defining a stored value on an inverted index.\n */\nexport type InvertedIndexStoredValueOptions = {\n /**\n * The attribute paths to store.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n};\n\n/**\n * Options for defining a primary sort field on an inverted index.\n */\nexport type InvertedIndexPrimarySortFieldOptions = {\n /**\n * The attribute path to sort by.\n */\n field: string;\n /**\n * The sorting direction.\n */\n direction: Direction;\n};\n\n/**\n * Options for creating an inverted index.\n */\nexport type EnsureInvertedIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"inverted\";\n /**\n * An array of attribute paths or objects specifying options for the fields.\n */\n fields: (string | InvertedIndexFieldOptions)[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true` array values will by default be indexed using the same\n * behavior as ArangoSearch Views. This option only applies when using the\n * index in a SearchAlias View.\n *\n * Default: `false`\n */\n searchField?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: InvertedIndexStoredValueOptions[];\n /**\n * Primary sort order to optimize AQL queries using a matching sort order.\n */\n primarySort?: {\n /**\n * An array of fields to sort the index by.\n */\n fields: InvertedIndexPrimarySortFieldOptions[];\n /**\n * How the primary sort data should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n };\n /**\n * Name of the default Analyzer to apply to the values of indexed fields.\n *\n * Default: `\"identity\"`\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for the default Analyzer.\n *\n * Defaults to the Analyzer's features.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Default: `false`\n */\n trackListPositions?: boolean;\n /**\n * The number of threads to use for indexing the fields.\n *\n * Default: `2`\n */\n parallelism?: number;\n /**\n * Wait at least this many commits between removing unused files in the\n * ArangoSearch data directory.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * Wait at least this many milliseconds between committing View data store\n * changes and making documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Wait at least this many milliseconds between applying\n * `consolidationPolicy` to consolidate View data store and possibly release\n * space on the filesystem.\n *\n * Default: `1000`\n */\n consolidationIntervalMsec?: number;\n /**\n * The consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * Maximum number of writers (segments) cached in the pool.\n *\n * Default: `64`\n */\n writeBufferIdle?: number;\n /**\n * Maximum number of concurrent active writers (segments) that perform a\n * transaction.\n *\n * Default: `0` (disabled)\n */\n writeBufferActive?: number;\n /**\n * Maximum memory byte size per writer (segment) before a writer (segment)\n * flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writeBufferSizeMax?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Shared attributes of all index types.\n */\nexport type GenericIndex = {\n /**\n * A unique name for this index.\n */\n name: string;\n /**\n * A unique identifier for this index.\n */\n id: string;\n /**\n * Whether documents not containing at least one of the attribute paths\n * are omitted by this index.\n */\n sparse: boolean;\n /**\n * Whether this index enforces uniqueness for values of its attribute paths.\n */\n unique: boolean;\n};\n\n/**\n * An object representing a persistent index.\n */\nexport type PersistentIndex = GenericIndex & {\n type: \"persistent\";\n fields: string[];\n cacheEnabled: boolean;\n deduplicate: boolean;\n estimates: boolean;\n storedValues?: string[];\n};\n\n/**\n * An object representing a primary index.\n */\nexport type PrimaryIndex = GenericIndex & {\n type: \"primary\";\n fields: string[];\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type FulltextIndex = GenericIndex & {\n type: \"fulltext\";\n fields: [string];\n minLength: number;\n};\n\n/**\n * An object representing a geo index.\n */\nexport type GeoIndex = GenericIndex & {\n type: \"geo\";\n fields: [string] | [string, string];\n geoJson: boolean;\n legacyPolygons: boolean;\n bestIndexedLevel: number;\n worstIndexedLevel: number;\n maxNumCoverCells: number;\n};\n\n/**\n * An object representing a TTL index.\n */\nexport type TtlIndex = GenericIndex & {\n type: \"ttl\";\n fields: [string];\n expireAfter: number;\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a ZKD index.\n */\nexport type ZkdIndex = GenericIndex & {\n type: \"zkd\";\n fields: string[];\n fieldValueTypes: \"double\";\n};\n\n/**\n * (Enterprise Edition only.) An object representing a nested field in an\n * inverted index.\n */\nexport type InvertedIndexNestedField = {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n searchField?: boolean;\n nested?: InvertedIndexNestedField[];\n};\n\n/**\n * An object representing an inverted index.\n */\nexport type InvertedIndex = GenericIndex & {\n type: \"inverted\";\n fields: {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n includeAllFields?: boolean;\n searchField?: boolean;\n trackListPositions?: boolean;\n nested?: InvertedIndexNestedField[];\n }[];\n searchField: boolean;\n storedValues: {\n fields: string[];\n compression: Compression;\n }[];\n primarySort: {\n fields: {\n field: string;\n direction: Direction;\n }[];\n compression: Compression;\n };\n analyzer: string;\n features: AnalyzerFeature[];\n includeAllFields: boolean;\n trackListPositions: boolean;\n parallelism: number;\n cleanupIntervalStep: number;\n commitIntervalMsec: number;\n consolidationIntervalMsec: number;\n consolidationPolicy: Required<TierConsolidationPolicy>;\n writeBufferIdle: number;\n writeBufferActive: number;\n writeBufferSizeMax: number;\n};\n\n/**\n * An object representing an index.\n */\nexport type Index =\n | GeoIndex\n | FulltextIndex\n | PersistentIndex\n | PrimaryIndex\n | TtlIndex\n | ZkdIndex\n | InvertedIndex;\n\nexport type ObjectWithId = {\n [key: string]: any;\n id: string;\n};\n\nexport type ObjectWithName = {\n [key: string]: any;\n name: string;\n};\n\n/**\n * Index name, id or object with a `name` or `id` property.\n */\nexport type IndexSelector = ObjectWithId | ObjectWithName | string;\n\n/**\n * @internal\n */\nexport function _indexHandle(\n selector: IndexSelector,\n collectionName: string\n): string {\n if (typeof selector !== \"string\") {\n if (selector.id) {\n return _indexHandle(selector.id, collectionName);\n }\n throw new Error(\n \"Index handle must be a string or an object with an id attribute\"\n );\n }\n if (selector.includes(\"/\")) {\n const [head, ...tail] = selector.split(\"/\");\n const normalizedHead = head.normalize(\"NFC\");\n if (normalizedHead !== collectionName) {\n throw new Error(\n `Index ID \"${selector}\" does not match collection name \"${collectionName}\"`\n );\n }\n return [normalizedHead, ...tail].join(\"/\");\n }\n return `${collectionName}/${selector}`;\n}\n"]}
1
+ {"version":3,"file":"indexes.js","sourceRoot":"","sources":["../src/indexes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAypBH;;GAEG;AACH,SAAgB,YAAY,CAC1B,QAAuB,EACvB,cAAsB;IAEtB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,OAAO,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SAClD;QACD,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;KACH;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,cAAc,KAAK,cAAc,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,aAAa,QAAQ,qCAAqC,cAAc,GAAG,CAC5E,CAAC;SACH;QACD,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC7C;IACD,OAAO,GAAG,cAAc,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;AAClE,CAAC;AAxBD,oCAwBC","sourcesContent":["/**\n * ```ts\n * import type {\n * FulltextIndex,\n * GeoIndex,\n * PersistentIndex,\n * PrimaryIndex,\n * TtlIndex,\n * ZkdIndex,\n * } from \"arangojs/indexes\";\n * ```\n *\n * The \"indexes\" module provides index-related types for TypeScript.\n *\n * @packageDocumentation\n */\n\nimport { AnalyzerFeature } from \"./analyzer\";\nimport { Compression, Direction, TierConsolidationPolicy } from \"./view\";\n\n/**\n * Options for creating a persistent index.\n */\nexport type EnsurePersistentIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"persistent\";\n /**\n * An array of attribute paths.\n */\n fields: string[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will omit documents that do not contain at\n * least one of the attribute paths in `fields` and these documents will be\n * ignored for uniqueness checks.\n *\n * Default: `false`\n */\n sparse?: boolean;\n /**\n * If set to `false`, inserting duplicate index values from the same\n * document will lead to a unique constraint error if this is a unique index.\n *\n * Default: `true`\n */\n deduplicate?: boolean;\n /**\n * If set to `false`, index selectivity estimates will be disabled for this\n * index.\n *\n * Default: `true`\n */\n estimates?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n /**\n * If set to `true`, an in-memory hash cache will be put in front of the\n * persistent index.\n *\n * Default: `false`\n */\n cacheEnabled?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: string[];\n};\n\n/**\n * Options for creating a geo index.\n */\nexport type EnsureGeoIndexOptions =\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: false;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * Attribute paths for the document's latitude and longitude values.\n */\n fields: [string, string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n }\n | {\n type: \"geo\";\n /**\n * If set to `true`, `fields` must be an array containing a single attribute\n * path and the attribute value must be an array with two values, the first\n * of which will be interpreted as the longitude and the second of which will\n * be interpreted as the latitude of the document.\n *\n * Default: `false`\n */\n geoJson?: boolean;\n /**\n * If set to `true`, the index will use pre-3.10 rules for parsing\n * GeoJSON polygons. This option is always implicitly `true` when using\n * ArangoDB 3.9 or lower.\n */\n legacyPolygons?: boolean;\n /**\n * An array containing the attribute path for an array containing two values,\n * the first of which will be interpreted as the latitude, the second as the\n * longitude. If `geoJson` is set to `true`, the order is reversed to match\n * the GeoJSON format.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n };\n\n/**\n * Options for creating a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type EnsureFulltextIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"fulltext\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Minimum character length of words to index.\n */\n minLength?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a TTL index.\n */\nexport type EnsureTtlIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"ttl\";\n /**\n * An array containing exactly one attribute path.\n */\n fields: [string];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * Duration in seconds after the attribute value at which the document will\n * be considered as expired.\n */\n expireAfter: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for creating a ZKD index.\n */\nexport type EnsureZkdIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"zkd\";\n /**\n * An array containing attribute paths for the dimensions.\n */\n fields: string[];\n /**\n * Data type of the dimension attributes.\n */\n fieldValueTypes: \"double\";\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true`, a unique index will be created.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * (Enterprise Edition only.) Options for a nested field in an inverted index.\n */\nexport type InvertedIndexNestedFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the parent options or on the index\n * itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * Sub-objects to index to allow querying for co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for an attribute path in an inverted index.\n */\nexport type InvertedIndexFieldOptions = {\n /**\n * An attribute path.\n */\n name: string;\n /**\n * Name of the Analyzer to apply to the values of this field.\n *\n * Defaults to the `analyzer` specified on the index itself.\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for this field's Analyzer.\n *\n * Defaults to the features of the Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Defaults to the value of `includeAllFields` specified on the index itself.\n */\n includeAllFields?: boolean;\n /**\n * If set to `true` array values will be indexed using the same behavior as\n * ArangoSearch Views. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `searchField` specified on the index itself.\n */\n searchField?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Defaults to the value of `trackListPositions` specified on the index\n * itself.\n */\n trackListPositions?: boolean;\n /**\n * (Enterprise Edition only.) Sub-objects to index to allow querying for\n * co-occurring values.\n */\n nested?: (string | InvertedIndexNestedFieldOptions)[];\n};\n\n/**\n * Options for defining a stored value on an inverted index.\n */\nexport type InvertedIndexStoredValueOptions = {\n /**\n * The attribute paths to store.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n};\n\n/**\n * Options for defining a primary sort field on an inverted index.\n */\nexport type InvertedIndexPrimarySortFieldOptions = {\n /**\n * The attribute path to sort by.\n */\n field: string;\n /**\n * The sorting direction.\n */\n direction: Direction;\n};\n\n/**\n * Options for creating an inverted index.\n */\nexport type EnsureInvertedIndexOptions = {\n /**\n * Type of this index.\n */\n type: \"inverted\";\n /**\n * An array of attribute paths or objects specifying options for the fields.\n */\n fields: (string | InvertedIndexFieldOptions)[];\n /**\n * A unique name for this index.\n */\n name?: string;\n /**\n * If set to `true` array values will by default be indexed using the same\n * behavior as ArangoSearch Views. This option only applies when using the\n * index in a SearchAlias View.\n *\n * Default: `false`\n */\n searchField?: boolean;\n /**\n * An array of attribute paths that will be stored in the index but can not\n * be used for index lookups or sorting but can avoid full document lookups.\n */\n storedValues?: InvertedIndexStoredValueOptions[];\n /**\n * Primary sort order to optimize AQL queries using a matching sort order.\n */\n primarySort?: {\n /**\n * An array of fields to sort the index by.\n */\n fields: InvertedIndexPrimarySortFieldOptions[];\n /**\n * How the primary sort data should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n };\n /**\n * Name of the default Analyzer to apply to the values of indexed fields.\n *\n * Default: `\"identity\"`\n */\n analyzer?: string;\n /**\n * List of Analyzer features to enable for the default Analyzer.\n *\n * Defaults to the Analyzer's features.\n */\n features?: AnalyzerFeature[];\n /**\n * If set to `true`, all document attributes are indexed, excluding any\n * sub-attributes configured in the `fields` array. The `analyzer` and\n * `features` properties apply to the sub-attributes. This option only\n * applies when using the index in a SearchAlias View.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * If set to `true`, the position of values in array values are tracked and\n * need to be specified in queries. Otherwise all values in an array are\n * treated as equivalent. This option only applies when using the index in a\n * SearchAlias View.\n *\n * Default: `false`\n */\n trackListPositions?: boolean;\n /**\n * The number of threads to use for indexing the fields.\n *\n * Default: `2`\n */\n parallelism?: number;\n /**\n * Wait at least this many commits between removing unused files in the\n * ArangoSearch data directory.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * Wait at least this many milliseconds between committing View data store\n * changes and making documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Wait at least this many milliseconds between applying\n * `consolidationPolicy` to consolidate View data store and possibly release\n * space on the filesystem.\n *\n * Default: `1000`\n */\n consolidationIntervalMsec?: number;\n /**\n * The consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * Maximum number of writers (segments) cached in the pool.\n *\n * Default: `64`\n */\n writeBufferIdle?: number;\n /**\n * Maximum number of concurrent active writers (segments) that perform a\n * transaction.\n *\n * Default: `0` (disabled)\n */\n writeBufferActive?: number;\n /**\n * Maximum memory byte size per writer (segment) before a writer (segment)\n * flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writeBufferSizeMax?: number;\n /**\n * If set to `true`, the index will be created in the background to reduce\n * the write-lock duration for the collection during index creation.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Shared attributes of all index types.\n */\nexport type GenericIndex = {\n /**\n * A unique name for this index.\n */\n name: string;\n /**\n * A unique identifier for this index.\n */\n id: string;\n /**\n * Whether documents not containing at least one of the attribute paths\n * are omitted by this index.\n */\n sparse: boolean;\n /**\n * Whether this index enforces uniqueness for values of its attribute paths.\n */\n unique: boolean;\n};\n\n/**\n * An object representing a persistent index.\n */\nexport type PersistentIndex = GenericIndex & {\n type: \"persistent\";\n fields: string[];\n cacheEnabled: boolean;\n deduplicate: boolean;\n estimates: boolean;\n storedValues?: string[];\n};\n\n/**\n * An object representing a primary index.\n */\nexport type PrimaryIndex = GenericIndex & {\n type: \"primary\";\n fields: string[];\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a fulltext index.\n *\n * @deprecated Fulltext indexes have been deprecated in ArangoDB 3.10 and\n * should be replaced with ArangoSearch.\n */\nexport type FulltextIndex = GenericIndex & {\n type: \"fulltext\";\n fields: [string];\n minLength: number;\n};\n\n/**\n * An object representing a geo index.\n */\nexport type GeoIndex = GenericIndex & {\n type: \"geo\";\n fields: [string] | [string, string];\n geoJson: boolean;\n legacyPolygons: boolean;\n bestIndexedLevel: number;\n worstIndexedLevel: number;\n maxNumCoverCells: number;\n};\n\n/**\n * An object representing a TTL index.\n */\nexport type TtlIndex = GenericIndex & {\n type: \"ttl\";\n fields: [string];\n expireAfter: number;\n selectivityEstimate: number;\n};\n\n/**\n * An object representing a ZKD index.\n */\nexport type ZkdIndex = GenericIndex & {\n type: \"zkd\";\n fields: string[];\n fieldValueTypes: \"double\";\n};\n\n/**\n * (Enterprise Edition only.) An object representing a nested field in an\n * inverted index.\n */\nexport type InvertedIndexNestedField = {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n searchField?: boolean;\n nested?: InvertedIndexNestedField[];\n};\n\n/**\n * An object representing an inverted index.\n */\nexport type InvertedIndex = GenericIndex & {\n type: \"inverted\";\n fields: {\n name: string;\n analyzer?: string;\n features?: AnalyzerFeature[];\n includeAllFields?: boolean;\n searchField?: boolean;\n trackListPositions?: boolean;\n nested?: InvertedIndexNestedField[];\n }[];\n searchField: boolean;\n storedValues: {\n fields: string[];\n compression: Compression;\n }[];\n primarySort: {\n fields: {\n field: string;\n direction: Direction;\n }[];\n compression: Compression;\n };\n analyzer: string;\n features: AnalyzerFeature[];\n includeAllFields: boolean;\n trackListPositions: boolean;\n parallelism: number;\n cleanupIntervalStep: number;\n commitIntervalMsec: number;\n consolidationIntervalMsec: number;\n consolidationPolicy: Required<TierConsolidationPolicy>;\n writeBufferIdle: number;\n writeBufferActive: number;\n writeBufferSizeMax: number;\n};\n\n/**\n * An object representing an index.\n */\nexport type Index =\n | GeoIndex\n | FulltextIndex\n | PersistentIndex\n | PrimaryIndex\n | TtlIndex\n | ZkdIndex\n | InvertedIndex;\n\nexport type ObjectWithId = {\n [key: string]: any;\n id: string;\n};\n\nexport type ObjectWithName = {\n [key: string]: any;\n name: string;\n};\n\n/**\n * Index name, id or object with a `name` or `id` property.\n */\nexport type IndexSelector = ObjectWithId | ObjectWithName | string;\n\n/**\n * @internal\n */\nexport function _indexHandle(\n selector: IndexSelector,\n collectionName: string\n): string {\n if (typeof selector !== \"string\") {\n if (selector.id) {\n return _indexHandle(selector.id, collectionName);\n }\n throw new Error(\n \"Index handle must be a string or an object with an id attribute\"\n );\n }\n if (selector.includes(\"/\")) {\n const [head, ...tail] = selector.split(\"/\");\n const normalizedHead = head.normalize(\"NFC\");\n if (normalizedHead !== collectionName) {\n throw new Error(\n `Index ID \"${selector}\" does not match collection name \"${collectionName}\"`\n );\n }\n selector = tail.join(\"/\").normalize(\"NFC\");\n return [normalizedHead, selector].join(\"/\");\n }\n return `${collectionName}/${String(selector).normalize(\"NFC\")}`;\n}\n"]}
@@ -1,4 +1,2 @@
1
- /// <reference types="node" />
2
- import { ParsedUrlQueryInput } from "querystring";
3
- export declare function querystringify(obj: ParsedUrlQueryInput): string;
1
+ export declare function querystringify(obj: Record<string, any>): string;
4
2
  //# sourceMappingURL=querystringify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"querystringify.d.ts","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAa,MAAM,aAAa,CAAC;AAa7D,wBAAgB,cAAc,CAAC,GAAG,EAAE,mBAAmB,UAEtD"}
1
+ {"version":3,"file":"querystringify.d.ts","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UAatD"}
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.querystringify = void 0;
4
- const querystring_1 = require("querystring");
5
- // eslint-disable-next-line @typescript-eslint/ban-types
6
- function clean(obj) {
7
- const result = {};
8
- for (const key of Object.keys(obj)) {
9
- const value = obj[key];
4
+ function querystringify(obj) {
5
+ const params = new URLSearchParams();
6
+ for (const [key, value] of Object.entries(obj)) {
10
7
  if (value === undefined)
11
8
  continue;
12
- result[key] = value;
9
+ if (!Array.isArray(value)) {
10
+ params.append(key, value);
11
+ }
12
+ else {
13
+ for (const item of value) {
14
+ params.append(key, item);
15
+ }
16
+ }
13
17
  }
14
- return result;
15
- }
16
- function querystringify(obj) {
17
- return (0, querystring_1.stringify)(clean(obj));
18
+ return String(params);
18
19
  }
19
20
  exports.querystringify = querystringify;
20
21
  //# sourceMappingURL=querystringify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"querystringify.js","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":";;;AAAA,6CAA6D;AAE7D,wDAAwD;AACxD,SAAS,KAAK,CAAe,GAAM;IACjC,MAAM,MAAM,GAAG,EAAgB,CAAC;IAChC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClC,MAAM,KAAK,GAAI,GAAW,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QACjC,MAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KAC9B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,cAAc,CAAC,GAAwB;IACrD,OAAO,IAAA,uBAAS,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/B,CAAC;AAFD,wCAEC","sourcesContent":["import { ParsedUrlQueryInput, stringify } from \"querystring\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction clean<T extends {}>(obj: T) {\n const result = {} as typeof obj;\n for (const key of Object.keys(obj)) {\n const value = (obj as any)[key];\n if (value === undefined) continue;\n (result as any)[key] = value;\n }\n return result;\n}\n\nexport function querystringify(obj: ParsedUrlQueryInput) {\n return stringify(clean(obj));\n}\n"]}
1
+ {"version":3,"file":"querystringify.js","sourceRoot":"","sources":["../../src/lib/querystringify.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,GAAwB;IACrD,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC9C,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACzB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC3B;aAAM;YACL,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aAC1B;SACF;KACF;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAbD,wCAaC","sourcesContent":["export function querystringify(obj: Record<string, any>) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(obj)) {\n if (value === undefined) continue;\n if (!Array.isArray(value)) {\n params.append(key, value);\n } else {\n for (const item of value) {\n params.append(key, item);\n }\n }\n }\n return String(params);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arangojs",
3
- "version": "8.0.0",
3
+ "version": "8.2.0",
4
4
  "engines": {
5
5
  "node": ">=14"
6
6
  },
package/view.d.ts CHANGED
@@ -142,6 +142,13 @@ export declare type ArangoSearchViewLinkOptions = {
142
142
  * Default: `false`
143
143
  */
144
144
  inBackground?: boolean;
145
+ /**
146
+ * (Enterprise Edition only.) If set to `true`, then field normalization
147
+ * values are always cached in memory.
148
+ *
149
+ * Default: `false`
150
+ */
151
+ cache?: boolean;
145
152
  };
146
153
  /**
147
154
  * Options for modifying the properties of an ArangoSearch View.
@@ -264,6 +271,13 @@ export declare type CreateArangoSearchViewOptions = ArangoSearchViewPropertiesOp
264
271
  * Default: `"lz4"`
265
272
  */
266
273
  compression?: Compression;
274
+ /**
275
+ * (Enterprise Edition only.) If set to `true`, then stored values are
276
+ * always cached in memory.
277
+ *
278
+ * Default: `false`
279
+ */
280
+ cache?: boolean;
267
281
  }[];
268
282
  };
269
283
  /**
@@ -352,6 +366,7 @@ export declare type ArangoSearchViewLink = {
352
366
  nested?: Record<string, ArangoSearchViewLink>;
353
367
  trackListPositions: boolean;
354
368
  storeValues: "none" | "id";
369
+ cache: boolean;
355
370
  };
356
371
  /**
357
372
  * Properties of an ArangoSearch View.
@@ -372,6 +387,7 @@ export declare type ArangoSearchViewProperties = ArangoSearchViewDescription & {
372
387
  storedValues: {
373
388
  fields: string[];
374
389
  compression: Compression;
390
+ cache: boolean;
375
391
  }[];
376
392
  links: Record<string, Omit<ArangoSearchViewLink, "nested">>;
377
393
  };
package/view.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC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BAAyB,GACzB,cAAc,CACnB;IAQD;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,UAAU,SAAS,qBAAqB,GAAG,SAAS,EACpE,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CACR,UAAU,SAAS,iCAAiC,GAChD,0BAA0B,GAC1B,UAAU,SAAS,gCAAgC,GACnD,yBAAyB,GACzB,cAAc,CACnB;IAQD;;;;;;;;;;;OAWG;IACH,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CASzB"}
package/view.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;AAWA,mCAAwC;AACxC,uCAA6C;AAE7C;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAS;IACpC,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAFD,oCAEC;AAuZD;;GAEG;AACH,MAAa,IAAI;IAIf;;OAEG;IACH,YAAY,EAAY,EAAE,IAAY;QACpC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM;QACV,IAAI;YACF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;SACb;QAAC,OAA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OAAO,CAAC;YACtB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;YAC/D,IAAI,EAAE,UAAU,IAAI,EAAE;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CACrB;YACE,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACrD,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACzB,CAAC;IACJ,CAAC;CACF;AApOD,oBAoOC","sourcesContent":["/**\n * ```ts\n * import type { ArangoSearchView } from \"arangojs/view\";\n * ```\n *\n * The \"view\" module provides View related types and interfaces for TypeScript.\n *\n * @packageDocumentation\n */\nimport { ArangoApiResponse } from \"./connection\";\nimport { Database } from \"./database\";\nimport { isArangoError } from \"./error\";\nimport { VIEW_NOT_FOUND } from \"./lib/codes\";\n\n/**\n * Indicates whether the given value represents a {@link View}.\n *\n * @param view - A value that might be a View.\n */\nexport function isArangoView(view: any): view is View {\n return Boolean(view && view.isArangoView);\n}\n\n/**\n * Sorting direction. Descending or ascending.\n */\nexport type Direction = \"desc\" | \"asc\";\n\n/**\n * Policy to consolidate based on segment byte size and live document count as\n * dictated by the customization attributes.\n *\n * @deprecated The `bytes_accum` consolidation policy was deprecated in\n * ArangoDB 3.7 and should be replaced with the `tier` consolidation policy.\n */\nexport type BytesAccumConsolidationPolicy = {\n /**\n * Type of consolidation policy.\n */\n type: \"bytes_accum\";\n /**\n * Must be in the range of `0.0` to `1.0`.\n */\n threshold?: number;\n};\n\n/**\n * Policy to consolidate if the sum of all candidate segment byte size is less\n * than the total segment byte size multiplied by a given threshold.\n */\nexport type TierConsolidationPolicy = {\n /**\n * Type of consolidation policy.\n */\n type: \"tier\";\n /**\n * Size below which all segments are treated as equivalent.\n *\n * Default: `2097152` (2 MiB)\n */\n segmentsBytesFloor?: number;\n /**\n * Maximum allowed size of all consolidation segments.\n *\n * Default: `5368709120` (5 GiB)\n */\n segmentsBytesMax?: number;\n /**\n * Maximum number of segments that are evaluated as candidates for\n * consolidation.\n *\n * Default: `10`\n */\n segmentsMax?: number;\n /**\n * Minimum number of segments that are evaluated as candidates for\n * consolidation.\n *\n * Default: `1`\n */\n segmentsMin?: number;\n /**\n * Consolidation candidates with a score less than this value will be\n * filtered out.\n *\n * Default: `0`\n */\n minScore?: number;\n};\n\n/**\n * Compression for storing data.\n */\nexport type Compression = \"lz4\" | \"none\";\n\n/**\n * Options for creating a View.\n */\nexport type CreateViewOptions =\n | CreateArangoSearchViewOptions\n | CreateSearchAliasViewOptions;\n\n/**\n * Options for replacing a View's properties.\n */\nexport type ViewPropertiesOptions =\n | ArangoSearchViewPropertiesOptions\n | SearchAliasViewPropertiesOptions;\n\n/**\n * Options for partially modifying a View's properties.\n */\nexport type ViewPatchPropertiesOptions =\n | ArangoSearchViewPropertiesOptions\n | SearchAliasViewPatchPropertiesOptions;\n\n/**\n * A link definition for an ArangoSearch View.\n */\nexport type ArangoSearchViewLinkOptions = {\n /**\n * A list of names of Analyzers to apply to values of processed document\n * attributes.\n *\n * Default: `[\"identity\"]`\n */\n analyzers?: string[];\n /**\n * An object mapping names of attributes to process for each document to\n * {@link ArangoSearchViewLinkOptions} definitions.\n */\n fields?: Record<string, ArangoSearchViewLinkOptions>;\n /**\n * If set to `true`, all document attributes will be processed, otherwise\n * only the attributes in `fields` will be processed.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * (Enterprise Edition only.) An object mapping attribute names to\n * {@link ArangoSearchViewLinkOptions} definitions to index sub-objects\n * stored in an array.\n */\n nested?: Record<string, ArangoSearchViewLinkOptions>;\n /**\n * If set to `true`, the position of values in array values will be tracked,\n * otherwise all values in an array will be treated as equal alternatives.\n */\n trackListPositions?: boolean;\n /**\n * Controls how the view should keep track of the attribute values.\n *\n * Default: `\"none\"`\n */\n storeValues?: \"none\" | \"id\";\n /**\n * If set to `true`, then no exclusive lock is used on the source collection\n * during View index creation, so that it remains basically available.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n};\n\n/**\n * Options for modifying the properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewPropertiesOptions = {\n /**\n * How many commits to wait between removing unused files.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * How long to wait between applying the `consolidationPolicy`.\n *\n * Default: `10000`\n */\n consolidationIntervalMsec?: number;\n /**\n * How long to wait between commiting View data store changes and making\n * documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * An object mapping names of linked collections to\n * {@link ArangoSearchViewLinkOptions} definitions.\n */\n links?: Record<string, Omit<ArangoSearchViewLinkOptions, \"nested\">>;\n};\n\n/**\n * Options for partially modifying the properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewPatchPropertiesOptions =\n ArangoSearchViewPropertiesOptions;\n\n/**\n * Options for creating an ArangoSearch View.\n */\nexport type CreateArangoSearchViewOptions =\n ArangoSearchViewPropertiesOptions & {\n /**\n * Type of the View.\n */\n type: \"arangosearch\";\n /**\n * Maximum number of writers cached in the pool.\n *\n * Default: `64`\n */\n writebufferIdle?: number;\n /**\n * Maximum number of concurrent active writers that perform a transaction.\n *\n * Default: `0`\n */\n writebufferActive?: number;\n /**\n * Maximum memory byte size per writer before a writer flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writebufferSizeMax?: number;\n /**\n * Attribute path (`field`) for the value of each document that will be\n * used for sorting.\n *\n * If `direction` is set to `\"asc\"` or `asc` is set to `true`,\n * the primary sorting order will be ascending.\n *\n * If `direction` is set to `\"desc\"` or `asc` is set to `false`,\n * the primary sorting order will be descending.\n */\n primarySort?: (\n | {\n /**\n * Attribute path for the value of each document to use for\n * sorting.\n */\n field: string;\n /**\n * If set to `\"asc\"`, the primary sorting order will be ascending.\n * If set to `\"desc\"`, the primary sorting order will be descending.\n */\n direction: Direction;\n }\n | {\n /**\n * Attribute path for the value of each document to use for\n * sorting.\n */\n field: string;\n /**\n * If set to `true`, the primary sorting order will be ascending.\n * If set to `false`, the primary sorting order will be descending.\n */\n asc: boolean;\n }\n )[];\n /**\n * Compression to use for the primary sort data.\n *\n * Default: `\"lz4\"`\n */\n primarySortCompression?: Compression;\n /**\n * Attribute paths for which values should be stored in the view index\n * in addition to those used for sorting via `primarySort`.\n */\n storedValues?: {\n /**\n * Attribute paths for which values should be stored in the view index\n * in addition to those used for sorting via `primarySort`.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n }[];\n };\n\n/**\n * Options defining an index used in a SearchAlias View.\n */\nexport type SearchAliasViewIndexOptions = {\n /**\n * Name of a collection.\n */\n collection: string;\n /**\n * Name of an inverted index in the collection.\n */\n index: string;\n};\n\n/**\n * Options for modifying the properties of a SearchAlias View.\n */\nexport type SearchAliasViewPropertiesOptions = {\n /**\n * An array of inverted indexes to add to the View.\n */\n indexes: SearchAliasViewIndexOptions[];\n};\n\n/**\n * Options defining an index to be modified in a SearchAlias View.\n */\nexport type SearchAliasViewPatchIndexOptions = SearchAliasViewIndexOptions & {\n /**\n * Whether to add or remove the index.\n *\n * Default: `\"add\"`\n */\n operation?: \"add\" | \"del\";\n};\n\n/**\n * Options for partially modifying the properties of a SearchAlias View.\n */\nexport type SearchAliasViewPatchPropertiesOptions = {\n /**\n * An array of inverted indexes to add to the View.\n */\n indexes: SearchAliasViewPatchIndexOptions[];\n};\n\n/**\n * Options for creating a SearchAlias View.\n */\nexport type CreateSearchAliasViewOptions = SearchAliasViewPropertiesOptions & {\n /**\n * Type of the View.\n */\n type: \"search-alias\";\n};\n\n/**\n * Generic description of a View.\n */\nexport type GenericViewDescription = {\n /**\n * A globally unique identifier for this View.\n */\n globallyUniqueId: string;\n /**\n * An identifier for this View.\n */\n id: string;\n /**\n * Name of the View.\n */\n name: string;\n};\n\nexport type ViewDescription =\n | ArangoSearchViewDescription\n | SearchAliasViewDescription;\n\nexport type ArangoSearchViewDescription = GenericViewDescription & {\n type: \"arangosearch\";\n};\n\nexport type SearchAliasViewDescription = GenericViewDescription & {\n type: \"search-alias\";\n};\n\nexport type ViewProperties =\n | ArangoSearchViewProperties\n | SearchAliasViewProperties;\n\n/**\n * A link definition for an ArangoSearch View.\n */\nexport type ArangoSearchViewLink = {\n analyzers: string[];\n fields: Record<string, ArangoSearchViewLink>;\n includeAllFields: boolean;\n nested?: Record<string, ArangoSearchViewLink>;\n trackListPositions: boolean;\n storeValues: \"none\" | \"id\";\n};\n\n/**\n * Properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewProperties = ArangoSearchViewDescription & {\n cleanupIntervalStep: number;\n consolidationIntervalMsec: number;\n commitIntervalMsec: number;\n writebufferIdle: number;\n writebufferActive: number;\n writebufferSizeMax: number;\n consolidationPolicy: TierConsolidationPolicy | BytesAccumConsolidationPolicy;\n primarySort: {\n field: string;\n direction: Direction;\n }[];\n primarySortCompression: Compression;\n storedValues: {\n fields: string[];\n compression: Compression;\n }[];\n links: Record<string, Omit<ArangoSearchViewLink, \"nested\">>;\n};\n\n/**\n * Properties of a SearchAlias View.\n */\nexport type SearchAliasViewProperties = SearchAliasViewDescription & {\n indexes: { collection: string; index: string }[];\n};\n\n/**\n * Represents a View in a {@link database.Database}.\n */\nexport class View {\n protected _name: string;\n protected _db: Database;\n\n /**\n * @internal\n */\n constructor(db: Database, name: string) {\n this._db = db;\n this._name = name.normalize(\"NFC\");\n }\n\n /**\n * @internal\n *\n * Indicates that this object represents an ArangoDB View.\n */\n get isArangoView(): true {\n return true;\n }\n\n /**\n * Name of the View.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Retrieves general information about the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const data = await view.get();\n * // data contains general information about the View\n * ```\n */\n get(): Promise<ArangoApiResponse<ViewDescription>> {\n return this._db.request({\n path: `/_api/view/${encodeURIComponent(this._name)}`,\n });\n }\n\n /**\n * Checks whether the View exists.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const exists = await view.exists();\n * console.log(exists); // indicates whether the View exists\n * ```\n */\n async exists(): Promise<boolean> {\n try {\n await this.get();\n return true;\n } catch (err: any) {\n if (isArangoError(err) && err.errorNum === VIEW_NOT_FOUND) {\n return false;\n }\n throw err;\n }\n }\n\n /**\n * Creates a View with the given `options` and the instance's name.\n *\n * See also {@link database.Database#createView}.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"potatoes\");\n * await view.create();\n * // the ArangoSearch View \"potatoes\" now exists\n * ```\n */\n create<Options extends CreateViewOptions>(\n options: CreateViewOptions\n ): Promise<\n typeof options extends CreateArangoSearchViewOptions\n ? ArangoSearchViewDescription\n : Options extends CreateSearchAliasViewOptions\n ? SearchAliasViewDescription\n : ViewDescription\n > {\n return this._db.request({\n method: \"POST\",\n path: \"/_api/view\",\n body: {\n ...options,\n name: this._name,\n },\n });\n }\n\n /**\n * Renames the View and updates the instance's `name` to `newName`.\n *\n * Additionally removes the instance from the {@link database.Database}'s internal\n * cache.\n *\n * **Note**: Renaming Views may not be supported when ArangoDB is\n * running in a cluster configuration.\n *\n * @param newName - The new name of the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view1 = db.view(\"some-view\");\n * await view1.rename(\"other-view\");\n * const view2 = db.view(\"some-view\");\n * const view3 = db.view(\"other-view\");\n * // Note all three View instances are different objects but\n * // view1 and view3 represent the same ArangoDB view!\n * ```\n */\n async rename(newName: string): Promise<ArangoApiResponse<ViewDescription>> {\n const result = this._db.renameView(this._name, newName);\n this._name = newName.normalize(\"NFC\");\n return result;\n }\n\n /**\n * Retrieves the View's properties.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const data = await view.properties();\n * // data contains the View's properties\n * ```\n */\n properties(): Promise<ArangoApiResponse<ViewProperties>> {\n return this._db.request({\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n });\n }\n\n /**\n * Updates the properties of the View.\n *\n * @param properties - Properties of the View to update.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const result = await view.updateProperties({\n * consolidationIntervalMsec: 234\n * });\n * console.log(result.consolidationIntervalMsec); // 234\n * ```\n */\n updateProperties<Properties extends ViewPatchPropertiesOptions | undefined>(\n properties?: Properties\n ): Promise<\n Properties extends ArangoSearchViewPatchPropertiesOptions\n ? ArangoSearchViewProperties\n : Properties extends SearchAliasViewPatchPropertiesOptions\n ? SearchAliasViewProperties\n : ViewProperties\n > {\n return this._db.request({\n method: \"PATCH\",\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n body: properties ?? {},\n });\n }\n\n /**\n * Replaces the properties of the View.\n *\n * @param properties - New properties of the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const result = await view.replaceProperties({\n * consolidationIntervalMsec: 234\n * });\n * console.log(result.consolidationIntervalMsec); // 234\n * ```\n */\n replaceProperties<Properties extends ViewPropertiesOptions | undefined>(\n properties?: Properties\n ): Promise<\n Properties extends ArangoSearchViewPropertiesOptions\n ? ArangoSearchViewProperties\n : Properties extends SearchAliasViewPropertiesOptions\n ? SearchAliasViewProperties\n : ViewProperties\n > {\n return this._db.request({\n method: \"PUT\",\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n body: properties ?? {},\n });\n }\n\n /**\n * Deletes the View from the database.\n *\n * @example\n *\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * await view.drop();\n * // the View \"some-view\" no longer exists\n * ```\n */\n drop(): Promise<boolean> {\n return this._db.request(\n {\n method: \"DELETE\",\n path: `/_api/view/${encodeURIComponent(this._name)}`,\n },\n (res) => res.body.result\n );\n }\n}\n"]}
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;AAWA,mCAAwC;AACxC,uCAA6C;AAE7C;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAS;IACpC,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAFD,oCAEC;AAuaD;;GAEG;AACH,MAAa,IAAI;IAIf;;OAEG;IACH,YAAY,EAAY,EAAE,IAAY;QACpC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,cAAc,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM;QACV,IAAI;YACF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,KAAK,sBAAc,EAAE;gBACzD,OAAO,KAAK,CAAC;aACd;YACD,MAAM,GAAG,CAAC;SACX;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,OAA0B;QAQ1B,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,MAAM;YACd,IAAI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B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACrD,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACzB,CAAC;IACJ,CAAC;CACF;AApOD,oBAoOC","sourcesContent":["/**\n * ```ts\n * import type { ArangoSearchView } from \"arangojs/view\";\n * ```\n *\n * The \"view\" module provides View related types and interfaces for TypeScript.\n *\n * @packageDocumentation\n */\nimport { ArangoApiResponse } from \"./connection\";\nimport { Database } from \"./database\";\nimport { isArangoError } from \"./error\";\nimport { VIEW_NOT_FOUND } from \"./lib/codes\";\n\n/**\n * Indicates whether the given value represents a {@link View}.\n *\n * @param view - A value that might be a View.\n */\nexport function isArangoView(view: any): view is View {\n return Boolean(view && view.isArangoView);\n}\n\n/**\n * Sorting direction. Descending or ascending.\n */\nexport type Direction = \"desc\" | \"asc\";\n\n/**\n * Policy to consolidate based on segment byte size and live document count as\n * dictated by the customization attributes.\n *\n * @deprecated The `bytes_accum` consolidation policy was deprecated in\n * ArangoDB 3.7 and should be replaced with the `tier` consolidation policy.\n */\nexport type BytesAccumConsolidationPolicy = {\n /**\n * Type of consolidation policy.\n */\n type: \"bytes_accum\";\n /**\n * Must be in the range of `0.0` to `1.0`.\n */\n threshold?: number;\n};\n\n/**\n * Policy to consolidate if the sum of all candidate segment byte size is less\n * than the total segment byte size multiplied by a given threshold.\n */\nexport type TierConsolidationPolicy = {\n /**\n * Type of consolidation policy.\n */\n type: \"tier\";\n /**\n * Size below which all segments are treated as equivalent.\n *\n * Default: `2097152` (2 MiB)\n */\n segmentsBytesFloor?: number;\n /**\n * Maximum allowed size of all consolidation segments.\n *\n * Default: `5368709120` (5 GiB)\n */\n segmentsBytesMax?: number;\n /**\n * Maximum number of segments that are evaluated as candidates for\n * consolidation.\n *\n * Default: `10`\n */\n segmentsMax?: number;\n /**\n * Minimum number of segments that are evaluated as candidates for\n * consolidation.\n *\n * Default: `1`\n */\n segmentsMin?: number;\n /**\n * Consolidation candidates with a score less than this value will be\n * filtered out.\n *\n * Default: `0`\n */\n minScore?: number;\n};\n\n/**\n * Compression for storing data.\n */\nexport type Compression = \"lz4\" | \"none\";\n\n/**\n * Options for creating a View.\n */\nexport type CreateViewOptions =\n | CreateArangoSearchViewOptions\n | CreateSearchAliasViewOptions;\n\n/**\n * Options for replacing a View's properties.\n */\nexport type ViewPropertiesOptions =\n | ArangoSearchViewPropertiesOptions\n | SearchAliasViewPropertiesOptions;\n\n/**\n * Options for partially modifying a View's properties.\n */\nexport type ViewPatchPropertiesOptions =\n | ArangoSearchViewPropertiesOptions\n | SearchAliasViewPatchPropertiesOptions;\n\n/**\n * A link definition for an ArangoSearch View.\n */\nexport type ArangoSearchViewLinkOptions = {\n /**\n * A list of names of Analyzers to apply to values of processed document\n * attributes.\n *\n * Default: `[\"identity\"]`\n */\n analyzers?: string[];\n /**\n * An object mapping names of attributes to process for each document to\n * {@link ArangoSearchViewLinkOptions} definitions.\n */\n fields?: Record<string, ArangoSearchViewLinkOptions>;\n /**\n * If set to `true`, all document attributes will be processed, otherwise\n * only the attributes in `fields` will be processed.\n *\n * Default: `false`\n */\n includeAllFields?: boolean;\n /**\n * (Enterprise Edition only.) An object mapping attribute names to\n * {@link ArangoSearchViewLinkOptions} definitions to index sub-objects\n * stored in an array.\n */\n nested?: Record<string, ArangoSearchViewLinkOptions>;\n /**\n * If set to `true`, the position of values in array values will be tracked,\n * otherwise all values in an array will be treated as equal alternatives.\n */\n trackListPositions?: boolean;\n /**\n * Controls how the view should keep track of the attribute values.\n *\n * Default: `\"none\"`\n */\n storeValues?: \"none\" | \"id\";\n /**\n * If set to `true`, then no exclusive lock is used on the source collection\n * during View index creation, so that it remains basically available.\n *\n * Default: `false`\n */\n inBackground?: boolean;\n /**\n * (Enterprise Edition only.) If set to `true`, then field normalization\n * values are always cached in memory.\n *\n * Default: `false`\n */\n cache?: boolean;\n};\n\n/**\n * Options for modifying the properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewPropertiesOptions = {\n /**\n * How many commits to wait between removing unused files.\n *\n * Default: `2`\n */\n cleanupIntervalStep?: number;\n /**\n * How long to wait between applying the `consolidationPolicy`.\n *\n * Default: `10000`\n */\n consolidationIntervalMsec?: number;\n /**\n * How long to wait between commiting View data store changes and making\n * documents visible to queries.\n *\n * Default: `1000`\n */\n commitIntervalMsec?: number;\n /**\n * Consolidation policy to apply for selecting which segments should be\n * merged.\n *\n * Default: `{ type: \"tier\" }`\n */\n consolidationPolicy?: TierConsolidationPolicy;\n /**\n * An object mapping names of linked collections to\n * {@link ArangoSearchViewLinkOptions} definitions.\n */\n links?: Record<string, Omit<ArangoSearchViewLinkOptions, \"nested\">>;\n};\n\n/**\n * Options for partially modifying the properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewPatchPropertiesOptions =\n ArangoSearchViewPropertiesOptions;\n\n/**\n * Options for creating an ArangoSearch View.\n */\nexport type CreateArangoSearchViewOptions =\n ArangoSearchViewPropertiesOptions & {\n /**\n * Type of the View.\n */\n type: \"arangosearch\";\n /**\n * Maximum number of writers cached in the pool.\n *\n * Default: `64`\n */\n writebufferIdle?: number;\n /**\n * Maximum number of concurrent active writers that perform a transaction.\n *\n * Default: `0`\n */\n writebufferActive?: number;\n /**\n * Maximum memory byte size per writer before a writer flush is triggered.\n *\n * Default: `33554432` (32 MiB)\n */\n writebufferSizeMax?: number;\n /**\n * Attribute path (`field`) for the value of each document that will be\n * used for sorting.\n *\n * If `direction` is set to `\"asc\"` or `asc` is set to `true`,\n * the primary sorting order will be ascending.\n *\n * If `direction` is set to `\"desc\"` or `asc` is set to `false`,\n * the primary sorting order will be descending.\n */\n primarySort?: (\n | {\n /**\n * Attribute path for the value of each document to use for\n * sorting.\n */\n field: string;\n /**\n * If set to `\"asc\"`, the primary sorting order will be ascending.\n * If set to `\"desc\"`, the primary sorting order will be descending.\n */\n direction: Direction;\n }\n | {\n /**\n * Attribute path for the value of each document to use for\n * sorting.\n */\n field: string;\n /**\n * If set to `true`, the primary sorting order will be ascending.\n * If set to `false`, the primary sorting order will be descending.\n */\n asc: boolean;\n }\n )[];\n /**\n * Compression to use for the primary sort data.\n *\n * Default: `\"lz4\"`\n */\n primarySortCompression?: Compression;\n /**\n * Attribute paths for which values should be stored in the view index\n * in addition to those used for sorting via `primarySort`.\n */\n storedValues?: {\n /**\n * Attribute paths for which values should be stored in the view index\n * in addition to those used for sorting via `primarySort`.\n */\n fields: string[];\n /**\n * How the attribute values should be compressed.\n *\n * Default: `\"lz4\"`\n */\n compression?: Compression;\n /**\n * (Enterprise Edition only.) If set to `true`, then stored values are\n * always cached in memory.\n *\n * Default: `false`\n */\n cache?: boolean;\n }[];\n };\n\n/**\n * Options defining an index used in a SearchAlias View.\n */\nexport type SearchAliasViewIndexOptions = {\n /**\n * Name of a collection.\n */\n collection: string;\n /**\n * Name of an inverted index in the collection.\n */\n index: string;\n};\n\n/**\n * Options for modifying the properties of a SearchAlias View.\n */\nexport type SearchAliasViewPropertiesOptions = {\n /**\n * An array of inverted indexes to add to the View.\n */\n indexes: SearchAliasViewIndexOptions[];\n};\n\n/**\n * Options defining an index to be modified in a SearchAlias View.\n */\nexport type SearchAliasViewPatchIndexOptions = SearchAliasViewIndexOptions & {\n /**\n * Whether to add or remove the index.\n *\n * Default: `\"add\"`\n */\n operation?: \"add\" | \"del\";\n};\n\n/**\n * Options for partially modifying the properties of a SearchAlias View.\n */\nexport type SearchAliasViewPatchPropertiesOptions = {\n /**\n * An array of inverted indexes to add to the View.\n */\n indexes: SearchAliasViewPatchIndexOptions[];\n};\n\n/**\n * Options for creating a SearchAlias View.\n */\nexport type CreateSearchAliasViewOptions = SearchAliasViewPropertiesOptions & {\n /**\n * Type of the View.\n */\n type: \"search-alias\";\n};\n\n/**\n * Generic description of a View.\n */\nexport type GenericViewDescription = {\n /**\n * A globally unique identifier for this View.\n */\n globallyUniqueId: string;\n /**\n * An identifier for this View.\n */\n id: string;\n /**\n * Name of the View.\n */\n name: string;\n};\n\nexport type ViewDescription =\n | ArangoSearchViewDescription\n | SearchAliasViewDescription;\n\nexport type ArangoSearchViewDescription = GenericViewDescription & {\n type: \"arangosearch\";\n};\n\nexport type SearchAliasViewDescription = GenericViewDescription & {\n type: \"search-alias\";\n};\n\nexport type ViewProperties =\n | ArangoSearchViewProperties\n | SearchAliasViewProperties;\n\n/**\n * A link definition for an ArangoSearch View.\n */\nexport type ArangoSearchViewLink = {\n analyzers: string[];\n fields: Record<string, ArangoSearchViewLink>;\n includeAllFields: boolean;\n nested?: Record<string, ArangoSearchViewLink>;\n trackListPositions: boolean;\n storeValues: \"none\" | \"id\";\n cache: boolean;\n};\n\n/**\n * Properties of an ArangoSearch View.\n */\nexport type ArangoSearchViewProperties = ArangoSearchViewDescription & {\n cleanupIntervalStep: number;\n consolidationIntervalMsec: number;\n commitIntervalMsec: number;\n writebufferIdle: number;\n writebufferActive: number;\n writebufferSizeMax: number;\n consolidationPolicy: TierConsolidationPolicy | BytesAccumConsolidationPolicy;\n primarySort: {\n field: string;\n direction: Direction;\n }[];\n primarySortCompression: Compression;\n storedValues: {\n fields: string[];\n compression: Compression;\n cache: boolean;\n }[];\n links: Record<string, Omit<ArangoSearchViewLink, \"nested\">>;\n};\n\n/**\n * Properties of a SearchAlias View.\n */\nexport type SearchAliasViewProperties = SearchAliasViewDescription & {\n indexes: { collection: string; index: string }[];\n};\n\n/**\n * Represents a View in a {@link database.Database}.\n */\nexport class View {\n protected _name: string;\n protected _db: Database;\n\n /**\n * @internal\n */\n constructor(db: Database, name: string) {\n this._db = db;\n this._name = name.normalize(\"NFC\");\n }\n\n /**\n * @internal\n *\n * Indicates that this object represents an ArangoDB View.\n */\n get isArangoView(): true {\n return true;\n }\n\n /**\n * Name of the View.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Retrieves general information about the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const data = await view.get();\n * // data contains general information about the View\n * ```\n */\n get(): Promise<ArangoApiResponse<ViewDescription>> {\n return this._db.request({\n path: `/_api/view/${encodeURIComponent(this._name)}`,\n });\n }\n\n /**\n * Checks whether the View exists.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const exists = await view.exists();\n * console.log(exists); // indicates whether the View exists\n * ```\n */\n async exists(): Promise<boolean> {\n try {\n await this.get();\n return true;\n } catch (err: any) {\n if (isArangoError(err) && err.errorNum === VIEW_NOT_FOUND) {\n return false;\n }\n throw err;\n }\n }\n\n /**\n * Creates a View with the given `options` and the instance's name.\n *\n * See also {@link database.Database#createView}.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"potatoes\");\n * await view.create();\n * // the ArangoSearch View \"potatoes\" now exists\n * ```\n */\n create<Options extends CreateViewOptions>(\n options: CreateViewOptions\n ): Promise<\n typeof options extends CreateArangoSearchViewOptions\n ? ArangoSearchViewDescription\n : Options extends CreateSearchAliasViewOptions\n ? SearchAliasViewDescription\n : ViewDescription\n > {\n return this._db.request({\n method: \"POST\",\n path: \"/_api/view\",\n body: {\n ...options,\n name: this._name,\n },\n });\n }\n\n /**\n * Renames the View and updates the instance's `name` to `newName`.\n *\n * Additionally removes the instance from the {@link database.Database}'s internal\n * cache.\n *\n * **Note**: Renaming Views may not be supported when ArangoDB is\n * running in a cluster configuration.\n *\n * @param newName - The new name of the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view1 = db.view(\"some-view\");\n * await view1.rename(\"other-view\");\n * const view2 = db.view(\"some-view\");\n * const view3 = db.view(\"other-view\");\n * // Note all three View instances are different objects but\n * // view1 and view3 represent the same ArangoDB view!\n * ```\n */\n async rename(newName: string): Promise<ArangoApiResponse<ViewDescription>> {\n const result = this._db.renameView(this._name, newName);\n this._name = newName.normalize(\"NFC\");\n return result;\n }\n\n /**\n * Retrieves the View's properties.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const data = await view.properties();\n * // data contains the View's properties\n * ```\n */\n properties(): Promise<ArangoApiResponse<ViewProperties>> {\n return this._db.request({\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n });\n }\n\n /**\n * Updates the properties of the View.\n *\n * @param properties - Properties of the View to update.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const result = await view.updateProperties({\n * consolidationIntervalMsec: 234\n * });\n * console.log(result.consolidationIntervalMsec); // 234\n * ```\n */\n updateProperties<Properties extends ViewPatchPropertiesOptions | undefined>(\n properties?: Properties\n ): Promise<\n Properties extends ArangoSearchViewPatchPropertiesOptions\n ? ArangoSearchViewProperties\n : Properties extends SearchAliasViewPatchPropertiesOptions\n ? SearchAliasViewProperties\n : ViewProperties\n > {\n return this._db.request({\n method: \"PATCH\",\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n body: properties ?? {},\n });\n }\n\n /**\n * Replaces the properties of the View.\n *\n * @param properties - New properties of the View.\n *\n * @example\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * const result = await view.replaceProperties({\n * consolidationIntervalMsec: 234\n * });\n * console.log(result.consolidationIntervalMsec); // 234\n * ```\n */\n replaceProperties<Properties extends ViewPropertiesOptions | undefined>(\n properties?: Properties\n ): Promise<\n Properties extends ArangoSearchViewPropertiesOptions\n ? ArangoSearchViewProperties\n : Properties extends SearchAliasViewPropertiesOptions\n ? SearchAliasViewProperties\n : ViewProperties\n > {\n return this._db.request({\n method: \"PUT\",\n path: `/_api/view/${encodeURIComponent(this._name)}/properties`,\n body: properties ?? {},\n });\n }\n\n /**\n * Deletes the View from the database.\n *\n * @example\n *\n * ```js\n * const db = new Database();\n * const view = db.view(\"some-view\");\n * await view.drop();\n * // the View \"some-view\" no longer exists\n * ```\n */\n drop(): Promise<boolean> {\n return this._db.request(\n {\n method: \"DELETE\",\n path: `/_api/view/${encodeURIComponent(this._name)}`,\n },\n (res) => res.body.result\n );\n }\n}\n"]}