| 291 | } |
| 292 | |
| 293 | interface IUserModel extends mongoose.Model<IUserDocument> { |
| 294 | publicFields(): string[]; |
| 295 | |
| 296 | registerOrLogIn({ |
| 297 | uid, |
| 298 | email, |
| 299 | isLoginEvent, |
| 300 | teamId, |
| 301 | }: { |
| 302 | uid: string; |
| 303 | email: string; |
| 304 | isLoginEvent: boolean; |
| 305 | teamId?: string; |
| 306 | }): Promise<IUserDocument>; |
| 307 | |
| 308 | updateUserProfile({ |
| 309 | email, |
| 310 | userName, |
| 311 | userAvatarUrl, |
| 312 | }: { |
| 313 | email: string; |
| 314 | userName: string; |
| 315 | userAvatarUrl: string; |
| 316 | }): Promise<void>; |
| 317 | |
| 318 | createOrUpdateTeam({ |
| 319 | teamId, |
| 320 | userId, |
| 321 | teamName, |
| 322 | teamLogoUrl, |
| 323 | }: { |
| 324 | teamId?: string; |
| 325 | userId?: string; |
| 326 | teamName: string; |
| 327 | teamLogoUrl: string; |
| 328 | }): Promise<any>; |
| 329 | |
| 330 | getTeamData(teamId: string): Promise<{ teamName: string; teamLogoUrl: string; error: string }>; |
| 331 | |
| 332 | getSubscriptionStatus(userId: string): Promise<{ |
| 333 | isSubscriptionActiveForAccount: boolean; |
| 334 | isPaymentFailedForAccount: boolean; |
| 335 | isTrialPeriodOverForAccount: boolean; |
| 336 | }>; |
| 337 | |
| 338 | createOrUpdateInvitedUserAndAddToTeam({ |
| 339 | emailOfInvitee, |
| 340 | teamId, |
| 341 | userId, |
| 342 | }: { |
| 343 | emailOfInvitee: string; |
| 344 | teamId: string; |
| 345 | userId: string; |
| 346 | }): Promise<IUserDocument>; |
| 347 | |
| 348 | revokeInvitation({ |
| 349 | revokedInvitationEmail, |
| 350 | teamId, |
no outgoing calls
no test coverage detected