Tags: PipedreamHQ/pipedream-sdk-java
Tags
Apps listing and project settings improvements (#210) * Add support for the `has_components`, `has_actions` and `has_triggers` existing query params to filter apps listings * Add support for the new `connect_require_key_auth_test` project setting, which verifies that new accounts for key-based apps are tested before creation. --------- Co-authored-by: Jay Vercellone <jay@pipedream.com>
Fix runtime issue with component deserialization The `withLabel` property of configurable props is conflicting with the `label` property also present in the same schema: ``` Caused by: com.fasterxml.jackson.databind.JsonMappingException: Conflicting/ambiguous property name definitions (implicit name 'label'): found multiple explicit names: [withLabel, label]... ``` This change fixes the issue temporarily by ignoring the `withLabel` setter during the payload deserialization.
Proxy improvements (#195) * Handle non-JSON payloads and other response types in the Proxy The `proxy` module now supports non-JSON payloads. Since the downstream services that the Proxy can call do not necessarily respond with JSON content, the new logic will inspect the `Content-Type` header in the response to determine whether the payload should be parsed as JSON or returned back to the caller as a byte stream (especially useful for downloading files). ```java ProxyResponse response = client.proxy().get(url, request, requestOptions); // The SDK returns a stream for binary responses if (response.isStream()) { try (InputStream stream = response.stream(); FileOutputStream fos = new FileOutputStream(outputPath)) { byte[] buffer = new byte[8192]; int bytesRead; while ((bytesRead = stream.read(buffer)) != -1) { fos.write(buffer, 0, bytesRead); } } System.out.println("File downloaded to: " + outputPath); } ``` * Improve ergonomics for query parameters When passing query parameters to the downstream service, users had to previously encode them manually inside a `url` string. Now, every method in the Proxy clients accepts an `HttpUrl` instance, which allows users to build URLs with query parameters in a more ergonomic way: ```java HttpUrl url = HttpUrl.parse(GDRIVE_API_BASE) .newBuilder() .addPathSegment(fileId) .addQueryParameter("fields", "name,mimeType,size") .build(); ProxyGetRequest request = ProxyGetRequest.builder() .externalUserId(externalUserId) .accountId(accountId) .build(); ``` --------- Co-authored-by: Jay Vercellone <jay@pipedream.com>
Type-related improvements (#106) * Define the types for all configured and configurable props * Fix the "observations" type when configuring a prop * Add the `component_type` query param when listing components using the "generic" route/path --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
PreviousNext