Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
nest-typeorm-object-activites
Advanced tools
Readme
$ npm i --save nest-typeorm-object-activites
If we want to track activities for our User entity we should create following entity:
@Entity()
export class UserActivity extends Activity {
@ManyToOne(() => User)
sourceObject: User;
}
After that we should add entity to imports in our module as well as add ActivityModule for this newly created entity with second parameter as baseUrl
imports: [TypeOrmModule.forFeature([User, UserActivity]), ActivityModule.forFeature(UserActivity, 'user')],
No we can use new endpoints to store and list all activities for particular object with replacing <related object id>
with user id:
### create activity
POST {{APP_URL}}/activity/user/<related object id>
Content-Type: application/json
{
"description": "test description"
}
### get activities
GET {{APP_URL}}/activity/user/<related object id>
FAQs
NestJS TypeORM Object Activities Tracking
The npm package nest-typeorm-object-activites receives a total of 8 weekly downloads. As such, nest-typeorm-object-activites popularity was classified as not popular.
We found that nest-typeorm-object-activites demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.