diff --git a/ce/docs/EntityDataDiff.md b/ce/docs/EntityDataDiff.md index 2c00b6e0..15e19861 100644 --- a/ce/docs/EntityDataDiff.md +++ b/ce/docs/EntityDataDiff.md @@ -227,7 +227,6 @@ | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### Output | Name | Type | Description | Notes | @@ -288,21 +287,6 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | Unique identifier of the note on the canvas | [optional] | -| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | -| width | Integer | Width of the note, in pixels | [optional] | -| height | Integer | Height of the note, in pixels | [optional] | -| content | String | Markdown or HTML content of the note | [optional] | -| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| borderWidth | Integer | Border width of the note in pixels | [optional] | -| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdownCss | String | Custom CSS styles applied to the note content | [optional] | - #### AttributeScope (enum) `CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` diff --git a/ce/docs/EntityExportData.md b/ce/docs/EntityExportData.md index 12a8e3be..2188cb4a 100644 --- a/ce/docs/EntityExportData.md +++ b/ce/docs/EntityExportData.md @@ -146,7 +146,6 @@ Base export container for ThingsBoard entities | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` @@ -267,21 +266,6 @@ Base export container for ThingsBoard entities | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | Unique identifier of the note on the canvas | [optional] | -| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | -| width | Integer | Width of the note, in pixels | [optional] | -| height | Integer | Height of the note, in pixels | [optional] | -| content | String | Markdown or HTML content of the note | [optional] | -| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| borderWidth | Integer | Border width of the note in pixels | [optional] | -| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdownCss | String | Custom CSS styles applied to the note content | [optional] | - #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/OAuth2Client.md b/ce/docs/OAuth2Client.md index 91e3bb26..1919a197 100644 --- a/ce/docs/OAuth2Client.md +++ b/ce/docs/OAuth2Client.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| | **id** | **OAuth2ClientId** | | [optional] | | **createdTime** | **Long** | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | -| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional info of OAuth2 client (e.g. providerName) | | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional info of OAuth2 client. Must include: 'providerName' (string, name of the OAuth2 provider). | | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] | | **title** | **String** | Oauth2 client title | | | **mapperConfig** | **OAuth2MapperConfig** | Config for mapping OAuth2 log in response to platform entities | | diff --git a/ce/docs/RuleChainData.md b/ce/docs/RuleChainData.md index c4f06201..472f3213 100644 --- a/ce/docs/RuleChainData.md +++ b/ce/docs/RuleChainData.md @@ -42,7 +42,6 @@ A JSON value representing the rule chains. | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### RuleChainType (enum) `CORE` | `EDGE` @@ -79,21 +78,6 @@ A JSON value representing the rule chains. | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | Unique identifier of the note on the canvas | [optional] | -| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | -| width | Integer | Width of the note, in pixels | [optional] | -| height | Integer | Height of the note, in pixels | [optional] | -| content | String | Markdown or HTML content of the note | [optional] | -| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| borderWidth | Integer | Border width of the note in pixels | [optional] | -| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdownCss | String | Custom CSS styles applied to the note content | [optional] | - #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/RuleChainExportData.md b/ce/docs/RuleChainExportData.md index 1a592354..953cc733 100644 --- a/ce/docs/RuleChainExportData.md +++ b/ce/docs/RuleChainExportData.md @@ -35,7 +35,6 @@ | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### ExportableEntity | Name | Type | Description | Notes | @@ -117,21 +116,6 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | Unique identifier of the note on the canvas | [optional] | -| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | -| width | Integer | Width of the note, in pixels | [optional] | -| height | Integer | Height of the note, in pixels | [optional] | -| content | String | Markdown or HTML content of the note | [optional] | -| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| borderWidth | Integer | Border width of the note in pixels | [optional] | -| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdownCss | String | Custom CSS styles applied to the note content | [optional] | - #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` diff --git a/ce/docs/RuleChainMetaData.md b/ce/docs/RuleChainMetaData.md index d436010c..afb9b650 100644 --- a/ce/docs/RuleChainMetaData.md +++ b/ce/docs/RuleChainMetaData.md @@ -15,7 +15,6 @@ A JSON value representing the rule chain metadata. | **nodes** | **List\** | List of rule node JSON objects | | | **connections** | **List\** | List of JSON objects that represent connections between rule nodes | | | **ruleChainConnections** | **List\** | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| **notes** | **List\** | List of sticky notes placed on the rule chain canvas | [optional] | @@ -55,21 +54,6 @@ A JSON value representing the rule chain metadata. | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | Unique identifier of the note on the canvas | [optional] | -| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | -| width | Integer | Width of the note, in pixels | [optional] | -| height | Integer | Height of the note, in pixels | [optional] | -| content | String | Markdown or HTML content of the note | [optional] | -| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| borderWidth | Integer | Border width of the note in pixels | [optional] | -| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdownCss | String | Custom CSS styles applied to the note content | [optional] | - #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/RuleChainNote.md b/ce/docs/RuleChainNote.md deleted file mode 100644 index 09b6dacc..00000000 --- a/ce/docs/RuleChainNote.md +++ /dev/null @@ -1,32 +0,0 @@ - -# RuleChainNote - -`org.thingsboard.client.model.RuleChainNote` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **String** | Unique identifier of the note on the canvas | [optional] | -| **x** | **Integer** | Horizontal position of the note on the canvas, in pixels | [optional] | -| **y** | **Integer** | Vertical position of the note on the canvas, in pixels | [optional] | -| **width** | **Integer** | Width of the note, in pixels | [optional] | -| **height** | **Integer** | Height of the note, in pixels | [optional] | -| **content** | **String** | Markdown or HTML content of the note | [optional] | -| **backgroundColor** | **String** | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| **borderColor** | **String** | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| **borderWidth** | **Integer** | Border width of the note in pixels | [optional] | -| **applyDefaultMarkdownStyle** | **Boolean** | Whether to apply the default markdown stylesheet to the note content | [optional] | -| **markdownCss** | **String** | Custom CSS styles applied to the note content | [optional] | - - - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/ce/docs/UserControllerApi.md b/ce/docs/UserControllerApi.md index 8b397997..e7119abb 100644 --- a/ce/docs/UserControllerApi.md +++ b/ce/docs/UserControllerApi.md @@ -11,10 +11,10 @@ String getActivationLink(@Nonnull String userId) // Get activation link (getActi UserActivationLink getActivationLinkInfo(@Nonnull String userId) // Get activation link info (getActivationLinkInfo) PageDataUser getCustomerUsers(@Nonnull String customerId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Customer Users (getCustomerUsers) com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() // Get user settings (getGeneralUserSettings) +UserDashboardsInfo getLastVisitedDashboards() // Get information about last visited and starred dashboards (getLastVisitedDashboards) MobileSessionInfo getMobileSession(@Nonnull String xMobileToken) // getMobileSession PageDataUser getTenantAdmins(@Nonnull String tenantId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Tenant Users (getTenantAdmins) User getUserById(@Nonnull String userId) // Get User (getUserById) -UserDashboardsInfo getUserDashboardsInfo() // Get information about last visited and starred dashboards (getUserDashboardsInfo) com.fasterxml.jackson.databind.JsonNode getUserSettings(@Nonnull String type) // Get user settings (getUserSettings) JwtPair getUserToken(@Nonnull String userId) // Get User Token (getUserToken) PageDataUser getUsers(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Users (getUsers) @@ -228,6 +228,23 @@ Fetch the User settings based on authorized user. **com.fasterxml.jackson.databind.JsonNode** +## getLastVisitedDashboards + +``` +UserDashboardsInfo getLastVisitedDashboards() +``` + +**GET** `/api/user/lastVisitedDashboards` + +Get information about last visited and starred dashboards (getLastVisitedDashboards) + +Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + +### Return type + +**UserDashboardsInfo** + + ## getMobileSession ``` @@ -303,23 +320,6 @@ Fetch the User object based on the provided User Id. If the user has the authori **User** -## getUserDashboardsInfo - -``` -UserDashboardsInfo getUserDashboardsInfo() -``` - -**GET** `/api/user/dashboards` - -Get information about last visited and starred dashboards (getUserDashboardsInfo) - -Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - -### Return type - -**UserDashboardsInfo** - - ## getUserSettings ``` diff --git a/ce/docs/WidgetTypeControllerApi.md b/ce/docs/WidgetTypeControllerApi.md index c615f787..943c65a9 100644 --- a/ce/docs/WidgetTypeControllerApi.md +++ b/ce/docs/WidgetTypeControllerApi.md @@ -70,7 +70,7 @@ Returns an array of Widget Type fqns that belong to specified Widget Bundle. Av List getBundleWidgetTypes(@Nonnull String widgetsBundleId) ``` -**GET** `/api/widgetsBundles/{widgetsBundleId}/widgetTypes` +**GET** `/api/widgetsBundle/{widgetsBundleId}/widgetTypes` Get all Widget types for specified Bundle (getBundleWidgetTypes) diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index e5f9d013..a5adb2f5 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -75242,14 +75242,34 @@ ] } }, - "/api/user/dashboards": { + "/api/user/dashboards/{dashboardId}/{action}": { "get": { "tags": [ "user-controller" ], - "summary": "Get information about last visited and starred dashboards (getUserDashboardsInfo)", - "description": "Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getUserDashboardsInfo", + "summary": "Report action of User over the dashboard (reportUserDashboardAction)", + "description": "Report action of User over the dashboard. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "reportUserDashboardAction", + "parameters": [ + { + "name": "dashboardId", + "in": "path", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "action", + "in": "path", + "description": "Dashboard action, one of: \"visit\", \"star\" or \"unstar\".", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -75377,34 +75397,14 @@ ] } }, - "/api/user/dashboards/{dashboardId}/{action}": { + "/api/user/lastVisitedDashboards": { "get": { "tags": [ "user-controller" ], - "summary": "Report action of User over the dashboard (reportUserDashboardAction)", - "description": "Report action of User over the dashboard. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "reportUserDashboardAction", - "parameters": [ - { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "action", - "in": "path", - "description": "Dashboard action, one of: \"visit\", \"star\" or \"unstar\".", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get information about last visited and starred dashboards (getLastVisitedDashboards)", + "description": "Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLastVisitedDashboards", "responses": { "200": { "description": "OK", @@ -80381,7 +80381,7 @@ ] } }, - "/api/widgetsBundles/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { "get": { "tags": [ "widget-type-controller" @@ -80528,21 +80528,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle": { + }, "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", - "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error.\n\nWidget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveWidgetsBundle", + "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", + "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetTypes", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WidgetsBundle" + "type": "array", + "description": "Ordered list of widget type Ids to be included by widgets bundle", + "items": { + "type": "string" + } } } }, @@ -80550,14 +80563,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WidgetsBundle" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -80675,34 +80681,24 @@ ] } }, - "/api/widgetsBundle/{widgetsBundleId}": { - "get": { + "/api/widgetsBundle": { + "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Get Widget Bundle (getWidgetsBundleById)", - "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundleById", - "parameters": [ - { - "name": "widgetsBundleId", - "in": "path", - "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", + "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error.\n\nWidget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveWidgetsBundle", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -80726,7 +80722,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80828,14 +80824,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/widgetsBundle/{widgetsBundleId}": { + "get": { "tags": [ "widgets-bundle-controller" ], - "summary": "Delete widgets bundle (deleteWidgetsBundle)", - "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteWidgetsBundle", + "summary": "Get Widget Bundle (getWidgetsBundleById)", + "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundleById", "parameters": [ { "name": "widgetsBundleId", @@ -80845,11 +80843,27 @@ "schema": { "type": "string" } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } }, "400": { "description": "Bad Request", @@ -80965,16 +80979,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { - "post": { + }, + "delete": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", - "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetFqns", + "summary": "Delete widgets bundle (deleteWidgetsBundle)", + "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteWidgetsBundle", "parameters": [ { "name": "widgetsBundleId", @@ -80986,20 +80998,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "Ordered list of widget type FQNs to be included by widgets bundle", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -81016,7 +81014,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -81120,14 +81118,14 @@ ] } }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", - "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetTypes", + "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", + "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetFqns", "parameters": [ { "name": "widgetsBundleId", @@ -81144,7 +81142,7 @@ "application/json": { "schema": { "type": "array", - "description": "Ordered list of widget type Ids to be included by widgets bundle", + "description": "Ordered list of widget type FQNs to be included by widgets bundle", "items": { "type": "string" } @@ -92130,7 +92128,10 @@ }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", - "description": "Additional info of OAuth2 client (e.g. providerName)" + "description": "Additional info of OAuth2 client. Must include: 'providerName' (string, name of the OAuth2 provider).", + "example": { + "providerName": "Google" + } }, "tenantId": { "$ref": "#/components/schemas/TenantId", @@ -95939,13 +95940,6 @@ "items": { "$ref": "#/components/schemas/RuleChainConnectionInfo" } - }, - "notes": { - "type": "array", - "description": "List of sticky notes placed on the rule chain canvas", - "items": { - "$ref": "#/components/schemas/RuleChainNote" - } } }, "required": [ @@ -95956,60 +95950,6 @@ "ruleChainId" ] }, - "RuleChainNote": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the note on the canvas" - }, - "x": { - "type": "integer", - "format": "int32", - "description": "Horizontal position of the note on the canvas, in pixels" - }, - "y": { - "type": "integer", - "format": "int32", - "description": "Vertical position of the note on the canvas, in pixels" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Width of the note, in pixels" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Height of the note, in pixels" - }, - "content": { - "type": "string", - "description": "Markdown or HTML content of the note" - }, - "backgroundColor": { - "type": "string", - "description": "Background color of the note in CSS hex format, e.g. '#FFF9C4'" - }, - "borderColor": { - "type": "string", - "description": "Border color of the note in CSS hex format, e.g. '#E6C800'" - }, - "borderWidth": { - "type": "integer", - "format": "int32", - "description": "Border width of the note in pixels" - }, - "applyDefaultMarkdownStyle": { - "type": "boolean", - "description": "Whether to apply the default markdown stylesheet to the note content" - }, - "markdownCss": { - "type": "string", - "description": "Custom CSS styles applied to the note content" - } - } - }, "RuleChainOutputLabelsUsage": { "type": "object", "properties": { diff --git a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 90d16a35..c30cd6cf 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -14702,7 +14702,7 @@ private HttpRequest.Builder getBundleWidgetTypesRequestBuilder(@Nonnull String w throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypes"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" + String localVarPath = "/api/widgetsBundle/{widgetsBundleId}/widgetTypes" .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Accept", "application/json"); @@ -21965,6 +21965,76 @@ private HttpRequest.Builder getJwtSettingsRequestBuilder(Map hea return localVarRequestBuilder; } + /** + * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @return UserDashboardsInfo + * @throws ApiException if fails to make API call + */ + public UserDashboardsInfo getLastVisitedDashboards() throws ApiException { + ApiResponse localVarResponse = getLastVisitedDashboardsWithHttpInfo(null); + return localVarResponse.getData(); + } + + /** + * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param headers Optional headers to include in the request + * @return ApiResponse<UserDashboardsInfo> + * @throws ApiException if fails to make API call + */ + public ApiResponse getLastVisitedDashboardsWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getLastVisitedDashboardsRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getLastVisitedDashboards", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + UserDashboardsInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getLastVisitedDashboardsRequestBuilder(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/user/lastVisitedDashboards"; + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) * Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. @@ -31630,76 +31700,6 @@ private HttpRequest.Builder getUserByIdRequestBuilder(@Nonnull String userId, Ma return localVarRequestBuilder; } - /** - * Get information about last visited and starred dashboards (getUserDashboardsInfo) - * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @return UserDashboardsInfo - * @throws ApiException if fails to make API call - */ - public UserDashboardsInfo getUserDashboardsInfo() throws ApiException { - ApiResponse localVarResponse = getUserDashboardsInfoWithHttpInfo(null); - return localVarResponse.getData(); - } - - /** - * Get information about last visited and starred dashboards (getUserDashboardsInfo) - * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param headers Optional headers to include in the request - * @return ApiResponse<UserDashboardsInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getUserDashboardsInfoWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getUserDashboardsInfoRequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getUserDashboardsInfo", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); - } - String responseBody = new String(localVarResponseBody.readAllBytes()); - UserDashboardsInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getUserDashboardsInfoRequestBuilder(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/user/dashboards"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get user mobile app basic info (getUserMobileInfo) * Available for any authorized user. diff --git a/ce/src/main/java/org/thingsboard/client/model/OAuth2Client.java b/ce/src/main/java/org/thingsboard/client/model/OAuth2Client.java index be1d1feb..d3802743 100644 --- a/ce/src/main/java/org/thingsboard/client/model/OAuth2Client.java +++ b/ce/src/main/java/org/thingsboard/client/model/OAuth2Client.java @@ -199,7 +199,7 @@ public OAuth2Client additionalInfo(@Nonnull com.fasterxml.jackson.databind.JsonN } /** - * Additional info of OAuth2 client (e.g. providerName) + * Additional info of OAuth2 client. Must include: 'providerName' (string, name of the OAuth2 provider). * @return additionalInfo */ @Nonnull diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java index 17ba1d11..5356f0f7 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java @@ -35,7 +35,6 @@ import org.thingsboard.client.model.NodeConnectionInfo; import org.thingsboard.client.model.RuleChainConnectionInfo; import org.thingsboard.client.model.RuleChainId; -import org.thingsboard.client.model.RuleChainNote; import org.thingsboard.client.model.RuleNode; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -50,8 +49,7 @@ RuleChainMetaData.JSON_PROPERTY_FIRST_NODE_INDEX, RuleChainMetaData.JSON_PROPERTY_NODES, RuleChainMetaData.JSON_PROPERTY_CONNECTIONS, - RuleChainMetaData.JSON_PROPERTY_RULE_CHAIN_CONNECTIONS, - RuleChainMetaData.JSON_PROPERTY_NOTES + RuleChainMetaData.JSON_PROPERTY_RULE_CHAIN_CONNECTIONS }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class RuleChainMetaData { @@ -79,10 +77,6 @@ public class RuleChainMetaData { @Nonnull private List ruleChainConnections = new ArrayList<>(); - public static final String JSON_PROPERTY_NOTES = "notes"; - @Nullable - private List notes = new ArrayList<>(); - public RuleChainMetaData() { } @@ -252,38 +246,6 @@ public void setRuleChainConnections(@Nonnull List ruleC } - public RuleChainMetaData notes(@Nullable List notes) { - this.notes = notes; - return this; - } - - public RuleChainMetaData addNotesItem(RuleChainNote notesItem) { - if (this.notes == null) { - this.notes = new ArrayList<>(); - } - this.notes.add(notesItem); - return this; - } - - /** - * List of sticky notes placed on the rule chain canvas - * @return notes - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_NOTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotes() { - return notes; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotes(@Nullable List notes) { - this.notes = notes; - } - - /** * Return true if this RuleChainMetaData object is equal to o. */ @@ -301,13 +263,12 @@ public boolean equals(Object o) { Objects.equals(this.firstNodeIndex, ruleChainMetaData.firstNodeIndex) && Objects.equals(this.nodes, ruleChainMetaData.nodes) && Objects.equals(this.connections, ruleChainMetaData.connections) && - Objects.equals(this.ruleChainConnections, ruleChainMetaData.ruleChainConnections) && - Objects.equals(this.notes, ruleChainMetaData.notes); + Objects.equals(this.ruleChainConnections, ruleChainMetaData.ruleChainConnections); } @Override public int hashCode() { - return Objects.hash(ruleChainId, version, firstNodeIndex, nodes, connections, ruleChainConnections, notes); + return Objects.hash(ruleChainId, version, firstNodeIndex, nodes, connections, ruleChainConnections); } @Override @@ -320,7 +281,6 @@ public String toString() { sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); sb.append(" ruleChainConnections: ").append(toIndentedString(ruleChainConnections)).append("\n"); - sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -413,16 +373,6 @@ public String toUrlQueryString(String prefix) { } } - // add `notes` to the URL query string - if (getNotes() != null) { - for (int i = 0; i < getNotes().size(); i++) { - if (getNotes().get(i) != null) { - joiner.add(getNotes().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%snotes%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java deleted file mode 100644 index 13dd34b3..00000000 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java +++ /dev/null @@ -1,515 +0,0 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.thingsboard.client.model; - -import javax.annotation.Generated; -import javax.annotation.Nullable; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * RuleChainNote - */ -@JsonPropertyOrder({ - RuleChainNote.JSON_PROPERTY_ID, - RuleChainNote.JSON_PROPERTY_X, - RuleChainNote.JSON_PROPERTY_Y, - RuleChainNote.JSON_PROPERTY_WIDTH, - RuleChainNote.JSON_PROPERTY_HEIGHT, - RuleChainNote.JSON_PROPERTY_CONTENT, - RuleChainNote.JSON_PROPERTY_BACKGROUND_COLOR, - RuleChainNote.JSON_PROPERTY_BORDER_COLOR, - RuleChainNote.JSON_PROPERTY_BORDER_WIDTH, - RuleChainNote.JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, - RuleChainNote.JSON_PROPERTY_MARKDOWN_CSS -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class RuleChainNote { - public static final String JSON_PROPERTY_ID = "id"; - @Nullable - private String id; - - public static final String JSON_PROPERTY_X = "x"; - @Nullable - private Integer x; - - public static final String JSON_PROPERTY_Y = "y"; - @Nullable - private Integer y; - - public static final String JSON_PROPERTY_WIDTH = "width"; - @Nullable - private Integer width; - - public static final String JSON_PROPERTY_HEIGHT = "height"; - @Nullable - private Integer height; - - public static final String JSON_PROPERTY_CONTENT = "content"; - @Nullable - private String content; - - public static final String JSON_PROPERTY_BACKGROUND_COLOR = "backgroundColor"; - @Nullable - private String backgroundColor; - - public static final String JSON_PROPERTY_BORDER_COLOR = "borderColor"; - @Nullable - private String borderColor; - - public static final String JSON_PROPERTY_BORDER_WIDTH = "borderWidth"; - @Nullable - private Integer borderWidth; - - public static final String JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE = "applyDefaultMarkdownStyle"; - @Nullable - private Boolean applyDefaultMarkdownStyle; - - public static final String JSON_PROPERTY_MARKDOWN_CSS = "markdownCss"; - @Nullable - private String markdownCss; - - public RuleChainNote() { - } - - public RuleChainNote id(@Nullable String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the note on the canvas - * @return id - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@Nullable String id) { - this.id = id; - } - - - public RuleChainNote x(@Nullable Integer x) { - this.x = x; - return this; - } - - /** - * Horizontal position of the note on the canvas, in pixels - * @return x - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_X, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getX() { - return x; - } - - - @JsonProperty(value = JSON_PROPERTY_X, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(@Nullable Integer x) { - this.x = x; - } - - - public RuleChainNote y(@Nullable Integer y) { - this.y = y; - return this; - } - - /** - * Vertical position of the note on the canvas, in pixels - * @return y - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_Y, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getY() { - return y; - } - - - @JsonProperty(value = JSON_PROPERTY_Y, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(@Nullable Integer y) { - this.y = y; - } - - - public RuleChainNote width(@Nullable Integer width) { - this.width = width; - return this; - } - - /** - * Width of the note, in pixels - * @return width - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_WIDTH, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getWidth() { - return width; - } - - - @JsonProperty(value = JSON_PROPERTY_WIDTH, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(@Nullable Integer width) { - this.width = width; - } - - - public RuleChainNote height(@Nullable Integer height) { - this.height = height; - return this; - } - - /** - * Height of the note, in pixels - * @return height - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getHeight() { - return height; - } - - - @JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(@Nullable Integer height) { - this.height = height; - } - - - public RuleChainNote content(@Nullable String content) { - this.content = content; - return this; - } - - /** - * Markdown or HTML content of the note - * @return content - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_CONTENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getContent() { - return content; - } - - - @JsonProperty(value = JSON_PROPERTY_CONTENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(@Nullable String content) { - this.content = content; - } - - - public RuleChainNote backgroundColor(@Nullable String backgroundColor) { - this.backgroundColor = backgroundColor; - return this; - } - - /** - * Background color of the note in CSS hex format, e.g. '#FFF9C4' - * @return backgroundColor - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_BACKGROUND_COLOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBackgroundColor() { - return backgroundColor; - } - - - @JsonProperty(value = JSON_PROPERTY_BACKGROUND_COLOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBackgroundColor(@Nullable String backgroundColor) { - this.backgroundColor = backgroundColor; - } - - - public RuleChainNote borderColor(@Nullable String borderColor) { - this.borderColor = borderColor; - return this; - } - - /** - * Border color of the note in CSS hex format, e.g. '#E6C800' - * @return borderColor - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_BORDER_COLOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBorderColor() { - return borderColor; - } - - - @JsonProperty(value = JSON_PROPERTY_BORDER_COLOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBorderColor(@Nullable String borderColor) { - this.borderColor = borderColor; - } - - - public RuleChainNote borderWidth(@Nullable Integer borderWidth) { - this.borderWidth = borderWidth; - return this; - } - - /** - * Border width of the note in pixels - * @return borderWidth - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_BORDER_WIDTH, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getBorderWidth() { - return borderWidth; - } - - - @JsonProperty(value = JSON_PROPERTY_BORDER_WIDTH, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBorderWidth(@Nullable Integer borderWidth) { - this.borderWidth = borderWidth; - } - - - public RuleChainNote applyDefaultMarkdownStyle(@Nullable Boolean applyDefaultMarkdownStyle) { - this.applyDefaultMarkdownStyle = applyDefaultMarkdownStyle; - return this; - } - - /** - * Whether to apply the default markdown stylesheet to the note content - * @return applyDefaultMarkdownStyle - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getApplyDefaultMarkdownStyle() { - return applyDefaultMarkdownStyle; - } - - - @JsonProperty(value = JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApplyDefaultMarkdownStyle(@Nullable Boolean applyDefaultMarkdownStyle) { - this.applyDefaultMarkdownStyle = applyDefaultMarkdownStyle; - } - - - public RuleChainNote markdownCss(@Nullable String markdownCss) { - this.markdownCss = markdownCss; - return this; - } - - /** - * Custom CSS styles applied to the note content - * @return markdownCss - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MARKDOWN_CSS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMarkdownCss() { - return markdownCss; - } - - - @JsonProperty(value = JSON_PROPERTY_MARKDOWN_CSS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMarkdownCss(@Nullable String markdownCss) { - this.markdownCss = markdownCss; - } - - - /** - * Return true if this RuleChainNote object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuleChainNote ruleChainNote = (RuleChainNote) o; - return Objects.equals(this.id, ruleChainNote.id) && - Objects.equals(this.x, ruleChainNote.x) && - Objects.equals(this.y, ruleChainNote.y) && - Objects.equals(this.width, ruleChainNote.width) && - Objects.equals(this.height, ruleChainNote.height) && - Objects.equals(this.content, ruleChainNote.content) && - Objects.equals(this.backgroundColor, ruleChainNote.backgroundColor) && - Objects.equals(this.borderColor, ruleChainNote.borderColor) && - Objects.equals(this.borderWidth, ruleChainNote.borderWidth) && - Objects.equals(this.applyDefaultMarkdownStyle, ruleChainNote.applyDefaultMarkdownStyle) && - Objects.equals(this.markdownCss, ruleChainNote.markdownCss); - } - - @Override - public int hashCode() { - return Objects.hash(id, x, y, width, height, content, backgroundColor, borderColor, borderWidth, applyDefaultMarkdownStyle, markdownCss); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuleChainNote {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" x: ").append(toIndentedString(x)).append("\n"); - sb.append(" y: ").append(toIndentedString(y)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n"); - sb.append(" borderColor: ").append(toIndentedString(borderColor)).append("\n"); - sb.append(" borderWidth: ").append(toIndentedString(borderWidth)).append("\n"); - sb.append(" applyDefaultMarkdownStyle: ").append(toIndentedString(applyDefaultMarkdownStyle)).append("\n"); - sb.append(" markdownCss: ").append(toIndentedString(markdownCss)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `x` to the URL query string - if (getX() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sx%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getX())))); - } - - // add `y` to the URL query string - if (getY() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getY())))); - } - - // add `width` to the URL query string - if (getWidth() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%swidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWidth())))); - } - - // add `height` to the URL query string - if (getHeight() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sheight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHeight())))); - } - - // add `content` to the URL query string - if (getContent() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%scontent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContent())))); - } - - // add `backgroundColor` to the URL query string - if (getBackgroundColor() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sbackgroundColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBackgroundColor())))); - } - - // add `borderColor` to the URL query string - if (getBorderColor() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sborderColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBorderColor())))); - } - - // add `borderWidth` to the URL query string - if (getBorderWidth() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sborderWidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBorderWidth())))); - } - - // add `applyDefaultMarkdownStyle` to the URL query string - if (getApplyDefaultMarkdownStyle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sapplyDefaultMarkdownStyle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApplyDefaultMarkdownStyle())))); - } - - // add `markdownCss` to the URL query string - if (getMarkdownCss() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smarkdownCss%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMarkdownCss())))); - } - - return joiner.toString(); - } -} -