@vegan-friendly/strapi-plugin-elasticsearch 0.1.0-alpha.3 → 0.1.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.
Files changed (97) hide show
  1. package/dist/admin/index.js +4 -4
  2. package/dist/admin/pluginId.js +1 -1
  3. package/dist/admin/src/components/Initializer/index.js +2 -1
  4. package/dist/admin/src/components/SubNavigation/index.js +10 -8
  5. package/dist/admin/src/pages/ConfigureCollectionList/index.js +40 -28
  6. package/dist/admin/src/pages/Homepage/index.js +20 -21
  7. package/dist/admin/src/pluginId.d.ts +1 -1
  8. package/dist/admin/src/utils/apiUrls.js +1 -0
  9. package/dist/admin/src/utils/axiosInstance.js +1 -2
  10. package/dist/package.json +63 -0
  11. package/dist/server/bootstrap.d.ts +4 -0
  12. package/dist/server/bootstrap.js +3 -3
  13. package/dist/server/config/index.d.ts +5 -0
  14. package/dist/server/config/index.js +2 -1
  15. package/dist/server/content-types/index.d.ts +83 -2
  16. package/dist/server/content-types/index.js +9 -5
  17. package/dist/server/content-types/indexing-logs.d.ts +32 -0
  18. package/dist/server/content-types/indexing-logs.js +22 -24
  19. package/dist/server/content-types/tasks.d.ts +46 -0
  20. package/dist/server/content-types/tasks.js +33 -38
  21. package/dist/server/controllers/configure-indexing.d.ts +11 -0
  22. package/dist/server/controllers/configure-indexing.js +3 -2
  23. package/dist/server/controllers/index.d.ts +33 -5
  24. package/dist/server/controllers/index.js +15 -11
  25. package/dist/server/controllers/log-indexing.d.ts +6 -0
  26. package/dist/server/controllers/log-indexing.js +3 -2
  27. package/dist/server/controllers/perform-indexing.d.ts +8 -0
  28. package/dist/server/controllers/perform-indexing.js +3 -2
  29. package/dist/server/controllers/perform-search.d.ts +4 -1
  30. package/dist/server/controllers/perform-search.js +11 -8
  31. package/dist/server/controllers/setup-info.d.ts +6 -0
  32. package/dist/server/controllers/setup-info.js +2 -1
  33. package/dist/server/destroy.d.ts +4 -0
  34. package/dist/server/destroy.js +2 -1
  35. package/dist/server/index.d.ts +312 -10
  36. package/dist/server/index.js +25 -21
  37. package/dist/server/middlewares/index.d.ts +2 -0
  38. package/dist/server/middlewares/index.js +2 -1
  39. package/dist/server/policies/index.d.ts +2 -0
  40. package/dist/server/policies/index.js +2 -1
  41. package/dist/server/register.d.ts +4 -0
  42. package/dist/server/register.js +2 -1
  43. package/dist/server/routes/configure-indexing.d.ts +12 -0
  44. package/dist/server/routes/configure-indexing.js +2 -1
  45. package/dist/server/routes/index.d.ts +58 -5
  46. package/dist/server/routes/index.js +15 -11
  47. package/dist/server/routes/perform-indexing.d.ts +12 -0
  48. package/dist/server/routes/perform-indexing.js +2 -1
  49. package/dist/server/routes/perform-search.d.ts +12 -0
  50. package/dist/server/routes/perform-search.js +4 -3
  51. package/dist/server/routes/run-log.d.ts +12 -0
  52. package/dist/server/routes/run-log.js +3 -2
  53. package/dist/server/routes/setup-info.d.ts +12 -0
  54. package/dist/server/routes/setup-info.js +3 -2
  55. package/dist/server/services/configure-indexing.d.ts +23 -23
  56. package/dist/server/services/configure-indexing.js +30 -18
  57. package/dist/server/services/es-interface.d.ts +27 -4
  58. package/dist/server/services/es-interface.js +13 -14
  59. package/dist/server/services/helper.d.ts +34 -33
  60. package/dist/server/services/helper.js +31 -23
  61. package/dist/server/services/index.d.ts +124 -7
  62. package/dist/server/services/index.js +19 -15
  63. package/dist/server/services/log-indexing.d.ts +8 -0
  64. package/dist/server/services/log-indexing.js +8 -7
  65. package/dist/server/services/perform-indexing.d.ts +8 -0
  66. package/dist/server/services/perform-indexing.js +29 -16
  67. package/dist/server/services/schedule-indexing.d.ts +19 -0
  68. package/dist/server/services/schedule-indexing.js +13 -12
  69. package/dist/server/services/transform-content.d.ts +7 -2
  70. package/dist/server/services/transform-content.js +4 -3
  71. package/package.json +4 -2
  72. package/dist/admin/components/Initializer/index.d.ts +0 -15
  73. package/dist/admin/components/Initializer/index.js +0 -25
  74. package/dist/admin/components/PluginIcon/index.d.ts +0 -8
  75. package/dist/admin/components/PluginIcon/index.js +0 -14
  76. package/dist/admin/components/SubNavigation/index.d.ts +0 -4
  77. package/dist/admin/components/SubNavigation/index.js +0 -40
  78. package/dist/admin/pages/App/index.d.ts +0 -9
  79. package/dist/admin/pages/App/index.js +0 -29
  80. package/dist/admin/pages/ConfigureCollection/index.d.ts +0 -3
  81. package/dist/admin/pages/ConfigureCollection/index.js +0 -193
  82. package/dist/admin/pages/ConfigureCollectionList/index.d.ts +0 -3
  83. package/dist/admin/pages/ConfigureCollectionList/index.js +0 -228
  84. package/dist/admin/pages/Homepage/index.d.ts +0 -3
  85. package/dist/admin/pages/Homepage/index.js +0 -155
  86. package/dist/admin/pages/ViewIndexingRunLog/index.d.ts +0 -3
  87. package/dist/admin/pages/ViewIndexingRunLog/index.js +0 -125
  88. package/dist/admin/utils/apiUrls.d.ts +0 -10
  89. package/dist/admin/utils/apiUrls.js +0 -20
  90. package/dist/admin/utils/axiosInstance.d.ts +0 -5
  91. package/dist/admin/utils/axiosInstance.js +0 -33
  92. package/dist/admin/utils/getTrad.d.ts +0 -2
  93. package/dist/admin/utils/getTrad.js +0 -8
  94. package/dist/strapi-admin.d.ts +0 -0
  95. package/dist/strapi-admin.js +0 -2
  96. package/dist/strapi-server.d.ts +0 -0
  97. package/dist/strapi-server.js +0 -2
@@ -0,0 +1,46 @@
1
+ declare const _default: {
2
+ kind: string;
3
+ collectionName: string;
4
+ info: {
5
+ singularName: string;
6
+ pluralName: string;
7
+ displayName: string;
8
+ description: string;
9
+ };
10
+ options: {
11
+ draftAndPublish: boolean;
12
+ };
13
+ pluginOptions: {
14
+ 'content-manager': {
15
+ visible: boolean;
16
+ };
17
+ 'content-type-builder': {
18
+ visible: boolean;
19
+ };
20
+ };
21
+ attributes: {
22
+ collection_name: {
23
+ type: string;
24
+ required: boolean;
25
+ };
26
+ item_id: {
27
+ type: string;
28
+ };
29
+ indexing_status: {
30
+ type: string;
31
+ enum: string[];
32
+ required: boolean;
33
+ default: string;
34
+ };
35
+ full_site_indexing: {
36
+ type: string;
37
+ };
38
+ indexing_type: {
39
+ type: string;
40
+ enum: string[];
41
+ default: string;
42
+ required: boolean;
43
+ };
44
+ };
45
+ };
46
+ export default _default;
@@ -1,52 +1,47 @@
1
1
  "use strict";
2
- module.exports = {
3
- "kind": "collectionType",
4
- "collectionName": "task",
5
- "info": {
6
- "singularName": "task",
7
- "pluralName": "tasks",
8
- "displayName": "Task",
9
- "description": "Search indexing tasks"
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ kind: 'collectionType',
5
+ collectionName: 'task',
6
+ info: {
7
+ singularName: 'task',
8
+ pluralName: 'tasks',
9
+ displayName: 'Task',
10
+ description: 'Search indexing tasks',
10
11
  },
11
- "options": {
12
- "draftAndPublish": false
12
+ options: {
13
+ draftAndPublish: false,
13
14
  },
14
- "pluginOptions": {
15
+ pluginOptions: {
15
16
  'content-manager': {
16
17
  visible: false,
17
18
  },
18
19
  'content-type-builder': {
19
20
  visible: false,
20
- }
21
+ },
21
22
  },
22
- "attributes": {
23
- "collection_name": {
24
- "type": "string",
25
- "required": true
23
+ attributes: {
24
+ collection_name: {
25
+ type: 'string',
26
+ required: true,
27
+ },
28
+ item_id: {
29
+ type: 'integer',
26
30
  },
27
- "item_id": {
28
- "type": "integer"
31
+ indexing_status: {
32
+ type: 'enumeration',
33
+ enum: ['to-be-done', 'done'],
34
+ required: true,
35
+ default: 'to-be-done',
29
36
  },
30
- "indexing_status": {
31
- "type": "enumeration",
32
- "enum": [
33
- "to-be-done",
34
- "done"
35
- ],
36
- "required": true,
37
- "default": "to-be-done"
37
+ full_site_indexing: {
38
+ type: 'boolean',
38
39
  },
39
- "full_site_indexing": {
40
- "type": "boolean"
40
+ indexing_type: {
41
+ type: 'enumeration',
42
+ enum: ['add-to-index', 'remove-from-index'],
43
+ default: 'add-to-index',
44
+ required: true,
41
45
  },
42
- "indexing_type": {
43
- "type": "enumeration",
44
- "enum": [
45
- "add-to-index",
46
- "remove-from-index"
47
- ],
48
- "default": "add-to-index",
49
- "required": true
50
- }
51
- }
46
+ },
52
47
  };
@@ -0,0 +1,11 @@
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => {
4
+ getContentConfig: (ctx: any) => Promise<any>;
5
+ setContentConfig: (ctx: any) => Promise<any>;
6
+ getCollectionConfig: (ctx: any) => Promise<any>;
7
+ saveCollectionConfig: (ctx: any) => Promise<any>;
8
+ exportContentConfig: (ctx: any) => Promise<any>;
9
+ importContentConfig: (ctx: any) => Promise<any>;
10
+ };
11
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
- module.exports = ({ strapi }) => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ strapi }) => {
3
4
  const configureIndexingService = strapi.plugins['elasticsearch'].services.configureIndexing;
4
5
  const getContentConfig = async (ctx) => {
5
6
  return configureIndexingService.getContentConfig();
@@ -53,6 +54,6 @@ module.exports = ({ strapi }) => {
53
54
  getCollectionConfig,
54
55
  saveCollectionConfig,
55
56
  exportContentConfig,
56
- importContentConfig
57
+ importContentConfig,
57
58
  };
58
59
  };
@@ -1,5 +1,33 @@
1
- declare const configureIndexing: any;
2
- declare const performSearch: any;
3
- declare const logIndexing: any;
4
- declare const setupInfo: any;
5
- declare const performIndexing: any;
1
+ declare const _default: {
2
+ configureIndexing: ({ strapi }: {
3
+ strapi: any;
4
+ }) => {
5
+ getContentConfig: (ctx: any) => Promise<any>;
6
+ setContentConfig: (ctx: any) => Promise<any>;
7
+ getCollectionConfig: (ctx: any) => Promise<any>;
8
+ saveCollectionConfig: (ctx: any) => Promise<any>;
9
+ exportContentConfig: (ctx: any) => Promise<any>;
10
+ importContentConfig: (ctx: any) => Promise<any>;
11
+ };
12
+ performSearch: {
13
+ search: (ctx: any) => Promise<void>;
14
+ };
15
+ logIndexing: ({ strapi }: {
16
+ strapi: any;
17
+ }) => {
18
+ fetchRecentRunsLog: (ctx: any) => Promise<any>;
19
+ };
20
+ setupInfo: ({ strapi }: {
21
+ strapi: any;
22
+ }) => {
23
+ getElasticsearchInfo: (ctx: any) => Promise<any>;
24
+ };
25
+ performIndexing: ({ strapi }: {
26
+ strapi: any;
27
+ }) => {
28
+ rebuildIndex: (ctx: any) => Promise<any>;
29
+ indexCollection: (ctx: any) => Promise<any>;
30
+ triggerIndexingTask: (ctx: any) => Promise<any>;
31
+ };
32
+ };
33
+ export default _default;
@@ -1,13 +1,17 @@
1
1
  'use strict';
2
- const configureIndexing = require('./configure-indexing');
3
- const performSearch = require('./perform-search');
4
- const logIndexing = require('./log-indexing');
5
- const setupInfo = require('./setup-info');
6
- const performIndexing = require('./perform-indexing');
7
- module.exports = {
8
- configureIndexing,
9
- performSearch,
10
- logIndexing,
11
- setupInfo,
12
- performIndexing
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const configure_indexing_1 = __importDefault(require("./configure-indexing"));
7
+ const perform_search_1 = __importDefault(require("./perform-search"));
8
+ const log_indexing_1 = __importDefault(require("./log-indexing"));
9
+ const setup_info_1 = __importDefault(require("./setup-info"));
10
+ const perform_indexing_1 = __importDefault(require("./perform-indexing"));
11
+ exports.default = {
12
+ configureIndexing: configure_indexing_1.default,
13
+ performSearch: perform_search_1.default,
14
+ logIndexing: log_indexing_1.default,
15
+ setupInfo: setup_info_1.default,
16
+ performIndexing: perform_indexing_1.default,
13
17
  };
@@ -0,0 +1,6 @@
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => {
4
+ fetchRecentRunsLog: (ctx: any) => Promise<any>;
5
+ };
6
+ export default _default;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
- module.exports = ({ strapi }) => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ strapi }) => {
3
4
  const logIndexingService = strapi.plugins['elasticsearch'].services.logIndexing;
4
5
  const fetchRecentRunsLog = async (ctx) => {
5
6
  return await logIndexingService.fetchIndexingLogs();
6
7
  };
7
8
  return {
8
- fetchRecentRunsLog
9
+ fetchRecentRunsLog,
9
10
  };
10
11
  };
@@ -0,0 +1,8 @@
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => {
4
+ rebuildIndex: (ctx: any) => Promise<any>;
5
+ indexCollection: (ctx: any) => Promise<any>;
6
+ triggerIndexingTask: (ctx: any) => Promise<any>;
7
+ };
8
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
- module.exports = ({ strapi }) => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ strapi }) => {
3
4
  const indexer = strapi.plugins['elasticsearch'].services.indexer;
4
5
  const scheduleIndexingService = strapi.plugins['elasticsearch'].services.scheduleIndexing;
5
6
  const rebuildIndex = async (ctx) => {
@@ -17,6 +18,6 @@ module.exports = ({ strapi }) => {
17
18
  return {
18
19
  rebuildIndex,
19
20
  indexCollection,
20
- triggerIndexingTask
21
+ triggerIndexingTask,
21
22
  };
22
23
  };
@@ -1 +1,4 @@
1
- declare const qs: any;
1
+ declare const _default: {
2
+ search: (ctx: any) => Promise<void>;
3
+ };
4
+ export default _default;
@@ -1,15 +1,18 @@
1
1
  'use strict';
2
- const qs = require('qs');
3
- module.exports = {
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const qs_1 = __importDefault(require("qs"));
7
+ exports.default = {
4
8
  search: async (ctx) => {
5
- var _a;
6
9
  try {
7
10
  const esInterface = strapi.plugins['elasticsearch'].services.esInterface;
8
11
  if (ctx.query.query) {
9
- const query = qs.parse(ctx.query.query);
12
+ const query = qs_1.default.parse(ctx.query.query);
10
13
  const resp = await esInterface.searchData(query);
11
- if ((_a = resp === null || resp === void 0 ? void 0 : resp.hits) === null || _a === void 0 ? void 0 : _a.hits) {
12
- const filteredData = resp.hits.hits.filter(dt => dt._source !== null);
14
+ if (resp?.hits?.hits) {
15
+ const filteredData = resp.hits.hits.filter((dt) => dt._source !== null);
13
16
  const filteredMatches = filteredData.map((dt) => dt['_source']);
14
17
  ctx.body = filteredMatches;
15
18
  }
@@ -21,9 +24,9 @@ module.exports = {
21
24
  }
22
25
  catch (err) {
23
26
  ctx.response.status = 500;
24
- ctx.body = "An error was encountered while processing the search request.";
27
+ ctx.body = 'An error was encountered while processing the search request.';
25
28
  console.log('An error was encountered while processing the search request.');
26
29
  console.log(err);
27
30
  }
28
- }
31
+ },
29
32
  };
@@ -0,0 +1,6 @@
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => {
4
+ getElasticsearchInfo: (ctx: any) => Promise<any>;
5
+ };
6
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
- module.exports = ({ strapi }) => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ strapi }) => {
3
4
  const helperService = strapi.plugins['elasticsearch'].services.helper;
4
5
  const getElasticsearchInfo = async (ctx) => {
5
6
  return helperService.getElasticsearchInfo();
@@ -0,0 +1,4 @@
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => void;
4
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
- module.exports = ({ strapi }) => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ strapi }) => {
3
4
  // destroy phase
4
5
  };
@@ -1,10 +1,312 @@
1
- declare const register: any;
2
- declare const bootstrap: any;
3
- declare const destroy: any;
4
- declare const config: any;
5
- declare const contentTypes: any;
6
- declare const controllers: any;
7
- declare const routes: any;
8
- declare const middlewares: any;
9
- declare const policies: any;
10
- declare const services: any;
1
+ declare const _default: {
2
+ register: ({ strapi }: {
3
+ strapi: any;
4
+ }) => void;
5
+ bootstrap: ({ strapi }: {
6
+ strapi: any;
7
+ }) => Promise<void>;
8
+ destroy: ({ strapi }: {
9
+ strapi: any;
10
+ }) => void;
11
+ config: {
12
+ default: {};
13
+ validator(): void;
14
+ };
15
+ controllers: {
16
+ configureIndexing: ({ strapi }: {
17
+ strapi: any;
18
+ }) => {
19
+ getContentConfig: (ctx: any) => Promise<any>;
20
+ setContentConfig: (ctx: any) => Promise<any>;
21
+ getCollectionConfig: (ctx: any) => Promise<any>;
22
+ saveCollectionConfig: (ctx: any) => Promise<any>;
23
+ exportContentConfig: (ctx: any) => Promise<any>;
24
+ importContentConfig: (ctx: any) => Promise<any>;
25
+ };
26
+ performSearch: {
27
+ search: (ctx: any) => Promise<void>;
28
+ };
29
+ logIndexing: ({ strapi }: {
30
+ strapi: any;
31
+ }) => {
32
+ fetchRecentRunsLog: (ctx: any) => Promise<any>;
33
+ };
34
+ setupInfo: ({ strapi }: {
35
+ strapi: any;
36
+ }) => {
37
+ getElasticsearchInfo: (ctx: any) => Promise<any>;
38
+ };
39
+ performIndexing: ({ strapi }: {
40
+ strapi: any;
41
+ }) => {
42
+ rebuildIndex: (ctx: any) => Promise<any>;
43
+ indexCollection: (ctx: any) => Promise<any>;
44
+ triggerIndexingTask: (ctx: any) => Promise<any>;
45
+ };
46
+ };
47
+ routes: {
48
+ config: {
49
+ type: string;
50
+ routes: {
51
+ method: string;
52
+ path: string;
53
+ handler: string;
54
+ config: {
55
+ policies: never[];
56
+ };
57
+ }[];
58
+ };
59
+ search: {
60
+ type: string;
61
+ routes: {
62
+ method: string;
63
+ path: string;
64
+ handler: string;
65
+ config: {
66
+ policies: never[];
67
+ };
68
+ }[];
69
+ };
70
+ runLog: {
71
+ type: string;
72
+ routes: {
73
+ method: string;
74
+ path: string;
75
+ handler: string;
76
+ config: {
77
+ policies: never[];
78
+ };
79
+ }[];
80
+ };
81
+ setupInfo: {
82
+ type: string;
83
+ routes: {
84
+ method: string;
85
+ path: string;
86
+ handler: string;
87
+ config: {
88
+ policies: never[];
89
+ };
90
+ }[];
91
+ };
92
+ performIndexing: {
93
+ type: string;
94
+ routes: {
95
+ method: string;
96
+ path: string;
97
+ handler: string;
98
+ config: {
99
+ policies: never[];
100
+ };
101
+ }[];
102
+ };
103
+ };
104
+ services: {
105
+ configureIndexing: ({ strapi }: {
106
+ strapi: any;
107
+ }) => {
108
+ initializeStrapiElasticsearch(): Promise<void>;
109
+ markInitialized(): Promise<void>;
110
+ isInitialized(): any;
111
+ cacheConfig(): Promise<void>;
112
+ getCollectionConfig({ collectionName }: {
113
+ collectionName: any;
114
+ }): Promise<{} | null>;
115
+ getCollectionsConfiguredForIndexing(): Promise<string[]>;
116
+ isCollectionConfiguredToBeIndexed({ collectionName }: {
117
+ collectionName: any;
118
+ }): Promise<boolean>;
119
+ getContentConfig(): Promise<any>;
120
+ importContentConfig({ config }: {
121
+ config: any;
122
+ }): Promise<any>;
123
+ setContentConfig({ collection, config }: {
124
+ collection: any;
125
+ config: any;
126
+ }): Promise<any>;
127
+ };
128
+ scheduleIndexing: ({ strapi }: {
129
+ strapi: any;
130
+ }) => {
131
+ addFullSiteIndexingTask(): Promise<any>;
132
+ addCollectionToIndex({ collectionUid }: {
133
+ collectionUid: any;
134
+ }): Promise<any>;
135
+ addItemToIndex({ collectionUid, recordId }: {
136
+ collectionUid: any;
137
+ recordId: any;
138
+ }): Promise<any>;
139
+ removeItemFromIndex({ collectionUid, recordId }: {
140
+ collectionUid: any;
141
+ recordId: any;
142
+ }): Promise<void>;
143
+ getItemsPendingToBeIndexed(): Promise<any>;
144
+ markIndexingTaskComplete(recId: any): Promise<void>;
145
+ };
146
+ esInterface: ({ strapi }: {
147
+ strapi: any;
148
+ }) => {
149
+ initializeSearchEngine({ host, uname, password, cert }: {
150
+ host: any;
151
+ uname: any;
152
+ password: any;
153
+ cert: any;
154
+ }): Promise<void>;
155
+ createIndex(indexName: any): Promise<void>;
156
+ deleteIndex(indexName: any): Promise<void>;
157
+ attachAliasToIndex(indexName: any): Promise<void>;
158
+ checkESConnection(): Promise<boolean>;
159
+ indexDataToSpecificIndex({ itemId, itemData }: {
160
+ itemId: any;
161
+ itemData: any;
162
+ }, iName: any): Promise<void>;
163
+ indexData({ itemId, itemData }: {
164
+ itemId: any;
165
+ itemData: any;
166
+ }): Promise<void>;
167
+ removeItemFromIndex({ itemId }: {
168
+ itemId: any;
169
+ }): Promise<void>;
170
+ searchData(searchQuery: any): Promise<any>;
171
+ };
172
+ indexer: ({ strapi }: {
173
+ strapi: any;
174
+ }) => {
175
+ rebuildIndex(): Promise<boolean | undefined>;
176
+ indexCollection(collectionName: any, indexName?: null): Promise<boolean>;
177
+ indexPendingData(): Promise<boolean>;
178
+ };
179
+ logIndexing: ({ strapi }: {
180
+ strapi: any;
181
+ }) => {
182
+ recordIndexingPass(message: any): Promise<void>;
183
+ recordIndexingFail(message: any): Promise<void>;
184
+ fetchIndexingLogs(count?: number): Promise<any>;
185
+ };
186
+ helper: ({ strapi }: {
187
+ strapi: any;
188
+ }) => {
189
+ getElasticsearchInfo(): Promise<{
190
+ indexingCronSchedule: any;
191
+ elasticHost: any;
192
+ elasticUserName: any;
193
+ elasticCertificate: any;
194
+ elasticIndexAlias: any;
195
+ connected: any;
196
+ initialized: any;
197
+ }>;
198
+ isCollectionDraftPublish({ collectionName }: {
199
+ collectionName: any;
200
+ }): boolean;
201
+ getPopulateAttribute({ collectionName }: {
202
+ collectionName: any;
203
+ }): true | {
204
+ populate: never;
205
+ } | undefined;
206
+ getIndexItemId({ collectionName, itemId }: {
207
+ collectionName: any;
208
+ itemId: any;
209
+ }): string;
210
+ getCurrentIndexName(): Promise<string>;
211
+ getIncrementedIndexName(): Promise<string>;
212
+ storeCurrentIndexName(indexName: any): Promise<void>;
213
+ modifySubfieldsConfigForExtractor(collectionConfig: any): any;
214
+ extractDataToIndex({ collectionName, data, collectionConfig }: {
215
+ collectionName: any;
216
+ data: any;
217
+ collectionConfig: any;
218
+ }): {};
219
+ };
220
+ transformContent: {
221
+ transform({ content, from }: {
222
+ content: any;
223
+ from: any;
224
+ }): any;
225
+ };
226
+ };
227
+ contentTypes: {
228
+ task: {
229
+ schema: {
230
+ kind: string;
231
+ collectionName: string;
232
+ info: {
233
+ singularName: string;
234
+ pluralName: string;
235
+ displayName: string;
236
+ description: string;
237
+ };
238
+ options: {
239
+ draftAndPublish: boolean;
240
+ };
241
+ pluginOptions: {
242
+ 'content-manager': {
243
+ visible: boolean;
244
+ };
245
+ 'content-type-builder': {
246
+ visible: boolean;
247
+ };
248
+ };
249
+ attributes: {
250
+ collection_name: {
251
+ type: string;
252
+ required: boolean;
253
+ };
254
+ item_id: {
255
+ type: string;
256
+ };
257
+ indexing_status: {
258
+ type: string;
259
+ enum: string[];
260
+ required: boolean;
261
+ default: string;
262
+ };
263
+ full_site_indexing: {
264
+ type: string;
265
+ };
266
+ indexing_type: {
267
+ type: string;
268
+ enum: string[];
269
+ default: string;
270
+ required: boolean;
271
+ };
272
+ };
273
+ };
274
+ };
275
+ 'indexing-log': {
276
+ schema: {
277
+ kind: string;
278
+ collectionName: string;
279
+ info: {
280
+ singularName: string;
281
+ pluralName: string;
282
+ displayName: string;
283
+ description: string;
284
+ };
285
+ options: {
286
+ draftAndPublish: boolean;
287
+ };
288
+ pluginOptions: {
289
+ 'content-manager': {
290
+ visible: boolean;
291
+ };
292
+ 'content-type-builder': {
293
+ visible: boolean;
294
+ };
295
+ };
296
+ attributes: {
297
+ status: {
298
+ type: string;
299
+ enum: string[];
300
+ required: boolean;
301
+ };
302
+ details: {
303
+ type: string;
304
+ };
305
+ };
306
+ };
307
+ };
308
+ };
309
+ policies: {};
310
+ middlewares: {};
311
+ };
312
+ export default _default;