@webiny/api-form-builder-so-ddb-es 0.0.0-mt-3 → 0.0.0-unstable.06b2ede40f
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/configurations.d.ts +16 -7
- package/configurations.js +38 -13
- package/configurations.js.map +1 -0
- package/definitions/elasticsearch.d.ts +47 -5
- package/definitions/elasticsearch.js +8 -16
- package/definitions/elasticsearch.js.map +1 -0
- package/definitions/form.d.ts +6 -4
- package/definitions/form.js +9 -17
- package/definitions/form.js.map +1 -0
- package/definitions/settings.d.ts +6 -4
- package/definitions/settings.js +8 -16
- package/definitions/settings.js.map +1 -0
- package/definitions/submission.d.ts +6 -4
- package/definitions/submission.js +8 -16
- package/definitions/submission.js.map +1 -0
- package/definitions/system.d.ts +6 -4
- package/definitions/system.js +8 -16
- package/definitions/system.js.map +1 -0
- package/definitions/table.d.ts +7 -6
- package/definitions/table.js +7 -6
- package/definitions/table.js.map +1 -0
- package/definitions/tableElasticsearch.d.ts +6 -5
- package/definitions/tableElasticsearch.js +7 -6
- package/definitions/tableElasticsearch.js.map +1 -0
- package/elasticsearch/createElasticsearchIndex.d.ts +10 -0
- package/elasticsearch/createElasticsearchIndex.js +41 -0
- package/elasticsearch/createElasticsearchIndex.js.map +1 -0
- package/elasticsearch/indices/base.d.ts +2 -0
- package/elasticsearch/indices/base.js +13 -0
- package/elasticsearch/indices/base.js.map +1 -0
- package/elasticsearch/indices/index.d.ts +1 -0
- package/elasticsearch/indices/index.js +14 -0
- package/elasticsearch/indices/index.js.map +1 -0
- package/elasticsearch/indices/japanese.d.ts +2 -0
- package/elasticsearch/indices/japanese.js +14 -0
- package/elasticsearch/indices/japanese.js.map +1 -0
- package/index.d.ts +2 -1
- package/index.js +100 -81
- package/index.js.map +1 -0
- package/operations/form/elasticsearchBody.d.ts +4 -4
- package/operations/form/elasticsearchBody.js +19 -63
- package/operations/form/elasticsearchBody.js.map +1 -0
- package/operations/form/elasticsearchFields.js +2 -3
- package/operations/form/elasticsearchFields.js.map +1 -0
- package/operations/form/fields.js +2 -3
- package/operations/form/fields.js.map +1 -0
- package/operations/form/index.d.ts +8 -8
- package/operations/form/index.js +196 -243
- package/operations/form/index.js.map +1 -0
- package/operations/settings/index.d.ts +5 -5
- package/operations/settings/index.js +26 -35
- package/operations/settings/index.js.map +1 -0
- package/operations/submission/elasticsearchBody.d.ts +4 -4
- package/operations/submission/elasticsearchBody.js +22 -61
- package/operations/submission/elasticsearchBody.js.map +1 -0
- package/operations/submission/elasticsearchFields.js +2 -3
- package/operations/submission/elasticsearchFields.js.map +1 -0
- package/operations/submission/index.d.ts +7 -7
- package/operations/submission/index.js +68 -96
- package/operations/submission/index.js.map +1 -0
- package/operations/system/index.d.ts +5 -5
- package/operations/system/index.js +22 -32
- package/operations/system/index.js.map +1 -0
- package/package.json +28 -35
- package/plugins/FormDynamoDbFieldPlugin.js +5 -9
- package/plugins/FormDynamoDbFieldPlugin.js.map +1 -0
- package/plugins/FormElasticsearchBodyModifierPlugin.d.ts +1 -1
- package/plugins/FormElasticsearchBodyModifierPlugin.js +6 -10
- package/plugins/FormElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/FormElasticsearchFieldPlugin.d.ts +1 -1
- package/plugins/FormElasticsearchFieldPlugin.js +6 -10
- package/plugins/FormElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/FormElasticsearchIndexPlugin.d.ts +4 -0
- package/plugins/FormElasticsearchIndexPlugin.js +13 -0
- package/plugins/FormElasticsearchIndexPlugin.js.map +1 -0
- package/plugins/FormElasticsearchQueryModifierPlugin.d.ts +1 -1
- package/plugins/FormElasticsearchQueryModifierPlugin.js +6 -10
- package/plugins/FormElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/FormElasticsearchSortModifierPlugin.d.ts +1 -1
- package/plugins/FormElasticsearchSortModifierPlugin.js +6 -10
- package/plugins/FormElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/SubmissionElasticsearchBodyModifierPlugin.d.ts +1 -1
- package/plugins/SubmissionElasticsearchBodyModifierPlugin.js +6 -10
- package/plugins/SubmissionElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/SubmissionElasticsearchFieldPlugin.d.ts +1 -1
- package/plugins/SubmissionElasticsearchFieldPlugin.js +6 -10
- package/plugins/SubmissionElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/SubmissionElasticsearchQueryModifierPlugin.d.ts +1 -1
- package/plugins/SubmissionElasticsearchQueryModifierPlugin.js +6 -10
- package/plugins/SubmissionElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/SubmissionElasticsearchSortModifierPlugin.d.ts +1 -1
- package/plugins/SubmissionElasticsearchSortModifierPlugin.js +6 -10
- package/plugins/SubmissionElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/index.d.ts +10 -0
- package/plugins/index.js +117 -0
- package/plugins/index.js.map +1 -0
- package/tasks/createIndexTaskPlugin.d.ts +2 -0
- package/tasks/createIndexTaskPlugin.js +36 -0
- package/tasks/createIndexTaskPlugin.js.map +1 -0
- package/types.d.ts +17 -15
- package/types.js +6 -6
- package/types.js.map +1 -0
- package/operations/system/createElasticsearchIndex.d.ts +0 -6
- package/operations/system/createElasticsearchIndex.js +0 -70
- package/upgrades/5.16.0/index.d.ts +0 -8
- package/upgrades/5.16.0/index.js +0 -141
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_apiElasticsearch","require","_FormElasticsearchFieldPlugin","_FormElasticsearchSortModifierPlugin","_FormElasticsearchBodyModifierPlugin","_FormElasticsearchQueryModifierPlugin","createFormElasticType","exports","createInitialQueryValue","must","term","must_not","should","filter","createElasticsearchQuery","params","plugins","where","initialWhere","fieldPlugins","query","operatorPlugins","getElasticsearchOperatorPluginsByLocale","locale","sharedIndex","isSharedElasticsearchIndex","tenant","push","applyWhere","fields","operators","createElasticsearchBody","limit","initialLimit","sort","initialSort","after","byType","FormElasticsearchFieldPlugin","type","reduce","acc","plugin","field","createLimit","createSort","queryModifiers","FormElasticsearchQueryModifierPlugin","modifyQuery","sortModifiers","FormElasticsearchSortModifierPlugin","modifySort","body","constant_score","bool","size","search_after","bodyModifiers","FormElasticsearchBodyModifierPlugin","modifyBody"],"sources":["elasticsearchBody.ts"],"sourcesContent":["import type { PrimitiveValue, SearchBody as esSearchBody } from \"elastic-ts\";\nimport {\n applyWhere,\n createLimit,\n createSort,\n getElasticsearchOperatorPluginsByLocale,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport type { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { FormElasticsearchFieldPlugin } from \"~/plugins/FormElasticsearchFieldPlugin\";\nimport { FormElasticsearchSortModifierPlugin } from \"~/plugins/FormElasticsearchSortModifierPlugin\";\nimport { FormElasticsearchBodyModifierPlugin } from \"~/plugins/FormElasticsearchBodyModifierPlugin\";\nimport type { FormBuilderStorageOperationsListFormsParams } from \"@webiny/api-form-builder/types\";\nimport { FormElasticsearchQueryModifierPlugin } from \"~/plugins/FormElasticsearchQueryModifierPlugin\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\n\nexport const createFormElasticType = (): string => {\n return \"fb.form\";\n};\n\nconst createInitialQueryValue = (): ElasticsearchBoolQueryConfig => {\n return {\n must: [\n /**\n * We add the __type filtering in the initial query because it must be applied.\n */\n {\n term: {\n \"__type.keyword\": createFormElasticType()\n }\n }\n ],\n must_not: [],\n should: [],\n filter: []\n };\n};\n\ninterface CreateElasticsearchQueryParams extends CreateElasticsearchBodyParams {\n fieldPlugins: Record<string, FormElasticsearchFieldPlugin>;\n}\n\nconst createElasticsearchQuery = (params: CreateElasticsearchQueryParams) => {\n const { plugins, where: initialWhere, fieldPlugins } = params;\n const query = createInitialQueryValue();\n /**\n * Be aware that, if having more registered operator plugins of same type, the last one will be used.\n */\n const operatorPlugins = getElasticsearchOperatorPluginsByLocale(plugins, initialWhere.locale);\n\n const where: Partial<FormBuilderStorageOperationsListFormsParams[\"where\"]> = {\n ...initialWhere\n };\n /**\n * !!! IMPORTANT !!! There are few specific cases where we hardcode the query conditions.\n *\n * When ES index is shared between tenants, we need to filter records by tenant ID.\n * No need for the tenant filtering otherwise as each index is for single tenant.\n */\n const sharedIndex = isSharedElasticsearchIndex();\n if (sharedIndex && where.tenant) {\n query.must.push({\n term: {\n \"tenant.keyword\": where.tenant\n }\n });\n }\n /**\n * Remove tenant so it is not applied again later.\n * Possibly tenant is not defined, but just in case, remove it.\n */\n delete where.tenant;\n /**\n * Add the locale to filtering.\n */\n query.must.push({\n term: {\n \"locale.keyword\": where.locale as string\n }\n });\n delete where.locale;\n /**\n * We apply other conditions as they are passed via the where value.\n */\n applyWhere({\n query,\n where,\n fields: fieldPlugins,\n operators: operatorPlugins\n });\n\n return query;\n};\n\ninterface CreateElasticsearchBodyParams {\n plugins: PluginsContainer;\n where: FormBuilderStorageOperationsListFormsParams[\"where\"];\n limit: number;\n after?: PrimitiveValue[];\n sort: string[];\n}\n\nexport const createElasticsearchBody = (params: CreateElasticsearchBodyParams): esSearchBody => {\n const { plugins, where, limit: initialLimit, sort: initialSort, after } = params;\n\n const fieldPlugins = plugins\n .byType<FormElasticsearchFieldPlugin>(FormElasticsearchFieldPlugin.type)\n .reduce((acc, plugin) => {\n acc[plugin.field] = plugin;\n return acc;\n }, {} as Record<string, FormElasticsearchFieldPlugin>);\n\n const limit = createLimit(initialLimit, 100);\n\n const query = createElasticsearchQuery({\n ...params,\n fieldPlugins\n });\n\n const sort = createSort({\n sort: initialSort,\n fieldPlugins\n });\n\n const queryModifiers = plugins.byType<FormElasticsearchQueryModifierPlugin>(\n FormElasticsearchQueryModifierPlugin.type\n );\n\n for (const plugin of queryModifiers) {\n plugin.modifyQuery({\n query,\n where\n });\n }\n\n const sortModifiers = plugins.byType<FormElasticsearchSortModifierPlugin>(\n FormElasticsearchSortModifierPlugin.type\n );\n\n for (const plugin of sortModifiers) {\n plugin.modifySort({\n sort\n });\n }\n\n const body = {\n query: {\n constant_score: {\n filter: {\n bool: {\n ...query\n }\n }\n }\n },\n size: limit + 1,\n search_after: after,\n sort\n };\n\n const bodyModifiers = plugins.byType<FormElasticsearchBodyModifierPlugin>(\n FormElasticsearchBodyModifierPlugin.type\n );\n\n for (const plugin of bodyModifiers) {\n plugin.modifyBody({\n body\n });\n }\n\n return body;\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAQA,IAAAC,6BAAA,GAAAD,OAAA;AACA,IAAAE,oCAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAH,OAAA;AAEA,IAAAI,qCAAA,GAAAJ,OAAA;AAGO,MAAMK,qBAAqB,GAAGA,CAAA,KAAc;EAC/C,OAAO,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAD,qBAAA,GAAAA,qBAAA;AAEF,MAAME,uBAAuB,GAAGA,CAAA,KAAoC;EAChE,OAAO;IACHC,IAAI,EAAE;IACF;AACZ;AACA;IACY;MACIC,IAAI,EAAE;QACF,gBAAgB,EAAEJ,qBAAqB,CAAC;MAC5C;IACJ,CAAC,CACJ;IACDK,QAAQ,EAAE,EAAE;IACZC,MAAM,EAAE,EAAE;IACVC,MAAM,EAAE;EACZ,CAAC;AACL,CAAC;AAMD,MAAMC,wBAAwB,GAAIC,MAAsC,IAAK;EACzE,MAAM;IAAEC,OAAO;IAAEC,KAAK,EAAEC,YAAY;IAAEC;EAAa,CAAC,GAAGJ,MAAM;EAC7D,MAAMK,KAAK,GAAGZ,uBAAuB,CAAC,CAAC;EACvC;AACJ;AACA;EACI,MAAMa,eAAe,GAAG,IAAAC,yDAAuC,EAACN,OAAO,EAAEE,YAAY,CAACK,MAAM,CAAC;EAE7F,MAAMN,KAAoE,GAAG;IACzE,GAAGC;EACP,CAAC;EACD;AACJ;AACA;AACA;AACA;AACA;EACI,MAAMM,WAAW,GAAG,IAAAC,4CAA0B,EAAC,CAAC;EAChD,IAAID,WAAW,IAAIP,KAAK,CAACS,MAAM,EAAE;IAC7BN,KAAK,CAACX,IAAI,CAACkB,IAAI,CAAC;MACZjB,IAAI,EAAE;QACF,gBAAgB,EAAEO,KAAK,CAACS;MAC5B;IACJ,CAAC,CAAC;EACN;EACA;AACJ;AACA;AACA;EACI,OAAOT,KAAK,CAACS,MAAM;EACnB;AACJ;AACA;EACIN,KAAK,CAACX,IAAI,CAACkB,IAAI,CAAC;IACZjB,IAAI,EAAE;MACF,gBAAgB,EAAEO,KAAK,CAACM;IAC5B;EACJ,CAAC,CAAC;EACF,OAAON,KAAK,CAACM,MAAM;EACnB;AACJ;AACA;EACI,IAAAK,4BAAU,EAAC;IACPR,KAAK;IACLH,KAAK;IACLY,MAAM,EAAEV,YAAY;IACpBW,SAAS,EAAET;EACf,CAAC,CAAC;EAEF,OAAOD,KAAK;AAChB,CAAC;AAUM,MAAMW,uBAAuB,GAAIhB,MAAqC,IAAmB;EAC5F,MAAM;IAAEC,OAAO;IAAEC,KAAK;IAAEe,KAAK,EAAEC,YAAY;IAAEC,IAAI,EAAEC,WAAW;IAAEC;EAAM,CAAC,GAAGrB,MAAM;EAEhF,MAAMI,YAAY,GAAGH,OAAO,CACvBqB,MAAM,CAA+BC,0DAA4B,CAACC,IAAI,CAAC,CACvEC,MAAM,CAAC,CAACC,GAAG,EAAEC,MAAM,KAAK;IACrBD,GAAG,CAACC,MAAM,CAACC,KAAK,CAAC,GAAGD,MAAM;IAC1B,OAAOD,GAAG;EACd,CAAC,EAAE,CAAC,CAAiD,CAAC;EAE1D,MAAMT,KAAK,GAAG,IAAAY,6BAAW,EAACX,YAAY,EAAE,GAAG,CAAC;EAE5C,MAAMb,KAAK,GAAGN,wBAAwB,CAAC;IACnC,GAAGC,MAAM;IACTI;EACJ,CAAC,CAAC;EAEF,MAAMe,IAAI,GAAG,IAAAW,4BAAU,EAAC;IACpBX,IAAI,EAAEC,WAAW;IACjBhB;EACJ,CAAC,CAAC;EAEF,MAAM2B,cAAc,GAAG9B,OAAO,CAACqB,MAAM,CACjCU,0EAAoC,CAACR,IACzC,CAAC;EAED,KAAK,MAAMG,MAAM,IAAII,cAAc,EAAE;IACjCJ,MAAM,CAACM,WAAW,CAAC;MACf5B,KAAK;MACLH;IACJ,CAAC,CAAC;EACN;EAEA,MAAMgC,aAAa,GAAGjC,OAAO,CAACqB,MAAM,CAChCa,wEAAmC,CAACX,IACxC,CAAC;EAED,KAAK,MAAMG,MAAM,IAAIO,aAAa,EAAE;IAChCP,MAAM,CAACS,UAAU,CAAC;MACdjB;IACJ,CAAC,CAAC;EACN;EAEA,MAAMkB,IAAI,GAAG;IACThC,KAAK,EAAE;MACHiC,cAAc,EAAE;QACZxC,MAAM,EAAE;UACJyC,IAAI,EAAE;YACF,GAAGlC;UACP;QACJ;MACJ;IACJ,CAAC;IACDmC,IAAI,EAAEvB,KAAK,GAAG,CAAC;IACfwB,YAAY,EAAEpB,KAAK;IACnBF;EACJ,CAAC;EAED,MAAMuB,aAAa,GAAGzC,OAAO,CAACqB,MAAM,CAChCqB,wEAAmC,CAACnB,IACxC,CAAC;EAED,KAAK,MAAMG,MAAM,IAAIe,aAAa,EAAE;IAChCf,MAAM,CAACiB,UAAU,CAAC;MACdP;IACJ,CAAC,CAAC;EACN;EAEA,OAAOA,IAAI;AACf,CAAC;AAAC7C,OAAA,CAAAwB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _FormElasticsearchFieldPlugin = require("../../plugins/FormElasticsearchFieldPlugin");
|
|
9
|
-
|
|
10
8
|
var _default = () => [new _FormElasticsearchFieldPlugin.FormElasticsearchFieldPlugin({
|
|
11
9
|
field: "createdOn",
|
|
12
10
|
unmappedType: "date"
|
|
@@ -29,5 +27,6 @@ var _default = () => [new _FormElasticsearchFieldPlugin.FormElasticsearchFieldPl
|
|
|
29
27
|
new _FormElasticsearchFieldPlugin.FormElasticsearchFieldPlugin({
|
|
30
28
|
field: _FormElasticsearchFieldPlugin.FormElasticsearchFieldPlugin.ALL
|
|
31
29
|
})];
|
|
30
|
+
exports.default = _default;
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
//# sourceMappingURL=elasticsearchFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_FormElasticsearchFieldPlugin","require","_default","FormElasticsearchFieldPlugin","field","unmappedType","path","ALL","exports","default"],"sources":["elasticsearchFields.ts"],"sourcesContent":["import { FormElasticsearchFieldPlugin } from \"~/plugins/FormElasticsearchFieldPlugin\";\n\nexport default () => [\n new FormElasticsearchFieldPlugin({\n field: \"createdOn\",\n unmappedType: \"date\"\n }),\n new FormElasticsearchFieldPlugin({\n field: \"savedOn\",\n unmappedType: \"date\"\n }),\n new FormElasticsearchFieldPlugin({\n field: \"publishedOn\",\n unmappedType: \"date\"\n }),\n new FormElasticsearchFieldPlugin({\n field: \"ownedBy\",\n path: \"ownedBy.id\"\n }),\n new FormElasticsearchFieldPlugin({\n field: \"createdBy\",\n path: \"createdBy.id\"\n }),\n /**\n * Always add the ALL fields plugin because of the keyword/path build.\n */\n new FormElasticsearchFieldPlugin({\n field: FormElasticsearchFieldPlugin.ALL\n })\n];\n"],"mappings":";;;;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAAsF,IAAAC,QAAA,GAEvEA,CAAA,KAAM,CACjB,IAAIC,0DAA4B,CAAC;EAC7BC,KAAK,EAAE,WAAW;EAClBC,YAAY,EAAE;AAClB,CAAC,CAAC,EACF,IAAIF,0DAA4B,CAAC;EAC7BC,KAAK,EAAE,SAAS;EAChBC,YAAY,EAAE;AAClB,CAAC,CAAC,EACF,IAAIF,0DAA4B,CAAC;EAC7BC,KAAK,EAAE,aAAa;EACpBC,YAAY,EAAE;AAClB,CAAC,CAAC,EACF,IAAIF,0DAA4B,CAAC;EAC7BC,KAAK,EAAE,SAAS;EAChBE,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIH,0DAA4B,CAAC;EAC7BC,KAAK,EAAE,WAAW;EAClBE,IAAI,EAAE;AACV,CAAC,CAAC;AACF;AACJ;AACA;AACI,IAAIH,0DAA4B,CAAC;EAC7BC,KAAK,EAAED,0DAA4B,CAACI;AACxC,CAAC,CAAC,CACL;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA","ignoreList":[]}
|
|
@@ -4,12 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _FormDynamoDbFieldPlugin = require("../../plugins/FormDynamoDbFieldPlugin");
|
|
9
|
-
|
|
10
8
|
var _default = () => [new _FormDynamoDbFieldPlugin.FormDynamoDbFieldPlugin({
|
|
11
9
|
field: "publishedOn",
|
|
12
10
|
type: "date"
|
|
13
11
|
})];
|
|
12
|
+
exports.default = _default;
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_FormDynamoDbFieldPlugin","require","_default","FormDynamoDbFieldPlugin","field","type","exports","default"],"sources":["fields.ts"],"sourcesContent":["import { FormDynamoDbFieldPlugin } from \"~/plugins/FormDynamoDbFieldPlugin\";\n\nexport default () => [\n new FormDynamoDbFieldPlugin({\n field: \"publishedOn\",\n type: \"date\"\n })\n];\n"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAA4E,IAAAC,QAAA,GAE7DA,CAAA,KAAM,CACjB,IAAIC,gDAAuB,CAAC;EACxBC,KAAK,EAAE,aAAa;EACpBC,IAAI,EAAE;AACV,CAAC,CAAC,CACL;AAAAC,OAAA,CAAAC,OAAA,GAAAL,QAAA","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Entity, Table } from "dynamodb
|
|
2
|
-
import { Client } from "@elastic/elasticsearch";
|
|
3
|
-
import { PluginsContainer } from "@webiny/plugins";
|
|
4
|
-
import { FormBuilderFormStorageOperations } from "../../types";
|
|
5
|
-
export
|
|
1
|
+
import type { Entity, Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import type { Client } from "@elastic/elasticsearch";
|
|
3
|
+
import type { PluginsContainer } from "@webiny/plugins";
|
|
4
|
+
import type { FormBuilderFormStorageOperations } from "../../types";
|
|
5
|
+
export type DbRecord<T = any> = T & {
|
|
6
6
|
PK: string;
|
|
7
7
|
SK: string;
|
|
8
8
|
TYPE: string;
|
|
9
9
|
};
|
|
10
|
-
export interface
|
|
10
|
+
export interface CreateFormStorageOperationsParams {
|
|
11
11
|
entity: Entity<any>;
|
|
12
12
|
esEntity: Entity<any>;
|
|
13
|
-
table: Table
|
|
13
|
+
table: Table<string, string, string>;
|
|
14
14
|
elasticsearch: Client;
|
|
15
15
|
plugins: PluginsContainer;
|
|
16
16
|
}
|
|
17
|
-
export declare const createFormStorageOperations: (params:
|
|
17
|
+
export declare const createFormStorageOperations: (params: CreateFormStorageOperationsParams) => FormBuilderFormStorageOperations;
|