mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-29 09:27:32 +00:00
* feat: Add new gRPC v2 plugin - Enhanced DataSourcesController to support invoking methods on data sources. - Introduced InvokeDataSourceMethodDto for method invocation requests. - Added WhitelistPluginGuard to restrict method invocation based on data source kind. - Updated IDataSourcesController and IDataSourcesService interfaces to include invoke method functionality. - Implemented invokeMethod in DataSourcesService to handle method calls for gRPC v2. - Added method whitelisting for gRPC v2 in the service layer. * refactor: invokeMethod to use method dispatch pattern * fix: improve error handling in testConnection method * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: update types and interface * fix: remove unnecessary border styles for improved UI consistency * refactor: simplify error handling - Introduced a new SCSS file for styling the gRPC v2 query editor components. - Styled request sections, server URL input, dropdown menus, and method buttons for better user experience. refactor(grpcv2): enhance error handling and type safety - Updated error handling in gRPC query service to use a new `toError` utility function for consistent error conversion. - Improved type definitions for gRPC client and service methods to ensure better type safety. - Refactored method existence validation and gRPC call execution to handle errors more gracefully. fix(grpcv2): improve service discovery and proto file loading - Enhanced service discovery logic to handle reflection and proto file clients more robustly. - Added checks for valid service constructors and improved error messages for better debugging. - Updated the `loadProtoFromRemoteUrl` function to handle HTTP errors more effectively. chore(grpcv2): add utility functions for type checks - Introduced utility functions `isRecord`, `hasProperty`, and `toError` for better type checking and error handling throughout the codebase. * feat: add LegacyBanner component for gRPC legacy tag display * fix: styling changes * fix: correct text in LegacyBanner component * feat: enhance GRPCv2 component with request handling and state management improvements * refactor: update metadata handling in GRPCv2 component and service * refactor: update GRPCv2 component to use raw_message instead of requestData * fix: Styling issues and labels * refactor: gRPC test connection checks for proto file and url * fix: improve error handling in service discovery --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
82 lines
No EOL
1.6 KiB
JSON
82 lines
No EOL
1.6 KiB
JSON
|
|
{
|
|
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
|
|
"title": "GRPC datasource",
|
|
"description": "A schema defining GRPC datasource",
|
|
"type": "api",
|
|
"source": {
|
|
"name": "gRPC",
|
|
"kind": "grpc",
|
|
"tags": ["legacy"],
|
|
"options": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"auth_type": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"encrypted": true
|
|
},
|
|
"bearer_token": {
|
|
"encrypted": true
|
|
},
|
|
"grpc_apikey_key": {
|
|
"type": "string"
|
|
},
|
|
"grpc_apikey_value": {
|
|
"encrypted": true
|
|
},
|
|
"protobuf" : {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"exposedVariables": {
|
|
"isLoading": false,
|
|
"data": {},
|
|
"rawData": {}
|
|
},
|
|
"customTesting": true
|
|
},
|
|
"defaults": {
|
|
"url": {
|
|
"value": ""
|
|
},
|
|
"auth_type": {
|
|
"value": "none"
|
|
},
|
|
"username": {
|
|
"value": ""
|
|
},
|
|
"password": {
|
|
"value": ""
|
|
},
|
|
"bearer_token": {
|
|
"value": ""
|
|
},
|
|
"grpc_apikey_key": {
|
|
"value": ""
|
|
},
|
|
"grpc_apikey_value": {
|
|
"value": ""
|
|
},
|
|
"protobuf": {
|
|
"value": ""
|
|
}
|
|
},
|
|
"properties": {
|
|
"url": {
|
|
"label": "Server URL",
|
|
"key": "url",
|
|
"type": "text",
|
|
"description": "0.0.0.0:50051"
|
|
},
|
|
"auth_type": {
|
|
"label": "Authentication type",
|
|
"key": "auth_type",
|
|
"type": "react-component-oauth-authentication",
|
|
"description": "key-value pair headers for rest api"
|
|
}
|
|
},
|
|
"required": ["url"]
|
|
} |