Compare commits

...

4 Commits

Author SHA1 Message Date
standardci
be8838d338 chore(release): publish new version
- @standardnotes/analytics@1.35.0
 - @standardnotes/api-gateway@1.26.0
 - @standardnotes/auth-server@1.37.1
 - @standardnotes/domain-events-infra@1.8.17
 - @standardnotes/domain-events@2.63.0
 - @standardnotes/event-store@1.3.22
 - @standardnotes/files-server@1.6.8
 - @standardnotes/scheduler-server@1.10.36
 - @standardnotes/syncing-server@1.8.20
2022-10-05 08:04:23 +00:00
Karol Sójko
84e8a5cc6e feat(api-gateway): include increments count in statistics measures report 2022-10-05 10:02:55 +02:00
standardci
d5db578bfd chore(release): publish new version
- @standardnotes/api-gateway@1.25.0
2022-10-05 07:55:03 +00:00
Karol Sójko
7429f5c8e9 feat(api-gateway): add detailed payments statistics to report 2022-10-05 09:53:25 +02:00
22 changed files with 83 additions and 14 deletions

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.35.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.34.0...@standardnotes/analytics@1.35.0) (2022-10-05)
### Features
* **api-gateway:** include increments count in statistics measures report ([84e8a5c](https://github.com/standardnotes/server/commit/84e8a5cc6e6ba216f1c0737a7a93aba581eced0f))
# [1.34.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.33.0...@standardnotes/analytics@1.34.0) (2022-10-04)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "1.34.0",
"version": "1.35.0",
"engines": {
"node": ">=14.0.0 <17.0.0"
},

View File

@@ -12,4 +12,5 @@ export interface StatisticsStoreInterface {
setMeasure(measure: StatisticsMeasure, value: number, periods: Period[]): Promise<void>
getMeasureAverage(measure: StatisticsMeasure, period: Period): Promise<number>
getMeasureTotal(measure: StatisticsMeasure, periodOrPeriodKey: Period | string): Promise<number>
getMeasureIncrementCounts(measure: StatisticsMeasure, period: Period): Promise<number>
}

View File

@@ -8,6 +8,17 @@ import { StatisticsStoreInterface } from '../../Domain/Statistics/StatisticsStor
export class RedisStatisticsStore implements StatisticsStoreInterface {
constructor(private periodKeyGenerator: PeriodKeyGeneratorInterface, private redisClient: IORedis.Redis) {}
async getMeasureIncrementCounts(measure: StatisticsMeasure, period: Period): Promise<number> {
const increments = await this.redisClient.get(
`count:increments:${measure}:timespan:${this.periodKeyGenerator.getPeriodKey(period)}`,
)
if (increments === null) {
return 0
}
return +increments
}
async setMeasure(measure: StatisticsMeasure, value: number, periods: Period[]): Promise<void> {
const pipeline = this.redisClient.pipeline()
@@ -45,16 +56,15 @@ export class RedisStatisticsStore implements StatisticsStoreInterface {
}
async getMeasureAverage(measure: StatisticsMeasure, period: Period): Promise<number> {
const increments = await this.redisClient.get(
`count:increments:${measure}:timespan:${this.periodKeyGenerator.getPeriodKey(period)}`,
)
if (increments === null) {
const increments = await this.getMeasureIncrementCounts(measure, period)
if (increments === 0) {
return 0
}
const totalValue = await this.getMeasureTotal(measure, period)
return totalValue / +increments
return totalValue / increments
}
async getYesterdayOutOfSyncIncidents(): Promise<number> {

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.26.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.25.0...@standardnotes/api-gateway@1.26.0) (2022-10-05)
### Features
* **api-gateway:** include increments count in statistics measures report ([84e8a5c](https://github.com/standardnotes/api-gateway/commit/84e8a5cc6e6ba216f1c0737a7a93aba581eced0f))
# [1.25.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.24.5...@standardnotes/api-gateway@1.25.0) (2022-10-05)
### Features
* **api-gateway:** add detailed payments statistics to report ([7429f5c](https://github.com/standardnotes/api-gateway/commit/7429f5c8e9dafdba557cdbfb3d9020513fc7a9ee))
## [1.24.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.24.4...@standardnotes/api-gateway@1.24.5) (2022-10-04)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -94,6 +94,14 @@ const requestReport = async (
const statisticMeasureNames = [
StatisticsMeasure.Income,
StatisticsMeasure.PlusSubscriptionInitialAnnualPaymentsIncome,
StatisticsMeasure.PlusSubscriptionInitialMonthlyPaymentsIncome,
StatisticsMeasure.PlusSubscriptionRenewingAnnualPaymentsIncome,
StatisticsMeasure.PlusSubscriptionRenewingMonthlyPaymentsIncome,
StatisticsMeasure.ProSubscriptionInitialAnnualPaymentsIncome,
StatisticsMeasure.ProSubscriptionInitialMonthlyPaymentsIncome,
StatisticsMeasure.ProSubscriptionRenewingAnnualPaymentsIncome,
StatisticsMeasure.ProSubscriptionRenewingMonthlyPaymentsIncome,
StatisticsMeasure.Refunds,
StatisticsMeasure.RegistrationLength,
StatisticsMeasure.SubscriptionLength,
@@ -113,6 +121,7 @@ const requestReport = async (
period,
totalValue: await statisticsStore.getMeasureTotal(statisticMeasureName, period),
average: await statisticsStore.getMeasureAverage(statisticMeasureName, period),
increments: await statisticsStore.getMeasureIncrementCounts(statisticMeasureName, period),
})
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.24.5",
"version": "1.26.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.37.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.37.0...@standardnotes/auth-server@1.37.1) (2022-10-05)
**Note:** Version bump only for package @standardnotes/auth-server
# [1.37.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.36.4...@standardnotes/auth-server@1.37.0) (2022-10-04)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.37.0",
"version": "1.37.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.8.17](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.8.16...@standardnotes/domain-events-infra@1.8.17) (2022-10-05)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.8.16](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.8.15...@standardnotes/domain-events-infra@1.8.16) (2022-10-04)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.8.16",
"version": "1.8.17",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.63.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.62.0...@standardnotes/domain-events@2.63.0) (2022-10-05)
### Features
* **api-gateway:** include increments count in statistics measures report ([84e8a5c](https://github.com/standardnotes/server/commit/84e8a5cc6e6ba216f1c0737a7a93aba581eced0f))
# [2.62.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.61.1...@standardnotes/domain-events@2.62.0) (2022-10-04)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events",
"version": "2.62.0",
"version": "2.63.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -16,6 +16,7 @@ export interface DailyAnalyticsReportGeneratedEventPayload {
name: string
totalValue: number
average: number
increments: number
period: number
}>
activityStatisticsOverTime: Array<{

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.22](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.3.21...@standardnotes/event-store@1.3.22) (2022-10-05)
**Note:** Version bump only for package @standardnotes/event-store
## [1.3.21](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.3.20...@standardnotes/event-store@1.3.21) (2022-10-04)
**Note:** Version bump only for package @standardnotes/event-store

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/event-store",
"version": "1.3.21",
"version": "1.3.22",
"description": "Event Store Service",
"private": true,
"main": "dist/src/index.js",

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.6.8](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.6.7...@standardnotes/files-server@1.6.8) (2022-10-05)
**Note:** Version bump only for package @standardnotes/files-server
## [1.6.7](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.6.6...@standardnotes/files-server@1.6.7) (2022-10-04)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.6.7",
"version": "1.6.8",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.10.36](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.35...@standardnotes/scheduler-server@1.10.36) (2022-10-05)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.10.35](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.34...@standardnotes/scheduler-server@1.10.35) (2022-10-04)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.10.35",
"version": "1.10.36",
"engines": {
"node": ">=16.0.0 <17.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.8.20](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.8.19...@standardnotes/syncing-server@1.8.20) (2022-10-05)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.8.19](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.8.18...@standardnotes/syncing-server@1.8.19) (2022-10-04)
**Note:** Version bump only for package @standardnotes/syncing-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.8.19",
"version": "1.8.20",
"engines": {
"node": ">=16.0.0 <17.0.0"
},