@webiny/api-opensearch 6.6.0-alpha.0 → 6.6.0-alpha.1

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/index.d.ts CHANGED
@@ -10,5 +10,4 @@ export * from "./utils/index.js";
10
10
  export * from "./operations/index.js";
11
11
  export * from "./sharedIndex.js";
12
12
  export * from "./indexPrefix.js";
13
- export * from "./db/index.js";
14
13
  export * from "./types.js";
package/index.js CHANGED
@@ -7,7 +7,6 @@ export * from "./utils/index.js";
7
7
  export * from "./operations/index.js";
8
8
  export * from "./sharedIndex.js";
9
9
  export * from "./indexPrefix.js";
10
- export * from "./db/index.js";
11
10
  export * from "./types.js";
12
11
  export { registerOpenSearchCore } from "./registerOpenSearchCore.js";
13
12
  export { getBaseConfiguration, getCommonMappings } from "./indexConfiguration/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-opensearch",
3
- "version": "6.6.0-alpha.0",
3
+ "version": "6.6.0-alpha.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -18,20 +18,16 @@
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "@opensearch-project/opensearch": "3.6.0",
21
- "@webiny/api": "6.6.0-alpha.0",
22
- "@webiny/aws-sdk": "6.6.0-alpha.0",
23
- "@webiny/db-dynamodb": "6.6.0-alpha.0",
24
- "@webiny/error": "6.6.0-alpha.0",
25
- "@webiny/feature": "6.6.0-alpha.0",
26
- "@webiny/handler": "6.6.0-alpha.0"
21
+ "@webiny/error": "6.6.0-alpha.1",
22
+ "@webiny/feature": "6.6.0-alpha.1",
23
+ "@webiny/handler": "6.6.0-alpha.1"
27
24
  },
28
25
  "devDependencies": {
29
- "@webiny/build-tools": "6.6.0-alpha.0",
30
- "@webiny/di": "1.0.2",
31
- "@webiny/project-utils": "6.6.0-alpha.0",
26
+ "@webiny/build-tools": "6.6.0-alpha.1",
27
+ "@webiny/di": "1.1.0",
32
28
  "rimraf": "6.1.3",
33
29
  "typescript": "7.0.2",
34
- "vitest": "4.1.10"
30
+ "vitest": "4.1.11"
35
31
  },
36
32
  "publishConfig": {
37
33
  "access": "public"
package/db/entity.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { type ITable } from "@webiny/db-dynamodb";
2
- import type { IOpenSearchEntity } from "../db/types.js";
3
- export interface ICreateOpenSearchEntityParams {
4
- table: ITable;
5
- entityName: string;
6
- }
7
- export declare const createOpenSearchEntity: (params: ICreateOpenSearchEntityParams) => IOpenSearchEntity;
package/db/entity.js DELETED
@@ -1,18 +0,0 @@
1
- import { createEntity, standardEntityAttributes } from "@webiny/db-dynamodb";
2
- const createOpenSearchEntity = (params)=>{
3
- const { table, entityName } = params;
4
- return createEntity({
5
- name: entityName,
6
- table: table.table,
7
- attributes: {
8
- ...standardEntityAttributes,
9
- index: {
10
- type: "string",
11
- required: true
12
- }
13
- }
14
- });
15
- };
16
- export { createOpenSearchEntity };
17
-
18
- //# sourceMappingURL=entity.js.map
package/db/entity.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"db/entity.js","sources":["../../src/db/entity.ts"],"sourcesContent":["import { createEntity, type ITable, standardEntityAttributes } from \"@webiny/db-dynamodb\";\nimport type { IOpenSearchEntity, IOpenSearchEntityAttributes } from \"~/db/types.js\";\n\nexport interface ICreateOpenSearchEntityParams {\n table: ITable;\n entityName: string;\n}\n\nexport const createOpenSearchEntity = (\n params: ICreateOpenSearchEntityParams\n): IOpenSearchEntity => {\n const { table, entityName } = params;\n return createEntity<IOpenSearchEntityAttributes>({\n name: entityName,\n table: table.table,\n attributes: {\n ...standardEntityAttributes,\n index: {\n type: \"string\",\n required: true\n }\n }\n });\n};\n"],"names":["createOpenSearchEntity","params","table","entityName","createEntity","standardEntityAttributes"],"mappings":";AAQO,MAAMA,yBAAyB,CAClCC;IAEA,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,aAA0C;QAC7C,MAAMD;QACN,OAAOD,MAAM,KAAK;QAClB,YAAY;YACR,GAAGG,wBAAwB;YAC3B,OAAO;gBACH,MAAM;gBACN,UAAU;YACd;QACJ;IACJ;AACJ"}
package/db/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./table.js";
2
- export * from "./entity.js";
3
- export * from "./types.js";
package/db/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from "./table.js";
2
- export * from "./entity.js";
3
- export * from "./types.js";
package/db/table.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
2
- import { type ITable } from "@webiny/db-dynamodb";
3
- export interface ICreateOpenSearchTableParams {
4
- name?: string;
5
- documentClient: DynamoDBDocument;
6
- }
7
- export declare const createOpenSearchTable: ({ name, documentClient }: ICreateOpenSearchTableParams) => ITable;
package/db/table.js DELETED
@@ -1,13 +0,0 @@
1
- import { createTable } from "@webiny/db-dynamodb";
2
- const createOpenSearchTable = ({ name, documentClient })=>createTable({
3
- name: name || process.env.DB_TABLE_OPENSEARCH,
4
- indexes: {
5
- GSI_TENANT: {
6
- partitionKey: "GSI_TENANT"
7
- }
8
- },
9
- documentClient
10
- });
11
- export { createOpenSearchTable };
12
-
13
- //# sourceMappingURL=table.js.map
package/db/table.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"db/table.js","sources":["../../src/db/table.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createTable, type ITable } from \"@webiny/db-dynamodb\";\n\nexport interface ICreateOpenSearchTableParams {\n name?: string;\n documentClient: DynamoDBDocument;\n}\n\nexport const createOpenSearchTable = ({\n name,\n documentClient\n}: ICreateOpenSearchTableParams): ITable => {\n return createTable({\n name: name || (process.env.DB_TABLE_OPENSEARCH as string),\n indexes: {\n GSI_TENANT: {\n partitionKey: \"GSI_TENANT\"\n }\n },\n documentClient\n });\n};\n"],"names":["createOpenSearchTable","name","documentClient","createTable","process"],"mappings":";AAQO,MAAMA,wBAAwB,CAAC,EAClCC,IAAI,EACJC,cAAc,EACa,GACpBC,YAAY;QACf,MAAMF,QAASG,QAAQ,GAAG,CAAC,mBAAmB;QAC9C,SAAS;YACL,YAAY;gBACR,cAAc;YAClB;QACJ;QACAF;IACJ"}
package/db/types.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
2
- import type { GenericRecord } from "@webiny/api/types.js";
3
- export interface IOpenSearchEntityAttributes extends IStandardEntityAttributes<GenericRecord> {
4
- index: string;
5
- }
6
- export type IOpenSearchEntity = IEntity<IOpenSearchEntityAttributes>;
package/db/types.js DELETED
File without changes