|
|
|
@ -135,6 +135,7 @@ import org.thingsboard.server.common.data.security.model.UserPasswordPolicy; |
|
|
|
import org.thingsboard.server.common.data.sms.config.TestSmsRequest; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetType; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetTypeDetails; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetTypeInfo; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetsBundle; |
|
|
|
|
|
|
|
import java.io.Closeable; |
|
|
|
@ -2457,6 +2458,28 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable { |
|
|
|
bundleAlias).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public List<WidgetTypeDetails> getBundleWidgetTypesDetails(boolean isSystem, String bundleAlias) { |
|
|
|
return restTemplate.exchange( |
|
|
|
baseURL + "/api/widgetTypesDetails?isSystem={isSystem}&bundleAlias={bundleAlias}", |
|
|
|
HttpMethod.GET, |
|
|
|
HttpEntity.EMPTY, |
|
|
|
new ParameterizedTypeReference<List<WidgetTypeDetails>>() { |
|
|
|
}, |
|
|
|
isSystem, |
|
|
|
bundleAlias).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public List<WidgetTypeInfo> getBundleWidgetTypesInfos(boolean isSystem, String bundleAlias) { |
|
|
|
return restTemplate.exchange( |
|
|
|
baseURL + "/api/widgetTypesInfos?isSystem={isSystem}&bundleAlias={bundleAlias}", |
|
|
|
HttpMethod.GET, |
|
|
|
HttpEntity.EMPTY, |
|
|
|
new ParameterizedTypeReference<List<WidgetTypeInfo>>() { |
|
|
|
}, |
|
|
|
isSystem, |
|
|
|
bundleAlias).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public Optional<WidgetType> getWidgetType(boolean isSystem, String bundleAlias, String alias) { |
|
|
|
try { |
|
|
|
ResponseEntity<WidgetType> widgetType = |
|
|
|
|