diff --git a/src-electron/db/query-impexp.js b/src-electron/db/query-impexp.js index 71220e3f6a0864267cc868bde2667e85c76201de..b6c0f1fad75558927e11726a999f5e0564d73185 100644 --- a/src-electron/db/query-impexp.js +++ b/src-electron/db/query-impexp.js @@ -540,7 +540,7 @@ VALUES * @param {*} sessionId * @returns promise that resolves into rows in the database table. */ -async function exportendPointTypeIds(db, sessionId) { +async function exportEndPointTypeIds(db, sessionId) { let mapFunction = (x) => { return { endpointTypeId: x.ENDPOINT_TYPE_ID, @@ -611,5 +611,5 @@ exports.importCommandForEndpointType = importCommandForEndpointType exports.exportEndpoints = exportEndpoints exports.importEndpoint = importEndpoint -exports.exportendPointTypeIds = exportendPointTypeIds +exports.exportEndPointTypeIds = exportEndPointTypeIds exports.exportCliCommandCountFromEndpointTypeCluster = exportCliCommandCountFromEndpointTypeCluster diff --git a/src-electron/generator/helper-session.js b/src-electron/generator/helper-session.js index 1278d9a5ee70928313775fcbf0c9be39ddef3def..66653300a121b31c00151c1b381904842ceddd12 100644 --- a/src-electron/generator/helper-session.js +++ b/src-electron/generator/helper-session.js @@ -143,7 +143,7 @@ function user_all_attributes(options) { */ function all_user_cluster_commands(options) { let promise = queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportClustersAndEndpointDetailsFromEndpointTypes( this.global.db, @@ -182,7 +182,7 @@ function all_user_cluster_command_util( isIrrespectiveOfManufacturingSpecification = false ) { let promise = queryImpexp - .exportendPointTypeIds( + .exportEndPointTypeIds( currentContext.global.db, currentContext.global.sessionId ) @@ -245,7 +245,7 @@ function all_user_cluster_attribute_util( isIrrespectiveOfManufacturingSpecification = false ) { let promise = queryImpexp - .exportendPointTypeIds( + .exportEndPointTypeIds( currentContext.global.db, currentContext.global.sessionId ) @@ -358,7 +358,7 @@ function all_user_cluster_non_manufacturer_specific_attributes( */ function all_commands_for_user_enabled_clusters(options) { let promise = queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportClustersAndEndpointDetailsFromEndpointTypes( this.global.db, @@ -386,7 +386,7 @@ function all_commands_for_user_enabled_clusters(options) { */ function all_cli_commands_for_user_enabled_clusters(options) { let promise = queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportClustersAndEndpointDetailsFromEndpointTypes( this.global.db, @@ -413,7 +413,7 @@ function all_cli_commands_for_user_enabled_clusters(options) { */ function all_user_clusters(options) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportAllClustersDetailsFromEndpointTypes( this.global.db, @@ -431,7 +431,7 @@ function all_user_clusters(options) { */ function all_user_clusters_irrespective_of_side(options) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportAllClustersDetailsIrrespectiveOfSideFromEndpointTypes( this.global.db, @@ -450,7 +450,7 @@ function all_user_clusters_irrespective_of_side(options) { */ function all_user_clusters_names(options) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportAllClustersNamesFromEndpointTypes( this.global.db, @@ -466,7 +466,7 @@ function all_user_clusters_names(options) { */ function user_cluster_command_count_with_cli() { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryImpexp.exportCliCommandCountFromEndpointTypeCluster( this.global.db, @@ -506,7 +506,7 @@ function user_cluster_commands_with_cli(options) { */ function user_cluster_commands_all_endpoints(options) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportCommandDetailsFromAllEndpointTypeCluster( this.global.db, @@ -529,7 +529,7 @@ function user_cluster_commands_all_endpoints(options) { */ function user_cluster_has_enabled_command(name, side) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryZcl.exportClustersAndEndpointDetailsFromEndpointTypes( this.global.db, @@ -644,7 +644,7 @@ async function user_default_response_policy(options) { */ function endpoint_type_identifier(endpointTypeId) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryImpexp.exportEndpoints( this.global.db, @@ -671,7 +671,7 @@ function endpoint_type_identifier(endpointTypeId) { */ function endpoint_type_index(endpointTypeId) { return queryImpexp - .exportendPointTypeIds(this.global.db, this.global.sessionId) + .exportEndPointTypeIds(this.global.db, this.global.sessionId) .then((endpointTypes) => queryImpexp.exportEndpoints( this.global.db, diff --git a/test/query.test.js b/test/query.test.js index e6ec804bf01dc660efc860a378a43d611ccde388..2f0e36bd105be1a2787cd5df682aa74ed3c505c7 100644 --- a/test/query.test.js +++ b/test/query.test.js @@ -462,7 +462,7 @@ describe('Endpoint Type Config Queries', () => { }) test('Get all cluster names', () => { let expectedNames = ['Basic', 'Identify', 'Level Control', 'On/off'] - return queryImpexp.exportendPointTypeIds(db, sid).then((endpointTypes) => + return queryImpexp.exportEndPointTypeIds(db, sid).then((endpointTypes) => queryZcl .exportAllClustersNamesFromEndpointTypes(db, endpointTypes) .then((names) => {