Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hawk.api",
"version": "1.4.4",
"version": "1.4.5",
"main": "index.ts",
"license": "BUSL-1.1",
"scripts": {
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 1 addition & 9 deletions src/models/usersFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { Collection, Db, OptionalId } from 'mongodb';
import DataLoaders from '../dataLoaders';
import { UserDBScheme } from '@hawk.so/types';
import { Analytics, AnalyticsEventTypes } from '../utils/analytics';


Check failure on line 7 in src/models/usersFactory.ts

View workflow job for this annotation

GitHub Actions / ESlint

More than 1 blank line not allowed
/**
* Users factory to work with User Model
*/
Expand Down Expand Up @@ -91,14 +91,6 @@

user.generatedPassword = generatedPassword;

await Analytics.logEvent({
/* eslint-disable-next-line camelcase */
event_type: AnalyticsEventTypes.NEW_USER_REGISTERED,
/* eslint-disable-next-line camelcase */
user_id: userId.toString(),
time: Date.now(),
});

return user;
}

Expand Down
9 changes: 0 additions & 9 deletions src/models/workspacesFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import UserModel from './user';
import PlansFactory from './plansFactory';
import PlanModel from './plan';
import { WorkspaceDBScheme } from '@hawk.so/types';
import { Analytics, AnalyticsEventTypes } from '../utils/analytics';

/**
* Workspaces factory to work with WorkspaceModel
Expand Down Expand Up @@ -70,14 +69,6 @@ export default class WorkspacesFactory extends AbstractModelFactory<WorkspaceDBS
await ownerModel.addWorkspace(workspaceModel._id.toString());
await workspaceModel.changePlan((await this.getDefaultPlan())._id.toString());

await Analytics.logEvent({
/* eslint-disable-next-line camelcase */
event_type: AnalyticsEventTypes.WORKSPACE_CREATED,
/* eslint-disable-next-line camelcase */
user_id: ownerModel._id.toString(),
time: Date.now(),
});

return workspaceModel;
}

Expand Down
27 changes: 0 additions & 27 deletions src/utils/analytics/amplitude.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/utils/analytics/events.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/utils/analytics/index.ts

This file was deleted.

34 changes: 1 addition & 33 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down
Loading