Compare commits

...

4 Commits

Author SHA1 Message Date
standardci
5f67e45911 chore(release): publish new version
- @standardnotes/analytics@2.12.2
 - @standardnotes/api-gateway@1.39.7
 - @standardnotes/auth-server@1.60.16
 - @standardnotes/domain-events-infra@1.9.37
 - @standardnotes/domain-events@2.93.0
 - @standardnotes/event-store@1.6.33
 - @standardnotes/files-server@1.8.33
 - @standardnotes/revisions-server@1.9.5
 - @standardnotes/scheduler-server@1.13.34
 - @standardnotes/syncing-server@1.20.5
 - @standardnotes/websockets-server@1.4.34
 - @standardnotes/workspace-server@1.17.33
2022-12-05 14:34:06 +00:00
Karol Sójko
fddf9fccbd feat(domain-events): add email subscription sync requested event 2022-12-05 15:32:10 +01:00
standardci
2bedbd7bd2 chore(release): publish new version
- @standardnotes/analytics@2.12.1
 - @standardnotes/domain-core@1.8.0
 - @standardnotes/revisions-server@1.9.4
 - @standardnotes/syncing-server@1.20.4
2022-12-05 10:40:29 +00:00
Karol Sójko
02f3c85796 feat(domain-core): add email subscription rejection levels 2022-12-05 11:38:23 +01:00
33 changed files with 154 additions and 13 deletions

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.12.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.12.1...@standardnotes/analytics@2.12.2) (2022-12-05)
**Note:** Version bump only for package @standardnotes/analytics
## [2.12.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.12.0...@standardnotes/analytics@2.12.1) (2022-12-05)
**Note:** Version bump only for package @standardnotes/analytics
# [2.12.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.11.17...@standardnotes/analytics@2.12.0) (2022-12-05)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.12.0",
"version": "2.12.2",
"engines": {
"node": ">=18.0.0 <19.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.39.7](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.39.6...@standardnotes/api-gateway@1.39.7) (2022-12-05)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.39.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.39.5...@standardnotes/api-gateway@1.39.6) (2022-11-30)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.39.6",
"version": "1.39.7",
"engines": {
"node": ">=18.0.0 <19.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.60.16](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.60.15...@standardnotes/auth-server@1.60.16) (2022-12-05)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.60.15](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.60.14...@standardnotes/auth-server@1.60.15) (2022-11-30)
**Note:** Version bump only for package @standardnotes/auth-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.60.15",
"version": "1.60.16",
"engines": {
"node": ">=18.0.0 <19.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.
# [1.8.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.7.0...@standardnotes/domain-core@1.8.0) (2022-12-05)
### Features
* **domain-core:** add email subscription rejection levels ([02f3c85](https://github.com/standardnotes/server/commit/02f3c85796ade7cb69edbdda2367c0d91ac1bdf0))
# [1.7.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.6.0...@standardnotes/domain-core@1.7.0) (2022-12-05)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-core",
"version": "1.7.0",
"version": "1.8.0",
"engines": {
"node": ">=18.0.0 <19.0.0"
},

View File

@@ -0,0 +1,18 @@
import { EmailSubscriptionRejectionLevel } from './EmailSubscriptionRejectionLevel'
describe('EmailSubscriptionRejectionLevel', () => {
it('should create a value object', () => {
const valueOrError = EmailSubscriptionRejectionLevel.create(EmailSubscriptionRejectionLevel.LEVELS.SignIn)
expect(valueOrError.isFailed()).toBeFalsy()
expect(valueOrError.getValue().value).toEqual('SIGN_IN')
})
it('should not create an invalid value object', () => {
for (const value of ['', undefined, null, 0, 'FOOBAR']) {
const valueOrError = EmailSubscriptionRejectionLevel.create(value as string)
expect(valueOrError.isFailed()).toBeTruthy()
}
})
})

View File

@@ -0,0 +1,30 @@
import { Result } from '../Core/Result'
import { ValueObject } from '../Core/ValueObject'
import { EmailSubscriptionRejectionLevelProps } from './EmailSubscriptionRejectionLevelProps'
export class EmailSubscriptionRejectionLevel extends ValueObject<EmailSubscriptionRejectionLevelProps> {
static readonly LEVELS = {
SignIn: 'SIGN_IN',
Marketing: 'MARKETING',
FailedCloudBackup: 'FAILED_CLOUD_BACKUP',
FailedEmailBackup: 'FAILED_EMAIL_BACKUP',
}
get value(): string {
return this.props.value
}
private constructor(props: EmailSubscriptionRejectionLevelProps) {
super(props)
}
static create(name: string): Result<EmailSubscriptionRejectionLevel> {
const isValidName = Object.values(this.LEVELS).includes(name)
if (!isValidName) {
return Result.fail<EmailSubscriptionRejectionLevel>(`Invalid subscription rejection level: ${name}`)
} else {
return Result.ok<EmailSubscriptionRejectionLevel>(new EmailSubscriptionRejectionLevel({ value: name }))
}
}
}

View File

@@ -0,0 +1,3 @@
export interface EmailSubscriptionRejectionLevelProps {
value: string
}

View File

@@ -20,6 +20,9 @@ export * from './Core/Validator'
export * from './Core/ValueObject'
export * from './Core/ValueObjectProps'
export * from './Email/EmailSubscriptionRejectionLevel'
export * from './Email/EmailSubscriptionRejectionLevelProps'
export * from './Mapping/MapperInterface'
export * from './Subscription/SubscriptionPlanName'

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.9.37](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.9.36...@standardnotes/domain-events-infra@1.9.37) (2022-12-05)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.9.36](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.9.35...@standardnotes/domain-events-infra@1.9.36) (2022-11-30)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.9.36",
"version": "1.9.37",
"engines": {
"node": ">=18.0.0 <19.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.93.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.92.0...@standardnotes/domain-events@2.93.0) (2022-12-05)
### Features
* **domain-events:** add email subscription sync requested event ([fddf9fc](https://github.com/standardnotes/server/commit/fddf9fccbd92fa4279e97bcd2420ec9e270fedbb))
# [2.92.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.91.0...@standardnotes/domain-events@2.92.0) (2022-11-30)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events",
"version": "2.92.0",
"version": "2.93.0",
"engines": {
"node": ">=18.0.0 <19.0.0"
},

View File

@@ -0,0 +1,8 @@
import { DomainEventInterface } from './DomainEventInterface'
import { EmailSubscriptionSyncRequestedEventPayload } from './EmailSubscriptionSyncRequestedEventPayload'
export interface EmailSubscriptionSyncRequestedEvent extends DomainEventInterface {
type: 'EMAIL_SUBSCRIPTION_SYNC_REQUESTED'
payload: EmailSubscriptionSyncRequestedEventPayload
}

View File

@@ -0,0 +1,9 @@
export interface EmailSubscriptionSyncRequestedEventPayload {
username: string
userUuid: string
subscriptionPlanName: string | null
muteFailedBackupsEmails: boolean
muteFailedCloudBackupsEmails: boolean
muteMarketingEmails: boolean
muteSignInEmails: boolean
}

View File

@@ -30,6 +30,8 @@ export * from './Event/EmailBackupRequestedEvent'
export * from './Event/EmailBackupRequestedEventPayload'
export * from './Event/EmailMessageRequestedEvent'
export * from './Event/EmailMessageRequestedEventPayload'
export * from './Event/EmailSubscriptionSyncRequestedEvent'
export * from './Event/EmailSubscriptionSyncRequestedEventPayload'
export * from './Event/ExitDiscountAppliedEvent'
export * from './Event/ExitDiscountAppliedEventPayload'
export * from './Event/ExitDiscountApplyRequestedEvent'

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.33](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.6.32...@standardnotes/event-store@1.6.33) (2022-12-05)
**Note:** Version bump only for package @standardnotes/event-store
## [1.6.32](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.6.31...@standardnotes/event-store@1.6.32) (2022-11-30)
**Note:** Version bump only for package @standardnotes/event-store

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/event-store",
"version": "1.6.32",
"version": "1.6.33",
"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.8.33](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.8.32...@standardnotes/files-server@1.8.33) (2022-12-05)
**Note:** Version bump only for package @standardnotes/files-server
## [1.8.32](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.8.31...@standardnotes/files-server@1.8.32) (2022-11-30)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.8.32",
"version": "1.8.33",
"engines": {
"node": ">=18.0.0 <19.0.0"
},

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.9.5](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.9.4...@standardnotes/revisions-server@1.9.5) (2022-12-05)
**Note:** Version bump only for package @standardnotes/revisions-server
## [1.9.4](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.9.3...@standardnotes/revisions-server@1.9.4) (2022-12-05)
**Note:** Version bump only for package @standardnotes/revisions-server
## [1.9.3](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.9.2...@standardnotes/revisions-server@1.9.3) (2022-12-05)
**Note:** Version bump only for package @standardnotes/revisions-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.9.3",
"version": "1.9.5",
"engines": {
"node": ">=18.0.0 <19.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.13.34](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.13.33...@standardnotes/scheduler-server@1.13.34) (2022-12-05)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.13.33](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.13.32...@standardnotes/scheduler-server@1.13.33) (2022-11-30)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.13.33",
"version": "1.13.34",
"engines": {
"node": ">=18.0.0 <19.0.0"
},

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.20.3",
"version": "1.20.5",
"engines": {
"node": ">=18.0.0 <19.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.4.34](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.4.33...@standardnotes/websockets-server@1.4.34) (2022-12-05)
**Note:** Version bump only for package @standardnotes/websockets-server
## [1.4.33](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.4.32...@standardnotes/websockets-server@1.4.33) (2022-11-30)
**Note:** Version bump only for package @standardnotes/websockets-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/websockets-server",
"version": "1.4.33",
"version": "1.4.34",
"engines": {
"node": ">=18.0.0 <19.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.17.33](https://github.com/standardnotes/server/compare/@standardnotes/workspace-server@1.17.32...@standardnotes/workspace-server@1.17.33) (2022-12-05)
**Note:** Version bump only for package @standardnotes/workspace-server
## [1.17.32](https://github.com/standardnotes/server/compare/@standardnotes/workspace-server@1.17.31...@standardnotes/workspace-server@1.17.32) (2022-11-30)
**Note:** Version bump only for package @standardnotes/workspace-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/workspace-server",
"version": "1.17.32",
"version": "1.17.33",
"engines": {
"node": ">=18.0.0 <19.0.0"
},