Skip to content

Commit

Permalink
api: Add UserConsolePreferences proto message definition
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspcr committed Mar 4, 2024
1 parent 914a946 commit 1659c5d
Show file tree
Hide file tree
Showing 12 changed files with 3,124 additions and 541 deletions.
1 change: 1 addition & 0 deletions api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ lint:
- ttn/lorawan/v3/metadata.proto
- ttn/lorawan/v3/notification_service.proto
- ttn/lorawan/v3/rights.proto
- ttn/lorawan/v3/user.proto
FIELD_LOWER_SNAKE_CASE:
- ttn/lorawan/v3/applicationserver_integrations_alcsync.proto
FILE_LOWER_SNAKE_CASE:
Expand Down
75 changes: 75 additions & 0 deletions api/ttn/lorawan/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,15 @@
- [Message `UpdateUserRequest`](#ttn.lorawan.v3.UpdateUserRequest)
- [Message `User`](#ttn.lorawan.v3.User)
- [Message `User.AttributesEntry`](#ttn.lorawan.v3.User.AttributesEntry)
- [Message `UserConsolePreferences`](#ttn.lorawan.v3.UserConsolePreferences)
- [Message `UserConsolePreferences.DashboardLayouts`](#ttn.lorawan.v3.UserConsolePreferences.DashboardLayouts)
- [Message `UserConsolePreferences.SortBy`](#ttn.lorawan.v3.UserConsolePreferences.SortBy)
- [Message `UserSession`](#ttn.lorawan.v3.UserSession)
- [Message `UserSessionIdentifiers`](#ttn.lorawan.v3.UserSessionIdentifiers)
- [Message `UserSessions`](#ttn.lorawan.v3.UserSessions)
- [Message `Users`](#ttn.lorawan.v3.Users)
- [Enum `ConsoleTheme`](#ttn.lorawan.v3.ConsoleTheme)
- [Enum `DashboardLayout`](#ttn.lorawan.v3.DashboardLayout)
- [File `ttn/lorawan/v3/user_services.proto`](#ttn/lorawan/v3/user_services.proto)
- [Service `UserAccess`](#ttn.lorawan.v3.UserAccess)
- [Service `UserInvitationRegistry`](#ttn.lorawan.v3.UserInvitationRegistry)
Expand Down Expand Up @@ -10834,6 +10839,7 @@ User is the message that defines a user on the network.
| `temporary_password_created_at` | [`google.protobuf.Timestamp`](#google.protobuf.Timestamp) | | |
| `temporary_password_expires_at` | [`google.protobuf.Timestamp`](#google.protobuf.Timestamp) | | |
| `profile_picture` | [`Picture`](#ttn.lorawan.v3.Picture) | | A profile picture for the user. This information is public and can be seen by any authenticated user in the network. |
| `console_preferences` | [`UserConsolePreferences`](#ttn.lorawan.v3.UserConsolePreferences) | | Console preferences contains the user's preferences regarding the behavior of the Console. |

#### Field Rules

Expand All @@ -10857,6 +10863,55 @@ User is the message that defines a user on the network.
| `key` | [`string`](#string) | | |
| `value` | [`string`](#string) | | |

### <a name="ttn.lorawan.v3.UserConsolePreferences">Message `UserConsolePreferences`</a>

UserConsolePreferences is the message that defines the user preferences for the Console.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `console_theme` | [`ConsoleTheme`](#ttn.lorawan.v3.ConsoleTheme) | | |
| `dashboard_layouts` | [`UserConsolePreferences.DashboardLayouts`](#ttn.lorawan.v3.UserConsolePreferences.DashboardLayouts) | | |
| `sort_by` | [`UserConsolePreferences.SortBy`](#ttn.lorawan.v3.UserConsolePreferences.SortBy) | | |

### <a name="ttn.lorawan.v3.UserConsolePreferences.DashboardLayouts">Message `UserConsolePreferences.DashboardLayouts`</a>

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `api_key` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `application` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `collaborator` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `end_device` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `gateway` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `organization` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `overview` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |
| `user` | [`DashboardLayout`](#ttn.lorawan.v3.DashboardLayout) | | |

### <a name="ttn.lorawan.v3.UserConsolePreferences.SortBy">Message `UserConsolePreferences.SortBy`</a>

SortBy defines the field to which the Console will sort the display of entities.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `api_key` | [`string`](#string) | | |
| `application` | [`string`](#string) | | |
| `collaborator` | [`string`](#string) | | |
| `end_device` | [`string`](#string) | | |
| `gateway` | [`string`](#string) | | |
| `organization` | [`string`](#string) | | |
| `user` | [`string`](#string) | | |

#### Field Rules

| Field | Validations |
| ----- | ----------- |
| `api_key` | <p>`string.in`: `[ api_key_id -api_key_id name -name created_at -created_at expires_at -expires_at]`</p> |
| `application` | <p>`string.in`: `[ application_id -application_id name -name created_at -created_at]`</p> |
| `collaborator` | <p>`string.in`: `[ id -id rights -rights]`</p> |
| `end_device` | <p>`string.in`: `[ device_id -device_id join_eui -join_eui dev_eui -dev_eui name -name description -description created_at -created_at last_seen_at -last_seen_at]`</p> |
| `gateway` | <p>`string.in`: `[ gateway_id -gateway_id gateway_eui -gateway_eui name -name created_at -created_at]`</p> |
| `organization` | <p>`string.in`: `[ organization_id -organization_id name -name created_at -created_at]`</p> |
| `user` | <p>`string.in`: `[ user_id -user_id name -name primary_email_address -primary_email_address state -state admin -admin created_at -created_at]`</p> |

### <a name="ttn.lorawan.v3.UserSession">Message `UserSession`</a>

| Field | Type | Label | Description |
Expand Down Expand Up @@ -10901,6 +10956,26 @@ User is the message that defines a user on the network.
| ----- | ---- | ----- | ----------- |
| `users` | [`User`](#ttn.lorawan.v3.User) | repeated | |

### <a name="ttn.lorawan.v3.ConsoleTheme">Enum `ConsoleTheme`</a>

ConsoleTheme is the theme of the Console.

| Name | Number | Description |
| ---- | ------ | ----------- |
| `CONSOLE_THEME_SYSTEM` | 0 | The user prefers the system mode. |
| `CONSOLE_THEME_LIGHT` | 1 | The user prefers the light mode. |
| `CONSOLE_THEME_DARK` | 2 | The user prefers the dark mode. |

### <a name="ttn.lorawan.v3.DashboardLayout">Enum `DashboardLayout`</a>

DashboardLayout is a set of possible layout values to be used in the Console.

| Name | Number | Description |
| ---- | ------ | ----------- |
| `DASHBOARD_LAYOUT_TABLE` | 0 | |
| `DASHBOARD_LAYOUT_LIST` | 1 | |
| `DASHBOARD_LAYOUT_GRID` | 2 | |

## <a name="ttn/lorawan/v3/user_services.proto">File `ttn/lorawan/v3/user_services.proto`</a>

### <a name="ttn.lorawan.v3.UserAccess">Service `UserAccess`</a>
Expand Down
99 changes: 99 additions & 0 deletions api/ttn/lorawan/v3/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16535,6 +16535,62 @@
"UplinkMessageRxMetadataRelayMetadata": {
"type": "object"
},
"UserConsolePreferencesDashboardLayouts": {
"type": "object",
"properties": {
"api_key": {
"$ref": "#/definitions/v3DashboardLayout"
},
"application": {
"$ref": "#/definitions/v3DashboardLayout"
},
"collaborator": {
"$ref": "#/definitions/v3DashboardLayout"
},
"end_device": {
"$ref": "#/definitions/v3DashboardLayout"
},
"gateway": {
"$ref": "#/definitions/v3DashboardLayout"
},
"organization": {
"$ref": "#/definitions/v3DashboardLayout"
},
"overview": {
"$ref": "#/definitions/v3DashboardLayout"
},
"user": {
"$ref": "#/definitions/v3DashboardLayout"
}
}
},
"UserConsolePreferencesSortBy": {
"type": "object",
"properties": {
"api_key": {
"type": "string"
},
"application": {
"type": "string"
},
"collaborator": {
"type": "string"
},
"end_device": {
"type": "string"
},
"gateway": {
"type": "string"
},
"organization": {
"type": "string"
},
"user": {
"type": "string"
}
},
"description": "SortBy defines the field to which the Console will sort the display of entities."
},
"UserRegistrationAdminApproval": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -19829,6 +19885,16 @@
}
}
},
"v3ConsoleTheme": {
"type": "string",
"enum": [
"CONSOLE_THEME_SYSTEM",
"CONSOLE_THEME_LIGHT",
"CONSOLE_THEME_DARK"
],
"default": "CONSOLE_THEME_SYSTEM",
"description": "ConsoleTheme is the theme of the Console.\n\n - CONSOLE_THEME_SYSTEM: The user prefers the system mode.\n - CONSOLE_THEME_LIGHT: The user prefers the light mode.\n - CONSOLE_THEME_DARK: The user prefers the dark mode."
},
"v3ContactInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -19985,6 +20051,16 @@
}
}
},
"v3DashboardLayout": {
"type": "string",
"enum": [
"DASHBOARD_LAYOUT_TABLE",
"DASHBOARD_LAYOUT_LIST",
"DASHBOARD_LAYOUT_GRID"
],
"default": "DASHBOARD_LAYOUT_TABLE",
"description": "DashboardLayout is a set of possible layout values to be used in the Console."
},
"v3DataRate": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -26062,6 +26138,10 @@
"profile_picture": {
"$ref": "#/definitions/v3Picture",
"description": "A profile picture for the user.\nThis information is public and can be seen by any authenticated user in the network."
},
"console_preferences": {
"$ref": "#/definitions/v3UserConsolePreferences",
"description": "Console preferences contains the user's preferences regarding the behavior of the Console."
}
},
"description": "User is the message that defines a user on the network."
Expand Down Expand Up @@ -26143,6 +26223,21 @@
}
}
},
"v3UserConsolePreferences": {
"type": "object",
"properties": {
"console_theme": {
"$ref": "#/definitions/v3ConsoleTheme"
},
"dashboard_layouts": {
"$ref": "#/definitions/UserConsolePreferencesDashboardLayouts"
},
"sort_by": {
"$ref": "#/definitions/UserConsolePreferencesSortBy"
}
},
"description": "UserConsolePreferences is the message that defines the user preferences for the Console."
},
"v3UserIdentifiers": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -26258,6 +26353,10 @@
"profile_picture": {
"$ref": "#/definitions/v3Picture",
"description": "A profile picture for the user.\nThis information is public and can be seen by any authenticated user in the network."
},
"console_preferences": {
"$ref": "#/definitions/v3UserConsolePreferences",
"description": "Console preferences contains the user's preferences regarding the behavior of the Console."
}
},
"description": "User is the message that defines a user on the network."
Expand Down
Loading

0 comments on commit 1659c5d

Please sign in to comment.