Skip to content

Commit

Permalink
Merge tag 'v0.4.3' into develop
Browse files Browse the repository at this point in the history
chore: bump to v0.4.3
  • Loading branch information
BenMaruchu committed Aug 22, 2019
2 parents bca0db1 + 94a8e5e commit 3150d3c
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 7 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
#### 0.4.3 (2019-08-22)

##### Chores

* **build:** bundle library for v0.4.3 release ([8c4274be](https://github.com/anzalab/majifix-analytics/commit/8c4274be4459d43eee08ec3055fc5358a9c606fe))
* **package:** update package version to v0.4.3 ([c9cd82a7](https://github.com/anzalab/majifix-analytics/commit/c9cd82a745e8c144acebe8f54dc858794f2e8b32))

##### Documentation Changes

* **jsdoc:** improve facets documentation ([e9c0eb21](https://github.com/anzalab/majifix-analytics/commit/e9c0eb213d2ac1d21ddc669c4a7fa309279c7c5c))

##### New Features

* add changelog base aggregation ([5770fb69](https://github.com/anzalab/majifix-analytics/commit/5770fb694514cd0c5767ac1a93041875e2c5b316))
* add statuses per service breakdown in operator report ([ff1e6ebe](https://github.com/anzalab/majifix-analytics/commit/ff1e6ebe68ddb4d3d9e30a8e1e0d58acdcdcc224))

##### Bug Fixes

* use $assignee variable instead of $operator in assignee facet ([2705825a](https://github.com/anzalab/majifix-analytics/commit/2705825a32ba6842df9704ef4c8704d2518fcd97))

##### Refactors

* restore service facet in operator report ([bca0db1f](https://github.com/anzalab/majifix-analytics/commit/bca0db1fd4ff5c73d28fcd6b2fbd60cf8c5b81a0))

#### 0.4.2 (2019-08-19)

##### Chores
Expand Down
79 changes: 76 additions & 3 deletions es/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ const getBaseAggregation = criteria => {
});
};

/**
* @namespace OVERALL_FACET
* @description Facet for service requests overall general breakdown
*
* @version 0.1.0
* @since 0.1.0
*/
const OVERALL_FACET = {
overall: [
{
Expand All @@ -68,6 +75,13 @@ const OVERALL_FACET = {
],
};

/**
* @namespace PRIORITY_FACET
* @description Facet for service requests breakdown based on their priorities
*
* @version 0.1.0
* @since 0.1.0
*/
const JURISDICTION_FACET = {
jurisdictions: [
{
Expand Down Expand Up @@ -110,6 +124,13 @@ const JURISDICTION_FACET = {
],
};

/**
* @namespace STATUS_FACET
* @description Facet for service requests breakdown based on their statuses
*
* @version 0.1.0
* @since 0.1.0
*/
const STATUS_FACET = {
statuses: [
{
Expand Down Expand Up @@ -138,6 +159,13 @@ const STATUS_FACET = {
],
};

/**
* @namespace PRIORITY_FACET
* @description Facet for service requests breakdown based on their priorities
*
* @version 0.1.0
* @since 0.1.0
*/
const PRIORITY_FACET = {
priorities: [
{
Expand Down Expand Up @@ -174,6 +202,13 @@ const PRIORITY_FACET = {
],
};

/**
* @namespace SERVICE_FACET
* @description Facet for service requests breakdown based on their services(nature)
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_FACET = {
services: [
{
Expand Down Expand Up @@ -210,6 +245,13 @@ const SERVICE_FACET = {
],
};

/**
* @namespace SERVICE_GROUP_FACET
* @description Facet for service requests breakdown based on their service groups
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_GROUP_FACET = {
groups: [
{
Expand Down Expand Up @@ -246,6 +288,13 @@ const SERVICE_GROUP_FACET = {
],
};

/**
* @namespace SERVICE_TYPE_FACET
* @description Facet for service requests breakdown based on their service types
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_TYPE_FACET = {
types: [
{
Expand Down Expand Up @@ -285,6 +334,14 @@ const SERVICE_TYPE_FACET = {
],
};

/**
* @namespace WORKSPACE_FACET
* @description Facet for service requests breakdown based on workspaces they
* belong
*
* @version 0.1.0
* @since 0.1.0
*/
const WORKSPACE_FACET = {
workspaces: [
{
Expand All @@ -308,6 +365,14 @@ const WORKSPACE_FACET = {
],
};

/**
* @namespace REPORTING_METHOD_FACET
* @description Facet for service requests breakdown based on their reporting
* methods
*
* @version 0.1.0
* @since 0.1.0
*/
const REPORTING_METHOD_FACET = {
methods: [
{
Expand All @@ -334,8 +399,15 @@ const REPORTING_METHOD_FACET = {
],
};

const LEADERSBOARD_FACET = {
leadersboard: [
/**
* @namespace LEADERSBOARD_FACET
* @description Facet for operator leader's board
*
* @version 0.1.0
* @since 0.1.0
*/
const OPERATOR_LEADERSBOARD_FACET = {
operators: [
{
$group: {
_id: '$operator._id',
Expand All @@ -345,6 +417,7 @@ const LEADERSBOARD_FACET = {
name: { $first: '$operator.name' },
email: { $first: '$operator.email' },
phone: { $first: '$operator.phone' },
relation: { $first: '$operator.relation' },
},
},
{
Expand Down Expand Up @@ -386,7 +459,7 @@ const OVERVIEW_FACET = {
...SERVICE_TYPE_FACET,
...WORKSPACE_FACET,
...REPORTING_METHOD_FACET,
...LEADERSBOARD_FACET,
...OPERATOR_LEADERSBOARD_FACET,
};

/**
Expand Down
79 changes: 76 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ const getBaseAggregation = criteria => {
});
};

/**
* @namespace OVERALL_FACET
* @description Facet for service requests overall general breakdown
*
* @version 0.1.0
* @since 0.1.0
*/
const OVERALL_FACET = {
overall: [
{
Expand All @@ -70,6 +77,13 @@ const OVERALL_FACET = {
],
};

/**
* @namespace PRIORITY_FACET
* @description Facet for service requests breakdown based on their priorities
*
* @version 0.1.0
* @since 0.1.0
*/
const JURISDICTION_FACET = {
jurisdictions: [
{
Expand Down Expand Up @@ -112,6 +126,13 @@ const JURISDICTION_FACET = {
],
};

/**
* @namespace STATUS_FACET
* @description Facet for service requests breakdown based on their statuses
*
* @version 0.1.0
* @since 0.1.0
*/
const STATUS_FACET = {
statuses: [
{
Expand Down Expand Up @@ -140,6 +161,13 @@ const STATUS_FACET = {
],
};

/**
* @namespace PRIORITY_FACET
* @description Facet for service requests breakdown based on their priorities
*
* @version 0.1.0
* @since 0.1.0
*/
const PRIORITY_FACET = {
priorities: [
{
Expand Down Expand Up @@ -176,6 +204,13 @@ const PRIORITY_FACET = {
],
};

/**
* @namespace SERVICE_FACET
* @description Facet for service requests breakdown based on their services(nature)
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_FACET = {
services: [
{
Expand Down Expand Up @@ -212,6 +247,13 @@ const SERVICE_FACET = {
],
};

/**
* @namespace SERVICE_GROUP_FACET
* @description Facet for service requests breakdown based on their service groups
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_GROUP_FACET = {
groups: [
{
Expand Down Expand Up @@ -248,6 +290,13 @@ const SERVICE_GROUP_FACET = {
],
};

/**
* @namespace SERVICE_TYPE_FACET
* @description Facet for service requests breakdown based on their service types
*
* @version 0.1.0
* @since 0.1.0
*/
const SERVICE_TYPE_FACET = {
types: [
{
Expand Down Expand Up @@ -287,6 +336,14 @@ const SERVICE_TYPE_FACET = {
],
};

/**
* @namespace WORKSPACE_FACET
* @description Facet for service requests breakdown based on workspaces they
* belong
*
* @version 0.1.0
* @since 0.1.0
*/
const WORKSPACE_FACET = {
workspaces: [
{
Expand All @@ -310,6 +367,14 @@ const WORKSPACE_FACET = {
],
};

/**
* @namespace REPORTING_METHOD_FACET
* @description Facet for service requests breakdown based on their reporting
* methods
*
* @version 0.1.0
* @since 0.1.0
*/
const REPORTING_METHOD_FACET = {
methods: [
{
Expand All @@ -336,8 +401,15 @@ const REPORTING_METHOD_FACET = {
],
};

const LEADERSBOARD_FACET = {
leadersboard: [
/**
* @namespace LEADERSBOARD_FACET
* @description Facet for operator leader's board
*
* @version 0.1.0
* @since 0.1.0
*/
const OPERATOR_LEADERSBOARD_FACET = {
operators: [
{
$group: {
_id: '$operator._id',
Expand All @@ -347,6 +419,7 @@ const LEADERSBOARD_FACET = {
name: { $first: '$operator.name' },
email: { $first: '$operator.email' },
phone: { $first: '$operator.phone' },
relation: { $first: '$operator.relation' },
},
},
{
Expand Down Expand Up @@ -388,7 +461,7 @@ const OVERVIEW_FACET = {
...SERVICE_TYPE_FACET,
...WORKSPACE_FACET,
...REPORTING_METHOD_FACET,
...LEADERSBOARD_FACET,
...OPERATOR_LEADERSBOARD_FACET,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codetanzania/majifix-analytics",
"version": "0.4.2",
"version": "0.4.3",
"description": "Majifix module for analytics and reports",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down

0 comments on commit 3150d3c

Please sign in to comment.