├── .dockerignore ├── .gitignore ├── .prettierignore ├── Dockerfile ├── LICENSE ├── README.md ├── api ├── app.ts ├── generated │ ├── schema.graphql │ └── typings.ts ├── graphql │ ├── AddDeviceVerification.ts │ ├── BillingAccount.ts │ ├── Contact.ts │ ├── ContactInvitation.ts │ ├── Content.ts │ ├── Device.ts │ ├── DeviceTombstone.ts │ ├── GroupSessionMessage.ts │ ├── License.ts │ ├── LicenseToken.ts │ ├── Mutation.ts │ ├── OneTimeKey.ts │ ├── OneTimeKeyWithDeviceIdKey.ts │ ├── PrivateInfo.ts │ ├── PrivateInfoContent.ts │ ├── PrivateInfoGroupSessionMessage.ts │ ├── Query.ts │ ├── Repository.ts │ ├── RepositoryResult.ts │ ├── RepositoryTombstone.ts │ ├── SubscriptionPlan.ts │ └── User.ts ├── helpers │ ├── device.ts │ └── repository.ts ├── routes │ └── paddle-webhooks.ts ├── schema.ts ├── types.ts └── utils │ ├── convertPaddleSubscriptionPlan.ts │ ├── convertPaddleSubscriptionStatus.ts │ ├── getBillingAccountByAuthToken.ts │ ├── haveEqualStringEntries.ts │ ├── index.ts │ ├── notEmpty.ts │ ├── sendBillingAccountAuthEmail.ts │ └── validatePaddleWebhook.ts ├── bin └── paddleSubscriptionCreate.ts ├── docker-compose.yml ├── package.json ├── prisma ├── client.ts ├── migrations │ ├── 20201209212354_initial_schema │ │ └── migration.sql │ ├── 20210112133754_user_and_device_tombstones │ │ └── migration.sql │ └── 20210611140645_schema_version │ │ └── migration.sql └── schema.prisma ├── tests ├── addCollaborator.test.ts ├── allRepositories.test.ts ├── billingAccountAuth.test.ts ├── clientVersions.test.ts ├── debugHelpers.ts ├── deleteContact.test.ts ├── deleteContactInvitation.test.ts ├── deleteRepository.test.ts ├── helpers.ts ├── integration.test.ts ├── licenseManagement.test.ts ├── licenseQuantity.test.ts ├── linkDevices.test.ts ├── oneTimeKey.test.ts ├── paddleCancelSubscription.test.ts ├── paddleCreateSubscription.test.ts ├── paddleHelpers.ts ├── paddleUpdateSubscription.test.ts ├── postgres-test-environment.js ├── removeCollaboratorFromRepository.test.ts ├── removeDevice.test.ts ├── removeMyselfFromRepository.test.ts ├── repositoryDevices.test.ts ├── types.ts └── updateRepository.test.ts ├── tsconfig.json └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | ./prisma/**/*.md 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/README.md -------------------------------------------------------------------------------- /api/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/app.ts -------------------------------------------------------------------------------- /api/generated/schema.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/generated/schema.graphql -------------------------------------------------------------------------------- /api/generated/typings.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/generated/typings.ts -------------------------------------------------------------------------------- /api/graphql/AddDeviceVerification.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/AddDeviceVerification.ts -------------------------------------------------------------------------------- /api/graphql/BillingAccount.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/BillingAccount.ts -------------------------------------------------------------------------------- /api/graphql/Contact.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Contact.ts -------------------------------------------------------------------------------- /api/graphql/ContactInvitation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/ContactInvitation.ts -------------------------------------------------------------------------------- /api/graphql/Content.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Content.ts -------------------------------------------------------------------------------- /api/graphql/Device.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Device.ts -------------------------------------------------------------------------------- /api/graphql/DeviceTombstone.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/DeviceTombstone.ts -------------------------------------------------------------------------------- /api/graphql/GroupSessionMessage.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/GroupSessionMessage.ts -------------------------------------------------------------------------------- /api/graphql/License.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/License.ts -------------------------------------------------------------------------------- /api/graphql/LicenseToken.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/LicenseToken.ts -------------------------------------------------------------------------------- /api/graphql/Mutation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Mutation.ts -------------------------------------------------------------------------------- /api/graphql/OneTimeKey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/OneTimeKey.ts -------------------------------------------------------------------------------- /api/graphql/OneTimeKeyWithDeviceIdKey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/OneTimeKeyWithDeviceIdKey.ts -------------------------------------------------------------------------------- /api/graphql/PrivateInfo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/PrivateInfo.ts -------------------------------------------------------------------------------- /api/graphql/PrivateInfoContent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/PrivateInfoContent.ts -------------------------------------------------------------------------------- /api/graphql/PrivateInfoGroupSessionMessage.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/PrivateInfoGroupSessionMessage.ts -------------------------------------------------------------------------------- /api/graphql/Query.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Query.ts -------------------------------------------------------------------------------- /api/graphql/Repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/Repository.ts -------------------------------------------------------------------------------- /api/graphql/RepositoryResult.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/RepositoryResult.ts -------------------------------------------------------------------------------- /api/graphql/RepositoryTombstone.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/RepositoryTombstone.ts -------------------------------------------------------------------------------- /api/graphql/SubscriptionPlan.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/SubscriptionPlan.ts -------------------------------------------------------------------------------- /api/graphql/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/graphql/User.ts -------------------------------------------------------------------------------- /api/helpers/device.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/helpers/device.ts -------------------------------------------------------------------------------- /api/helpers/repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/helpers/repository.ts -------------------------------------------------------------------------------- /api/routes/paddle-webhooks.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/routes/paddle-webhooks.ts -------------------------------------------------------------------------------- /api/schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/schema.ts -------------------------------------------------------------------------------- /api/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/types.ts -------------------------------------------------------------------------------- /api/utils/convertPaddleSubscriptionPlan.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/convertPaddleSubscriptionPlan.ts -------------------------------------------------------------------------------- /api/utils/convertPaddleSubscriptionStatus.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/convertPaddleSubscriptionStatus.ts -------------------------------------------------------------------------------- /api/utils/getBillingAccountByAuthToken.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/getBillingAccountByAuthToken.ts -------------------------------------------------------------------------------- /api/utils/haveEqualStringEntries.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/haveEqualStringEntries.ts -------------------------------------------------------------------------------- /api/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/index.ts -------------------------------------------------------------------------------- /api/utils/notEmpty.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/notEmpty.ts -------------------------------------------------------------------------------- /api/utils/sendBillingAccountAuthEmail.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/sendBillingAccountAuthEmail.ts -------------------------------------------------------------------------------- /api/utils/validatePaddleWebhook.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/api/utils/validatePaddleWebhook.ts -------------------------------------------------------------------------------- /bin/paddleSubscriptionCreate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/bin/paddleSubscriptionCreate.ts -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/package.json -------------------------------------------------------------------------------- /prisma/client.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/prisma/client.ts -------------------------------------------------------------------------------- /prisma/migrations/20201209212354_initial_schema/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/prisma/migrations/20201209212354_initial_schema/migration.sql -------------------------------------------------------------------------------- /prisma/migrations/20210112133754_user_and_device_tombstones/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/prisma/migrations/20210112133754_user_and_device_tombstones/migration.sql -------------------------------------------------------------------------------- /prisma/migrations/20210611140645_schema_version/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/prisma/migrations/20210611140645_schema_version/migration.sql -------------------------------------------------------------------------------- /prisma/schema.prisma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/prisma/schema.prisma -------------------------------------------------------------------------------- /tests/addCollaborator.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/addCollaborator.test.ts -------------------------------------------------------------------------------- /tests/allRepositories.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/allRepositories.test.ts -------------------------------------------------------------------------------- /tests/billingAccountAuth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/billingAccountAuth.test.ts -------------------------------------------------------------------------------- /tests/clientVersions.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/clientVersions.test.ts -------------------------------------------------------------------------------- /tests/debugHelpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/debugHelpers.ts -------------------------------------------------------------------------------- /tests/deleteContact.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/deleteContact.test.ts -------------------------------------------------------------------------------- /tests/deleteContactInvitation.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/deleteContactInvitation.test.ts -------------------------------------------------------------------------------- /tests/deleteRepository.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/deleteRepository.test.ts -------------------------------------------------------------------------------- /tests/helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/helpers.ts -------------------------------------------------------------------------------- /tests/integration.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/integration.test.ts -------------------------------------------------------------------------------- /tests/licenseManagement.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/licenseManagement.test.ts -------------------------------------------------------------------------------- /tests/licenseQuantity.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/licenseQuantity.test.ts -------------------------------------------------------------------------------- /tests/linkDevices.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/linkDevices.test.ts -------------------------------------------------------------------------------- /tests/oneTimeKey.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/oneTimeKey.test.ts -------------------------------------------------------------------------------- /tests/paddleCancelSubscription.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/paddleCancelSubscription.test.ts -------------------------------------------------------------------------------- /tests/paddleCreateSubscription.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/paddleCreateSubscription.test.ts -------------------------------------------------------------------------------- /tests/paddleHelpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/paddleHelpers.ts -------------------------------------------------------------------------------- /tests/paddleUpdateSubscription.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/paddleUpdateSubscription.test.ts -------------------------------------------------------------------------------- /tests/postgres-test-environment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/postgres-test-environment.js -------------------------------------------------------------------------------- /tests/removeCollaboratorFromRepository.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/removeCollaboratorFromRepository.test.ts -------------------------------------------------------------------------------- /tests/removeDevice.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/removeDevice.test.ts -------------------------------------------------------------------------------- /tests/removeMyselfFromRepository.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/removeMyselfFromRepository.test.ts -------------------------------------------------------------------------------- /tests/repositoryDevices.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/repositoryDevices.test.ts -------------------------------------------------------------------------------- /tests/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/types.ts -------------------------------------------------------------------------------- /tests/updateRepository.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tests/updateRepository.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serenity-kit/serenity-notes-backend/HEAD/yarn.lock --------------------------------------------------------------------------------