diff options
Diffstat (limited to 'shared/models/users')
-rw-r--r-- | shared/models/users/index.ts | 2 | ||||
-rw-r--r-- | shared/models/users/registration/index.ts | 5 | ||||
-rw-r--r-- | shared/models/users/registration/user-register.model.ts (renamed from shared/models/users/user-register.model.ts) | 0 | ||||
-rw-r--r-- | shared/models/users/registration/user-registration-request.model.ts | 5 | ||||
-rw-r--r-- | shared/models/users/registration/user-registration-state.model.ts | 5 | ||||
-rw-r--r-- | shared/models/users/registration/user-registration-update-state.model.ts | 3 | ||||
-rw-r--r-- | shared/models/users/registration/user-registration.model.ts | 29 | ||||
-rw-r--r-- | shared/models/users/user-notification.model.ts | 9 | ||||
-rw-r--r-- | shared/models/users/user-right.enum.ts | 4 |
9 files changed, 59 insertions, 3 deletions
diff --git a/shared/models/users/index.ts b/shared/models/users/index.ts index 32f7a441c..4a050c870 100644 --- a/shared/models/users/index.ts +++ b/shared/models/users/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './registration' | ||
1 | export * from './two-factor-enable-result.model' | 2 | export * from './two-factor-enable-result.model' |
2 | export * from './user-create-result.model' | 3 | export * from './user-create-result.model' |
3 | export * from './user-create.model' | 4 | export * from './user-create.model' |
@@ -6,7 +7,6 @@ export * from './user-login.model' | |||
6 | export * from './user-notification-setting.model' | 7 | export * from './user-notification-setting.model' |
7 | export * from './user-notification.model' | 8 | export * from './user-notification.model' |
8 | export * from './user-refresh-token.model' | 9 | export * from './user-refresh-token.model' |
9 | export * from './user-register.model' | ||
10 | export * from './user-right.enum' | 10 | export * from './user-right.enum' |
11 | export * from './user-role' | 11 | export * from './user-role' |
12 | export * from './user-scoped-token' | 12 | export * from './user-scoped-token' |
diff --git a/shared/models/users/registration/index.ts b/shared/models/users/registration/index.ts new file mode 100644 index 000000000..593740c4f --- /dev/null +++ b/shared/models/users/registration/index.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export * from './user-register.model' | ||
2 | export * from './user-registration-request.model' | ||
3 | export * from './user-registration-state.model' | ||
4 | export * from './user-registration-update-state.model' | ||
5 | export * from './user-registration.model' | ||
diff --git a/shared/models/users/user-register.model.ts b/shared/models/users/registration/user-register.model.ts index cf9a43a67..cf9a43a67 100644 --- a/shared/models/users/user-register.model.ts +++ b/shared/models/users/registration/user-register.model.ts | |||
diff --git a/shared/models/users/registration/user-registration-request.model.ts b/shared/models/users/registration/user-registration-request.model.ts new file mode 100644 index 000000000..6c38817e0 --- /dev/null +++ b/shared/models/users/registration/user-registration-request.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | import { UserRegister } from './user-register.model' | ||
2 | |||
3 | export interface UserRegistrationRequest extends UserRegister { | ||
4 | registrationReason: string | ||
5 | } | ||
diff --git a/shared/models/users/registration/user-registration-state.model.ts b/shared/models/users/registration/user-registration-state.model.ts new file mode 100644 index 000000000..e4c835f78 --- /dev/null +++ b/shared/models/users/registration/user-registration-state.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export const enum UserRegistrationState { | ||
2 | PENDING = 1, | ||
3 | REJECTED = 2, | ||
4 | ACCEPTED = 3 | ||
5 | } | ||
diff --git a/shared/models/users/registration/user-registration-update-state.model.ts b/shared/models/users/registration/user-registration-update-state.model.ts new file mode 100644 index 000000000..636e22c32 --- /dev/null +++ b/shared/models/users/registration/user-registration-update-state.model.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export interface UserRegistrationUpdateState { | ||
2 | moderationResponse: string | ||
3 | } | ||
diff --git a/shared/models/users/registration/user-registration.model.ts b/shared/models/users/registration/user-registration.model.ts new file mode 100644 index 000000000..0d74dc28b --- /dev/null +++ b/shared/models/users/registration/user-registration.model.ts | |||
@@ -0,0 +1,29 @@ | |||
1 | import { UserRegistrationState } from './user-registration-state.model' | ||
2 | |||
3 | export interface UserRegistration { | ||
4 | id: number | ||
5 | |||
6 | state: { | ||
7 | id: UserRegistrationState | ||
8 | label: string | ||
9 | } | ||
10 | |||
11 | registrationReason: string | ||
12 | moderationResponse: string | ||
13 | |||
14 | username: string | ||
15 | email: string | ||
16 | emailVerified: boolean | ||
17 | |||
18 | accountDisplayName: string | ||
19 | |||
20 | channelHandle: string | ||
21 | channelDisplayName: string | ||
22 | |||
23 | createdAt: Date | ||
24 | updatedAt: Date | ||
25 | |||
26 | user?: { | ||
27 | id: number | ||
28 | } | ||
29 | } | ||
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts index 0fd7a7181..294c921bd 100644 --- a/shared/models/users/user-notification.model.ts +++ b/shared/models/users/user-notification.model.ts | |||
@@ -32,7 +32,9 @@ export const enum UserNotificationType { | |||
32 | NEW_PLUGIN_VERSION = 17, | 32 | NEW_PLUGIN_VERSION = 17, |
33 | NEW_PEERTUBE_VERSION = 18, | 33 | NEW_PEERTUBE_VERSION = 18, |
34 | 34 | ||
35 | MY_VIDEO_STUDIO_EDITION_FINISHED = 19 | 35 | MY_VIDEO_STUDIO_EDITION_FINISHED = 19, |
36 | |||
37 | NEW_USER_REGISTRATION_REQUEST = 20 | ||
36 | } | 38 | } |
37 | 39 | ||
38 | export interface VideoInfo { | 40 | export interface VideoInfo { |
@@ -126,6 +128,11 @@ export interface UserNotification { | |||
126 | latestVersion: string | 128 | latestVersion: string |
127 | } | 129 | } |
128 | 130 | ||
131 | registration?: { | ||
132 | id: number | ||
133 | username: string | ||
134 | } | ||
135 | |||
129 | createdAt: string | 136 | createdAt: string |
130 | updatedAt: string | 137 | updatedAt: string |
131 | } | 138 | } |
diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 9c6828aa5..42e5c8cd6 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts | |||
@@ -43,5 +43,7 @@ export const enum UserRight { | |||
43 | MANAGE_VIDEO_FILES = 25, | 43 | MANAGE_VIDEO_FILES = 25, |
44 | RUN_VIDEO_TRANSCODING = 26, | 44 | RUN_VIDEO_TRANSCODING = 26, |
45 | 45 | ||
46 | MANAGE_VIDEO_IMPORTS = 27 | 46 | MANAGE_VIDEO_IMPORTS = 27, |
47 | |||
48 | MANAGE_REGISTRATIONS = 28 | ||
47 | } | 49 | } |