diff --git a/.env.sample b/.env.sample index 87180a6a..bb7e7e22 100644 --- a/.env.sample +++ b/.env.sample @@ -77,8 +77,6 @@ CLOUDPAYMENTS_SECRET= # INN of legal entity for CloudKassir LEGAL_ENTITY_INN= -# Token for Amplitude analytics -AMPLITUDE_TOKEN= # AWS S3 Bucket Configuration AWS_S3_ACCESS_KEY_ID= diff --git a/package.json b/package.json index 76aa78a7..4e0ee4ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hawk.api", - "version": "1.4.4", + "version": "1.4.5", "main": "index.ts", "license": "BUSL-1.1", "scripts": { @@ -38,7 +38,6 @@ }, "dependencies": { "@ai-sdk/openai": "^2.0.64", - "@amplitude/node": "^1.10.0", "@graphql-tools/merge": "^8.3.1", "@graphql-tools/schema": "^8.5.1", "@graphql-tools/utils": "^8.9.0", diff --git a/src/models/usersFactory.ts b/src/models/usersFactory.ts index ba3ee1de..8e1869f8 100644 --- a/src/models/usersFactory.ts +++ b/src/models/usersFactory.ts @@ -3,7 +3,6 @@ import UserModel from './user'; import { Collection, Db, OptionalId } from 'mongodb'; import DataLoaders from '../dataLoaders'; import { UserDBScheme } from '@hawk.so/types'; -import { Analytics, AnalyticsEventTypes } from '../utils/analytics'; /** * Users factory to work with User Model @@ -91,14 +90,6 @@ export default class UsersFactory extends AbstractModelFactory - */ - logEvent: (event: AnalyticsEvent): Promise => { - return amplitude.logEvent(event); - }, -}; diff --git a/src/utils/analytics/events.ts b/src/utils/analytics/events.ts deleted file mode 100644 index b5342660..00000000 --- a/src/utils/analytics/events.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Event } from '@amplitude/node'; - -/** - * Define available metrics - */ -export enum AnalyticsEventTypes { - NEW_USER_REGISTERED = 'new user registered', - - WORKSPACE_CREATED = 'workspace created', - - PROJECT_CREATED = 'project created', -} - -/** - * Define analytics event type - */ -export type AnalyticsEvent = Omit & { 'event_type': AnalyticsEventTypes }; diff --git a/src/utils/analytics/index.ts b/src/utils/analytics/index.ts deleted file mode 100644 index 40d26b1a..00000000 --- a/src/utils/analytics/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Analytics } from './amplitude'; -export { AnalyticsEventTypes } from './events'; diff --git a/yarn.lock b/yarn.lock index 2c63c92b..be966091 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,38 +35,6 @@ dependencies: json-schema "^0.4.0" -"@amplitude/identify@^1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@amplitude/identify/-/identify-1.10.0.tgz#d62b8b6785c29350c368810475a6fc7b04985210" - integrity sha512-BshMDcZX9qO4mgGBR45HmiHxfcPCDY/eBOE/MTUZBW+y9+N61aKmNY3YJsAUfRPzieDiyfqs8rNm7quVkaNzJQ== - dependencies: - "@amplitude/types" "^1.10.0" - "@amplitude/utils" "^1.10.0" - tslib "^1.9.3" - -"@amplitude/node@^1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@amplitude/node/-/node-1.10.0.tgz#33f84ddf82b31471fce53e6fa60b688d4bc62ee4" - integrity sha512-Jh8w1UpxhonWe0kCALVvqiBE3vo5NYmbNZbZrrI9Lfa/1HbGboZlGdg0I7/WtihbZvEjpfcfTOf8OkmtZh6vsQ== - dependencies: - "@amplitude/identify" "^1.10.0" - "@amplitude/types" "^1.10.0" - "@amplitude/utils" "^1.10.0" - tslib "^1.9.3" - -"@amplitude/types@^1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@amplitude/types/-/types-1.10.0.tgz#dfaf7cc25f533a1e2b0ef0ad675371b396733c0f" - integrity sha512-xN0gnhutztv6kqHaZ2bre18anQV5GDmMXOeipTvI670g2VjNbPfOzMwu1LN4p1NadYq+GqYI223UcZrXR+R4Pw== - -"@amplitude/utils@^1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@amplitude/utils/-/utils-1.10.0.tgz#138b0ba4e5755540a9e4abf426b7a25d045418a9" - integrity sha512-/R8j8IzFH0GYfA6ehQDm5IEzt71gIeMdiYYFIzZp6grERQlgJcwNJMAiza0o2JwwTDIruzqdB3c/vLVjuakp+w== - dependencies: - "@amplitude/types" "^1.10.0" - tslib "^1.9.3" - "@apollo/protobufjs@1.2.4": version "1.2.4" resolved "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.2.4.tgz#d913e7627210ec5efd758ceeb751c776c68ba133" @@ -6662,7 +6630,7 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==