Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
/.vscode
/.coveralls.yml
*.tsbuildinfo
.DS_Store
.DS_Store
.cursor
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beincom/dto",
"version": "4.6.1",
"version": "5.0.0",
"description": "Share dto for all projects of Beincom",
"main": "./dist/index.js",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export * from './invitation.dto';
export * from './user-id.value-object';
export * from './user.dto';
export * from './group.dto';
export * from './shared-cache';
export * from './subscription.dto'
export * from './subscription.dto';
4 changes: 0 additions & 4 deletions src/shared-cache/index.ts

This file was deleted.

60 changes: 0 additions & 60 deletions src/shared-cache/shared-group-cache.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/shared-cache/shared-mission-cache.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/shared-cache/shared-notification-cache.ts

This file was deleted.

94 changes: 0 additions & 94 deletions src/shared-cache/shared-user-cache.ts

This file was deleted.

21 changes: 21 additions & 0 deletions src/subscription.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,24 @@ export interface IFeatureAttributes {
[FEATURE_PROPERTIES.MAX]?: number;
[FEATURE_PROPERTIES.LEVEL]?: number;
}

export enum PREMIUM_PACKAGE_TYPE {
BASIC = 'basic',
PREMIUM = 'premium',
}

export enum PREMIUM_PACKAGE_TERM {
ANNUAL = 'annual',
LIFETIME = 'lifetime',
}

export class BindedUserSubscriptionDto {
id: string;
userId: string;
packageId: string;
packageKey: string;
type: PREMIUM_PACKAGE_TYPE;
term: PREMIUM_PACKAGE_TERM;
effectiveStart: Date;
effectiveEnd?: Date;
}
45 changes: 12 additions & 33 deletions src/user.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
USER_INVITATION_PRIVACY,
USER_RELATIONSHIP_STATUS,
USER_STAFF_ROLE,
USER_VISIBILITY_PRIVACY,
} from '@beincom/constants';

class CommunityInfo {
Expand Down Expand Up @@ -53,28 +52,14 @@ export class UserDto {
relationshipStatus: USER_RELATIONSHIP_STATUS;
isDeactivated: boolean;
isVerified: boolean;
/**
* @note this field is required in the next major release.
*/
isPhoneVerified?: boolean;
/**
* @note this field is required in the next major release.
*/
isProfsCreator?: boolean;

/**
* @warning These fields are not optional. Must be a required field in the next major release.
*/
referralCode?: string;
isPhoneVerified: boolean;
isProfsCreator: boolean;
referralCode: string;
primaryId?: string;

latestWork?: LatestWorkExperienceDto;
showingBadges?: ShowingBadgeDto[];

shouldCreatePwd?: boolean;

interests?: INTEREST[];

interests: INTEREST[];
createdAt: Date;
updatedAt: Date;
deletedAt?: Date;
Expand All @@ -95,22 +80,16 @@ export interface SharedUserDto {
}

export class UserSettingDto {
visibilityPrivacy: USER_VISIBILITY_PRIVACY;
userId: string;
invitationPrivacy: USER_INVITATION_PRIVACY;
directMessagePrivacy?: USER_DIRECT_MESSAGE_PRIVACY;
directMessagePrivacy: USER_DIRECT_MESSAGE_PRIVACY;
language: LANGUAGE;
/**
* @note this field is required in the next major release.
*/
showOwnedCommunities?: boolean;
/**
* @note this field is required in the next major release.
*/
showJoinedCommunities?: boolean;
/**
* @note this field is required in the next major release.
*/
showContent?: boolean;
showOwnedCommunities: boolean;
showJoinedCommunities: boolean;
showContent: boolean;
showPersonalInfo: boolean;
createdAt?: Date;
updatedAt?: Date;
}

export class UserPublicInfoDto {
Expand Down