refactor: migrate es mapping types from es-mapping-generator to .d.ts next to generated mappings

This commit is contained in:
2023-06-30 12:01:38 +02:00
parent 1aaf85b444
commit 0a7e6af141
19 changed files with 354 additions and 435 deletions

View File

@@ -45,7 +45,6 @@
"@elastic/elasticsearch": "8.4.0",
"@openstapps/core": "workspace:*",
"@openstapps/core-tools": "workspace:*",
"@openstapps/es-mapping-generator": "workspace:*",
"@openstapps/logger": "workspace:*",
"@types/body-parser": "1.19.2",
"@types/cors": "2.8.13",
@@ -89,7 +88,6 @@
"c8": "7.14.0",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"conventional-changelog-cli": "2.2.2",
"cross-env": "7.0.3",
"get-port": "5.1.1",
"mocha": "10.2.0",

View File

@@ -15,8 +15,8 @@
*/
import {Client} from '@elastic/elasticsearch';
import {SCThingType} from '@openstapps/core';
import {AggregationSchema} from '@openstapps/es-mapping-generator/src/types/aggregation.js';
import {ElasticsearchTemplateCollection} from '@openstapps/es-mapping-generator/src/types/mapping.js';
import type {AggregationSchema} from '@openstapps/core/lib/mappings/aggregations.json.js';
import type {ElasticsearchTemplateCollection} from '@openstapps/core/lib/mappings/mappings.json.js';
import {readFileSync} from 'fs';
import path from 'path';