From 55fe296d24daef9694504846ce30ba8deb567ab1 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:04:13 +0000 Subject: [PATCH] SDK regeneration --- .github/workflows/ci.yml | 26 ------- README.md | 1 - build.gradle | 74 ------------------- settings.gradle | 2 - .../pipedream/api/AsyncBaseClientBuilder.java | 57 +++++++------- .../com/pipedream/api/BaseClientBuilder.java | 57 +++++++------- .../com/pipedream/api/core/ClientOptions.java | 2 +- 7 files changed, 55 insertions(+), 164 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cba5f8..6183236 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,29 +36,3 @@ jobs: - name: Test run: ./gradlew test - publish: - needs: [ compile, test ] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up Java - id: setup-jre - uses: actions/setup-java@v1 - with: - java-version: "11" - architecture: x64 - - - name: Publish to maven - run: | - ./gradlew sonatypeCentralUpload - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - MAVEN_PUBLISH_REGISTRY_URL: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - MAVEN_SIGNATURE_KID: ${{ secrets.MAVEN_SIGNATURE_KID }} - MAVEN_SIGNATURE_SECRET_KEY: ${{ secrets.MAVEN_SIGNATURE_SECRET_KEY }} - MAVEN_SIGNATURE_PASSWORD: ${{ secrets.MAVEN_SIGNATURE_PASSWORD }} diff --git a/README.md b/README.md index 9d4aea9..6f438e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Pipedream Java Library [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPipedreamHQ%2Fpipedream-sdk-java) -[![Maven Central](https://img.shields.io/maven-central/v/com.pipedream/pipedream)](https://central.sonatype.com/artifact/com.pipedream/pipedream) The Pipedream Java library provides convenient access to the Pipedream API from Java. diff --git a/build.gradle b/build.gradle index def2d8c..7027b05 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,6 @@ dependencies { api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' api 'org.apache.commons:commons-text:1.13.1' - api 'org.immutables:value:2.10.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } @@ -46,23 +45,6 @@ java { } -group = 'com.pipedream' - -version = '0.0.256' - -jar { - dependsOn(":generatePomFileForMavenPublication") - archiveBaseName = "pipedream" -} - -sourcesJar { - archiveBaseName = "pipedream" -} - -javadocJar { - archiveBaseName = "pipedream" -} - signing { sign(publishing.publications) } @@ -74,59 +56,3 @@ test { } } -publishing { - publications { - maven(MavenPublication) { - groupId = 'com.pipedream' - artifactId = 'pipedream' - version = '0.0.256' - from components.java - pom { - name = 'pipedream' - description = 'The official SDK of pipedream' - url = 'https://buildwithfern.com' - licenses { - license { - name = 'The MIT License (MIT)' - url = 'https://mit-license.org/' - } - } - developers { - developer { - name = 'pipedream' - email = 'developers@pipedream.com' - } - } - scm { - connection = 'scm:git:git://github.com/PipedreamHQ/pipedream-sdk-java.git' - developerConnection = 'scm:git:git://github.com/PipedreamHQ/pipedream-sdk-java.git' - url = 'https://github.com/PipedreamHQ/pipedream-sdk-java' - } - } - } - } -} - -sonatypeCentralUpload { - username = "$System.env.MAVEN_USERNAME" - password = "$System.env.MAVEN_PASSWORD" - - archives = files( - "$buildDir/libs/pipedream-" + version + ".jar", - "$buildDir/libs/pipedream-" + version + "-sources.jar", - "$buildDir/libs/pipedream-" + version + "-javadoc.jar" - ) - - pom = file("$buildDir/publications/maven/pom-default.xml") - signingKey = "$System.env.MAVEN_SIGNATURE_SECRET_KEY" - signingKeyPassphrase = "$System.env.MAVEN_SIGNATURE_PASSWORD" -} - -signing { - def signingKeyId = "$System.env.MAVEN_SIGNATURE_SECRET_KEY" - def signingPassword = "$System.env.MAVEN_SIGNATURE_PASSWORD" - useInMemoryPgpKeys(signingKeyId, signingPassword) - sign publishing.publications.maven -} - -sonatypeCentralUpload.dependsOn build diff --git a/settings.gradle b/settings.gradle index db2eef5..aed36fe 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1 @@ -rootProject.name = 'pipedream' - include 'sample-app' \ No newline at end of file diff --git a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java index cc6e4a9..cea2aff 100644 --- a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java +++ b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java @@ -10,7 +10,7 @@ import java.util.Optional; import okhttp3.OkHttpClient; -public class AsyncBaseClientBuilder> { +public class AsyncBaseClientBuilder { private Optional timeout = Optional.empty(); private Optional maxRetries = Optional.empty(); @@ -29,68 +29,65 @@ public class AsyncBaseClientBuilder> { * Sets clientId. * Defaults to the PIPEDREAM_CLIENT_ID environment variable. */ - @SuppressWarnings("unchecked") - public T clientId(String clientId) { + public AsyncBaseClientBuilder clientId(String clientId) { this.clientId = clientId; - return (T) this; + return this; } /** * Sets clientSecret. * Defaults to the PIPEDREAM_CLIENT_SECRET environment variable. */ - @SuppressWarnings("unchecked") - public T clientSecret(String clientSecret) { + public AsyncBaseClientBuilder clientSecret(String clientSecret) { this.clientSecret = clientSecret; - return (T) this; + return this; } /** * Sets projectEnvironment */ - @SuppressWarnings("unchecked") - public T projectEnvironment(String projectEnvironment) { + public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) { this.projectEnvironment = projectEnvironment; - return (T) this; + return this; } - @SuppressWarnings("unchecked") - public T environment(Environment environment) { + public AsyncBaseClientBuilder environment(Environment environment) { this.environment = environment; - return (T) this; + return this; } - @SuppressWarnings("unchecked") - public T url(String url) { + public AsyncBaseClientBuilder url(String url) { this.environment = Environment.custom(url); - return (T) this; + return this; } /** * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. */ - @SuppressWarnings("unchecked") - public T timeout(int timeout) { + public AsyncBaseClientBuilder timeout(int timeout) { this.timeout = Optional.of(timeout); - return (T) this; + return this; } /** * Sets the maximum number of retries for the client. Defaults to 2 retries. */ - @SuppressWarnings("unchecked") - public T maxRetries(int maxRetries) { + public AsyncBaseClientBuilder maxRetries(int maxRetries) { this.maxRetries = Optional.of(maxRetries); - return (T) this; + return this; } /** * Sets the underlying OkHttp client */ - @SuppressWarnings("unchecked") - public T httpClient(OkHttpClient httpClient) { + public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) { this.httpClient = httpClient; - return (T) this; + return this; + } + + public AsyncBaseClientBuilder projectId(String projectId) { + clientOptionsBuilder.projectId(projectId); + return this; } protected ClientOptions buildClientOptions() { @@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) { * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void setAuthentication(ClientOptions.Builder builder) {
      *     super.setAuthentication(builder); // Keep existing auth
      *     builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setCustomHeaders(ClientOptions.Builder builder) {
      *     super.setCustomHeaders(builder); // Keep existing headers
      *     builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
+     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
      *     builder.addHeader("X-Client-Version", "1.0.0");
      * }
      * }
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {} * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void validateConfiguration() {
      *     super.validateConfiguration(); // Run parent validations
      *     if (tenantId == null || tenantId.isEmpty()) {
diff --git a/src/main/java/com/pipedream/api/BaseClientBuilder.java b/src/main/java/com/pipedream/api/BaseClientBuilder.java
index 79c1350..18ac974 100644
--- a/src/main/java/com/pipedream/api/BaseClientBuilder.java
+++ b/src/main/java/com/pipedream/api/BaseClientBuilder.java
@@ -10,7 +10,7 @@
 import java.util.Optional;
 import okhttp3.OkHttpClient;
 
-public class BaseClientBuilder> {
+public class BaseClientBuilder {
     private Optional timeout = Optional.empty();
 
     private Optional maxRetries = Optional.empty();
@@ -29,68 +29,65 @@ public class BaseClientBuilder> {
      * Sets clientId.
      * Defaults to the PIPEDREAM_CLIENT_ID environment variable.
      */
-    @SuppressWarnings("unchecked")
-    public T clientId(String clientId) {
+    public BaseClientBuilder clientId(String clientId) {
         this.clientId = clientId;
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets clientSecret.
      * Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
      */
-    @SuppressWarnings("unchecked")
-    public T clientSecret(String clientSecret) {
+    public BaseClientBuilder clientSecret(String clientSecret) {
         this.clientSecret = clientSecret;
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets projectEnvironment
      */
-    @SuppressWarnings("unchecked")
-    public T projectEnvironment(String projectEnvironment) {
+    public BaseClientBuilder projectEnvironment(String projectEnvironment) {
         this.projectEnvironment = projectEnvironment;
-        return (T) this;
+        return this;
     }
 
-    @SuppressWarnings("unchecked")
-    public T environment(Environment environment) {
+    public BaseClientBuilder environment(Environment environment) {
         this.environment = environment;
-        return (T) this;
+        return this;
     }
 
-    @SuppressWarnings("unchecked")
-    public T url(String url) {
+    public BaseClientBuilder url(String url) {
         this.environment = Environment.custom(url);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
      */
-    @SuppressWarnings("unchecked")
-    public T timeout(int timeout) {
+    public BaseClientBuilder timeout(int timeout) {
         this.timeout = Optional.of(timeout);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the maximum number of retries for the client. Defaults to 2 retries.
      */
-    @SuppressWarnings("unchecked")
-    public T maxRetries(int maxRetries) {
+    public BaseClientBuilder maxRetries(int maxRetries) {
         this.maxRetries = Optional.of(maxRetries);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the underlying OkHttp client
      */
-    @SuppressWarnings("unchecked")
-    public T httpClient(OkHttpClient httpClient) {
+    public BaseClientBuilder httpClient(OkHttpClient httpClient) {
         this.httpClient = httpClient;
-        return (T) this;
+        return this;
+    }
+
+    public BaseClientBuilder projectId(String projectId) {
+        clientOptionsBuilder.projectId(projectId);
+        return this;
     }
 
     protected ClientOptions buildClientOptions() {
@@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAuthentication(ClientOptions.Builder builder) {
      *     super.setAuthentication(builder); // Keep existing auth
      *     builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setCustomHeaders(ClientOptions.Builder builder) {
      *     super.setCustomHeaders(builder); // Keep existing headers
      *     builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
+     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
      *     builder.addHeader("X-Client-Version", "1.0.0");
      * }
      * }
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {} * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void validateConfiguration() {
      *     super.validateConfiguration(); // Run parent validations
      *     if (tenantId == null || tenantId.isEmpty()) {
diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java
index 2e7459a..fba9dee 100644
--- a/src/main/java/com/pipedream/api/core/ClientOptions.java
+++ b/src/main/java/com/pipedream/api/core/ClientOptions.java
@@ -37,7 +37,7 @@ private ClientOptions(
             {
                 put("X-Fern-Language", "JAVA");
                 put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
-                put("X-Fern-SDK-Version", "0.0.256");
+                put("X-Fern-SDK-Version", "0.0.267");
             }
         });
         this.headerSuppliers = headerSuppliers;