@opensearch-project/opensearch 3.0.0-beta.4 → 3.0.0-beta.6
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/CHANGELOG.md +5 -1
- package/api/cat/_api.js +24 -26
- package/api/cluster/_api.js +21 -23
- package/api/danglingIndices/_api.js +3 -5
- package/api/http/_api.js +9 -11
- package/api/indices/_api.js +48 -50
- package/api/ingest/_api.js +5 -7
- package/api/knn/_api.js +6 -8
- package/api/ml/_api.js +7 -9
- package/api/nodes/_api.js +5 -7
- package/api/notifications/_api.js +9 -11
- package/api/ppl/_api.js +4 -6
- package/api/remoteStore/_api.js +1 -3
- package/api/rollups/_api.js +6 -8
- package/api/searchPipeline/_api.js +3 -5
- package/api/security/_api.js +74 -76
- package/api/snapshot/_api.js +11 -13
- package/api/sql/_api.js +6 -8
- package/api/tasks/_api.js +3 -5
- package/api/transforms/_api.js +8 -10
- package/api/utils.js +6 -7
- package/lib/OpenSearchAPI.d.ts +1403 -0
- package/lib/OpenSearchAPI.js +117 -0
- package/package.json +5 -1
- package/.dockerignore +0 -5
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -34
- package/.prettierrc.json +0 -5
- package/.whitesource +0 -15
- package/ADMINS.md +0 -16
- package/COMPATIBILITY.md +0 -13
- package/DEVELOPER_GUIDE.md +0 -127
- package/MAINTAINERS.md +0 -23
- package/Makefile +0 -17
- package/RELEASING.md +0 -41
- package/SECURITY.md +0 -3
- package/USER_GUIDE.md +0 -316
- package/codecov.yml +0 -14
- package/guides/advanced_index_actions.md +0 -92
- package/guides/bulk.md +0 -126
- package/guides/document_lifecycle.md +0 -162
- package/guides/index_lifecycle.md +0 -142
- package/guides/index_template.md +0 -228
- package/guides/json.md +0 -53
- package/guides/msearch.md +0 -56
- package/guides/search.md +0 -203
- package/jenkins/release.JenkinsFile +0 -11
- package/samples/README.md +0 -17
- package/samples/bulk.js +0 -91
- package/samples/json.js +0 -75
- package/samples/msearch.js +0 -131
- package/samples/rollups.js +0 -139
- package/samples/search.js +0 -155
- package/samples/transforms.ts +0 -146
package/api/security/_api.js
CHANGED
|
@@ -15,86 +15,84 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { apiFunc } = require('../utils');
|
|
19
|
-
|
|
20
18
|
/** @namespace API-Security */
|
|
21
19
|
|
|
22
20
|
function SecurityApi(bindObj) {
|
|
23
21
|
const cache = {};
|
|
24
|
-
this.authinfo =
|
|
25
|
-
this.authtoken =
|
|
26
|
-
this.changePassword =
|
|
27
|
-
this.configUpgradeCheck =
|
|
28
|
-
this.configUpgradePerform =
|
|
29
|
-
this.createActionGroup =
|
|
30
|
-
this.createAllowlist =
|
|
31
|
-
this.createRole =
|
|
32
|
-
this.createRoleMapping =
|
|
33
|
-
this.createTenant =
|
|
34
|
-
this.createUpdateTenancyConfig =
|
|
35
|
-
this.createUser =
|
|
36
|
-
this.createUserLegacy =
|
|
37
|
-
this.deleteActionGroup =
|
|
38
|
-
this.deleteDistinguishedName =
|
|
39
|
-
this.deleteRole =
|
|
40
|
-
this.deleteRoleMapping =
|
|
41
|
-
this.deleteTenant =
|
|
42
|
-
this.deleteUser =
|
|
43
|
-
this.deleteUserLegacy =
|
|
44
|
-
this.flushCache =
|
|
45
|
-
this.generateOboToken =
|
|
46
|
-
this.generateUserToken =
|
|
47
|
-
this.generateUserTokenLegacy =
|
|
48
|
-
this.getAccountDetails =
|
|
49
|
-
this.getActionGroup =
|
|
50
|
-
this.getActionGroups =
|
|
51
|
-
this.getAllowlist =
|
|
52
|
-
this.getAuditConfiguration =
|
|
53
|
-
this.getCertificates =
|
|
54
|
-
this.getConfiguration =
|
|
55
|
-
this.getDashboardsInfo =
|
|
56
|
-
this.getDistinguishedName =
|
|
57
|
-
this.getDistinguishedNames =
|
|
58
|
-
this.getPermissionsInfo =
|
|
59
|
-
this.getRole =
|
|
60
|
-
this.getRoleMapping =
|
|
61
|
-
this.getRoleMappings =
|
|
62
|
-
this.getRoles =
|
|
63
|
-
this.getSslinfo =
|
|
64
|
-
this.getTenancyConfig =
|
|
65
|
-
this.getTenant =
|
|
66
|
-
this.getTenants =
|
|
67
|
-
this.getUser =
|
|
68
|
-
this.getUserLegacy =
|
|
69
|
-
this.getUsers =
|
|
70
|
-
this.getUsersLegacy =
|
|
71
|
-
this.health =
|
|
72
|
-
this.migrate =
|
|
73
|
-
this.patchActionGroup =
|
|
74
|
-
this.patchActionGroups =
|
|
75
|
-
this.patchAllowlist =
|
|
76
|
-
this.patchAuditConfiguration =
|
|
77
|
-
this.patchConfiguration =
|
|
78
|
-
this.patchDistinguishedName =
|
|
79
|
-
this.patchDistinguishedNames =
|
|
80
|
-
this.patchRole =
|
|
81
|
-
this.patchRoleMapping =
|
|
82
|
-
this.patchRoleMappings =
|
|
83
|
-
this.patchRoles =
|
|
84
|
-
this.patchTenant =
|
|
85
|
-
this.patchTenants =
|
|
86
|
-
this.patchUser =
|
|
87
|
-
this.patchUsers =
|
|
88
|
-
this.postDashboardsInfo =
|
|
89
|
-
this.reloadHttpCertificates =
|
|
90
|
-
this.reloadTransportCertificates =
|
|
91
|
-
this.tenantInfo =
|
|
92
|
-
this.updateAuditConfiguration =
|
|
93
|
-
this.updateConfiguration =
|
|
94
|
-
this.updateDistinguishedName =
|
|
95
|
-
this.validate =
|
|
96
|
-
this.whoAmI =
|
|
97
|
-
this.whoAmIProtected =
|
|
22
|
+
this.authinfo = require('./authinfo').bind(bindObj);
|
|
23
|
+
this.authtoken = require('./authtoken').bind(bindObj);
|
|
24
|
+
this.changePassword = require('./changePassword').bind(bindObj);
|
|
25
|
+
this.configUpgradeCheck = require('./configUpgradeCheck').bind(bindObj);
|
|
26
|
+
this.configUpgradePerform = require('./configUpgradePerform').bind(bindObj);
|
|
27
|
+
this.createActionGroup = require('./createActionGroup').bind(bindObj);
|
|
28
|
+
this.createAllowlist = require('./createAllowlist').bind(bindObj);
|
|
29
|
+
this.createRole = require('./createRole').bind(bindObj);
|
|
30
|
+
this.createRoleMapping = require('./createRoleMapping').bind(bindObj);
|
|
31
|
+
this.createTenant = require('./createTenant').bind(bindObj);
|
|
32
|
+
this.createUpdateTenancyConfig = require('./createUpdateTenancyConfig').bind(bindObj);
|
|
33
|
+
this.createUser = require('./createUser').bind(bindObj);
|
|
34
|
+
this.createUserLegacy = require('./createUserLegacy').bind(bindObj);
|
|
35
|
+
this.deleteActionGroup = require('./deleteActionGroup').bind(bindObj);
|
|
36
|
+
this.deleteDistinguishedName = require('./deleteDistinguishedName').bind(bindObj);
|
|
37
|
+
this.deleteRole = require('./deleteRole').bind(bindObj);
|
|
38
|
+
this.deleteRoleMapping = require('./deleteRoleMapping').bind(bindObj);
|
|
39
|
+
this.deleteTenant = require('./deleteTenant').bind(bindObj);
|
|
40
|
+
this.deleteUser = require('./deleteUser').bind(bindObj);
|
|
41
|
+
this.deleteUserLegacy = require('./deleteUserLegacy').bind(bindObj);
|
|
42
|
+
this.flushCache = require('./flushCache').bind(bindObj);
|
|
43
|
+
this.generateOboToken = require('./generateOboToken').bind(bindObj);
|
|
44
|
+
this.generateUserToken = require('./generateUserToken').bind(bindObj);
|
|
45
|
+
this.generateUserTokenLegacy = require('./generateUserTokenLegacy').bind(bindObj);
|
|
46
|
+
this.getAccountDetails = require('./getAccountDetails').bind(bindObj);
|
|
47
|
+
this.getActionGroup = require('./getActionGroup').bind(bindObj);
|
|
48
|
+
this.getActionGroups = require('./getActionGroups').bind(bindObj);
|
|
49
|
+
this.getAllowlist = require('./getAllowlist').bind(bindObj);
|
|
50
|
+
this.getAuditConfiguration = require('./getAuditConfiguration').bind(bindObj);
|
|
51
|
+
this.getCertificates = require('./getCertificates').bind(bindObj);
|
|
52
|
+
this.getConfiguration = require('./getConfiguration').bind(bindObj);
|
|
53
|
+
this.getDashboardsInfo = require('./getDashboardsInfo').bind(bindObj);
|
|
54
|
+
this.getDistinguishedName = require('./getDistinguishedName').bind(bindObj);
|
|
55
|
+
this.getDistinguishedNames = require('./getDistinguishedNames').bind(bindObj);
|
|
56
|
+
this.getPermissionsInfo = require('./getPermissionsInfo').bind(bindObj);
|
|
57
|
+
this.getRole = require('./getRole').bind(bindObj);
|
|
58
|
+
this.getRoleMapping = require('./getRoleMapping').bind(bindObj);
|
|
59
|
+
this.getRoleMappings = require('./getRoleMappings').bind(bindObj);
|
|
60
|
+
this.getRoles = require('./getRoles').bind(bindObj);
|
|
61
|
+
this.getSslinfo = require('./getSslinfo').bind(bindObj);
|
|
62
|
+
this.getTenancyConfig = require('./getTenancyConfig').bind(bindObj);
|
|
63
|
+
this.getTenant = require('./getTenant').bind(bindObj);
|
|
64
|
+
this.getTenants = require('./getTenants').bind(bindObj);
|
|
65
|
+
this.getUser = require('./getUser').bind(bindObj);
|
|
66
|
+
this.getUserLegacy = require('./getUserLegacy').bind(bindObj);
|
|
67
|
+
this.getUsers = require('./getUsers').bind(bindObj);
|
|
68
|
+
this.getUsersLegacy = require('./getUsersLegacy').bind(bindObj);
|
|
69
|
+
this.health = require('./health').bind(bindObj);
|
|
70
|
+
this.migrate = require('./migrate').bind(bindObj);
|
|
71
|
+
this.patchActionGroup = require('./patchActionGroup').bind(bindObj);
|
|
72
|
+
this.patchActionGroups = require('./patchActionGroups').bind(bindObj);
|
|
73
|
+
this.patchAllowlist = require('./patchAllowlist').bind(bindObj);
|
|
74
|
+
this.patchAuditConfiguration = require('./patchAuditConfiguration').bind(bindObj);
|
|
75
|
+
this.patchConfiguration = require('./patchConfiguration').bind(bindObj);
|
|
76
|
+
this.patchDistinguishedName = require('./patchDistinguishedName').bind(bindObj);
|
|
77
|
+
this.patchDistinguishedNames = require('./patchDistinguishedNames').bind(bindObj);
|
|
78
|
+
this.patchRole = require('./patchRole').bind(bindObj);
|
|
79
|
+
this.patchRoleMapping = require('./patchRoleMapping').bind(bindObj);
|
|
80
|
+
this.patchRoleMappings = require('./patchRoleMappings').bind(bindObj);
|
|
81
|
+
this.patchRoles = require('./patchRoles').bind(bindObj);
|
|
82
|
+
this.patchTenant = require('./patchTenant').bind(bindObj);
|
|
83
|
+
this.patchTenants = require('./patchTenants').bind(bindObj);
|
|
84
|
+
this.patchUser = require('./patchUser').bind(bindObj);
|
|
85
|
+
this.patchUsers = require('./patchUsers').bind(bindObj);
|
|
86
|
+
this.postDashboardsInfo = require('./postDashboardsInfo').bind(bindObj);
|
|
87
|
+
this.reloadHttpCertificates = require('./reloadHttpCertificates').bind(bindObj);
|
|
88
|
+
this.reloadTransportCertificates = require('./reloadTransportCertificates').bind(bindObj);
|
|
89
|
+
this.tenantInfo = require('./tenantInfo').bind(bindObj);
|
|
90
|
+
this.updateAuditConfiguration = require('./updateAuditConfiguration').bind(bindObj);
|
|
91
|
+
this.updateConfiguration = require('./updateConfiguration').bind(bindObj);
|
|
92
|
+
this.updateDistinguishedName = require('./updateDistinguishedName').bind(bindObj);
|
|
93
|
+
this.validate = require('./validate').bind(bindObj);
|
|
94
|
+
this.whoAmI = require('./whoAmI').bind(bindObj);
|
|
95
|
+
this.whoAmIProtected = require('./whoAmIProtected').bind(bindObj);
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
module.exports = SecurityApi;
|
package/api/snapshot/_api.js
CHANGED
|
@@ -15,23 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { apiFunc } = require('../utils');
|
|
19
|
-
|
|
20
18
|
/** @namespace API-Snapshot */
|
|
21
19
|
|
|
22
20
|
function SnapshotApi(bindObj) {
|
|
23
21
|
const cache = {};
|
|
24
|
-
this.cleanupRepository =
|
|
25
|
-
this.clone =
|
|
26
|
-
this.create =
|
|
27
|
-
this.createRepository =
|
|
28
|
-
this.delete =
|
|
29
|
-
this.deleteRepository =
|
|
30
|
-
this.get =
|
|
31
|
-
this.getRepository =
|
|
32
|
-
this.restore =
|
|
33
|
-
this.status =
|
|
34
|
-
this.verifyRepository =
|
|
22
|
+
this.cleanupRepository = require('./cleanupRepository').bind(bindObj);
|
|
23
|
+
this.clone = require('./clone').bind(bindObj);
|
|
24
|
+
this.create = require('./create').bind(bindObj);
|
|
25
|
+
this.createRepository = require('./createRepository').bind(bindObj);
|
|
26
|
+
this.delete = require('./delete').bind(bindObj);
|
|
27
|
+
this.deleteRepository = require('./deleteRepository').bind(bindObj);
|
|
28
|
+
this.get = require('./get').bind(bindObj);
|
|
29
|
+
this.getRepository = require('./getRepository').bind(bindObj);
|
|
30
|
+
this.restore = require('./restore').bind(bindObj);
|
|
31
|
+
this.status = require('./status').bind(bindObj);
|
|
32
|
+
this.verifyRepository = require('./verifyRepository').bind(bindObj);
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
module.exports = SnapshotApi;
|
package/api/sql/_api.js
CHANGED
|
@@ -15,18 +15,16 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { apiFunc } = require('../utils');
|
|
19
|
-
|
|
20
18
|
/** @namespace API-Sql */
|
|
21
19
|
|
|
22
20
|
function SqlApi(bindObj) {
|
|
23
21
|
const cache = {};
|
|
24
|
-
this.close =
|
|
25
|
-
this.explain =
|
|
26
|
-
this.getStats =
|
|
27
|
-
this.postStats =
|
|
28
|
-
this.query =
|
|
29
|
-
this.settings =
|
|
22
|
+
this.close = require('./close').bind(bindObj);
|
|
23
|
+
this.explain = require('./explain').bind(bindObj);
|
|
24
|
+
this.getStats = require('./getStats').bind(bindObj);
|
|
25
|
+
this.postStats = require('./postStats').bind(bindObj);
|
|
26
|
+
this.query = require('./query').bind(bindObj);
|
|
27
|
+
this.settings = require('./settings').bind(bindObj);
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
module.exports = SqlApi;
|
package/api/tasks/_api.js
CHANGED
|
@@ -15,15 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { apiFunc } = require('../utils');
|
|
19
|
-
|
|
20
18
|
/** @namespace API-Tasks */
|
|
21
19
|
|
|
22
20
|
function TasksApi(bindObj) {
|
|
23
21
|
const cache = {};
|
|
24
|
-
this.cancel =
|
|
25
|
-
this.get =
|
|
26
|
-
this.list =
|
|
22
|
+
this.cancel = require('./cancel').bind(bindObj);
|
|
23
|
+
this.get = require('./get').bind(bindObj);
|
|
24
|
+
this.list = require('./list').bind(bindObj);
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
module.exports = TasksApi;
|
package/api/transforms/_api.js
CHANGED
|
@@ -15,20 +15,18 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { apiFunc } = require('../utils');
|
|
19
|
-
|
|
20
18
|
/** @namespace API-Transforms */
|
|
21
19
|
|
|
22
20
|
function TransformsApi(bindObj) {
|
|
23
21
|
const cache = {};
|
|
24
|
-
this.delete =
|
|
25
|
-
this.explain =
|
|
26
|
-
this.get =
|
|
27
|
-
this.preview =
|
|
28
|
-
this.put =
|
|
29
|
-
this.search =
|
|
30
|
-
this.start =
|
|
31
|
-
this.stop =
|
|
22
|
+
this.delete = require('./delete').bind(bindObj);
|
|
23
|
+
this.explain = require('./explain').bind(bindObj);
|
|
24
|
+
this.get = require('./get').bind(bindObj);
|
|
25
|
+
this.preview = require('./preview').bind(bindObj);
|
|
26
|
+
this.put = require('./put').bind(bindObj);
|
|
27
|
+
this.search = require('./search').bind(bindObj);
|
|
28
|
+
this.start = require('./start').bind(bindObj);
|
|
29
|
+
this.stop = require('./stop').bind(bindObj);
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
module.exports = TransformsApi;
|
package/api/utils.js
CHANGED
|
@@ -60,12 +60,12 @@ function normalizeArguments(params, options, callback) {
|
|
|
60
60
|
return [params, options, callback];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
function apiFunc (bindObj, cache, path) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
63
|
+
// function apiFunc (bindObj, cache, path) { // Used for lazy loading but not compatible with Webpack
|
|
64
|
+
// return function (...args) {
|
|
65
|
+
// if (!cache[path]) cache[path] = require(path).bind(bindObj);
|
|
66
|
+
// return cache[path](...args);
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
69
|
|
|
70
70
|
function logMemoryUsage(context = '') {
|
|
71
71
|
const memoryUsage = process.memoryUsage();
|
|
@@ -82,6 +82,5 @@ module.exports = {
|
|
|
82
82
|
normalizeArguments,
|
|
83
83
|
noop,
|
|
84
84
|
kConfigErr,
|
|
85
|
-
apiFunc,
|
|
86
85
|
logMemoryUsage,
|
|
87
86
|
};
|