From a4ce5716f4b0edfdef44175658ab6d3d14d909b1 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 23:19:50 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.8.4 --- .fern/metadata.json | 4 +- .fern/replay.lock | 10 + .fernignore | 3 + .gitattributes | 1 + README.md | 4 +- build.gradle | 4 +- .../com/pipedream/api/core/ClientOptions.java | 4 +- .../java/com/pipedream/api/types/App.java | 66 +++++- .../api/types/AppScopeProfilesItem.java | 191 ++++++++++++++++++ .../api/types/AppScopeProfilesItemName.java | 95 +++++++++ 10 files changed, 372 insertions(+), 10 deletions(-) create mode 100644 .fern/replay.lock create mode 100644 .gitattributes create mode 100644 src/main/java/com/pipedream/api/types/AppScopeProfilesItem.java create mode 100644 src/main/java/com/pipedream/api/types/AppScopeProfilesItemName.java diff --git a/.fern/metadata.json b/.fern/metadata.json index f259154..3f9cdd9 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,9 +10,9 @@ ], "retry-status-codes": "legacy" }, - "originGitCommit": "267ec323a4305eba2c41bd93e26686a26e329107", + "originGitCommit": "b98152f4744d4752cacd615b76d9524eae3eb3a3", "originGitCommitIsDirty": false, "invokedBy": "ci", "ciProvider": "github", - "sdkVersion": "2.0.2" + "sdkVersion": "2.0.3" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 0000000..cc42665 --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 93fd7063699edbf599967cbed5ad90943ff88a16 + tree_hash: d5b581e2c9d613d0e58a943f536b03d2eff02f39 + timestamp: 2026-05-19T23:19:48.346Z + cli_version: unknown + generator_versions: {} +current_generation: 93fd7063699edbf599967cbed5ad90943ff88a16 +patches: [] diff --git a/.fernignore b/.fernignore index b1ddfc7..494b3a8 100644 --- a/.fernignore +++ b/.fernignore @@ -56,3 +56,6 @@ src/test/java/com/pipedream/api/TokensWireTest.java src/test/java/com/pipedream/api/testutil/MockResponse.java src/test/java/com/pipedream/api/testutil/MockWebServer.java src/test/java/com/pipedream/api/testutil/RecordedRequest.java +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..74928d6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/README.md b/README.md index 65339b9..4f03097 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Add the dependency in your `build.gradle` file: ```groovy dependencies { - implementation 'com.pipedream:pipedream:2.0.2' + implementation 'com.pipedream:pipedream:2.0.3' } ``` @@ -42,7 +42,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 2.0.2 + 2.0.3 ``` diff --git a/build.gradle b/build.gradle index e9a564f..40b60b0 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ java { group = 'com.pipedream' -version = '2.0.2' +version = '2.0.3' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '2.0.2' + version = '2.0.3' from components.java pom { name = 'pipedream' diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java index d8fc599..777c826 100644 --- a/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/src/main/java/com/pipedream/api/core/ClientOptions.java @@ -41,10 +41,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.pipedream:pipedream/2.0.2"); + put("User-Agent", "com.pipedream:pipedream/2.0.3"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "2.0.2"); + put("X-Fern-SDK-Version", "2.0.3"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/types/App.java b/src/main/java/com/pipedream/api/types/App.java index eb5d828..c447cca 100644 --- a/src/main/java/com/pipedream/api/types/App.java +++ b/src/main/java/com/pipedream/api/types/App.java @@ -41,6 +41,8 @@ public final class App { private final double featuredWeight; + private final List scopeProfiles; + private final Map additionalProperties; private App( @@ -53,6 +55,7 @@ private App( Optional customFieldsJson, List categories, double featuredWeight, + List scopeProfiles, Map additionalProperties) { this.id = id; this.nameSlug = nameSlug; @@ -63,6 +66,7 @@ private App( this.customFieldsJson = customFieldsJson; this.categories = categories; this.featuredWeight = featuredWeight; + this.scopeProfiles = scopeProfiles; this.additionalProperties = additionalProperties; } @@ -135,6 +139,14 @@ public double getFeaturedWeight() { return featuredWeight; } + /** + * @return Named subsets of the app's OAuth scopes that may be requested when users connect their accounts (via the oauth_scope_profile parameter). Empty for apps that don't define any. + */ + @JsonProperty("scope_profiles") + public List getScopeProfiles() { + return scopeProfiles; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -155,7 +167,8 @@ private boolean equalTo(App other) { && imgSrc.equals(other.imgSrc) && customFieldsJson.equals(other.customFieldsJson) && categories.equals(other.categories) - && featuredWeight == other.featuredWeight; + && featuredWeight == other.featuredWeight + && scopeProfiles.equals(other.scopeProfiles); } @java.lang.Override @@ -169,7 +182,8 @@ public int hashCode() { this.imgSrc, this.customFieldsJson, this.categories, - this.featuredWeight); + this.featuredWeight, + this.scopeProfiles); } @java.lang.Override @@ -251,6 +265,15 @@ public interface _FinalStage { _FinalStage addCategories(String categories); _FinalStage addAllCategories(List categories); + + /** + *

Named subsets of the app's OAuth scopes that may be requested when users connect their accounts (via the oauth_scope_profile parameter). Empty for apps that don't define any.

+ */ + _FinalStage scopeProfiles(List scopeProfiles); + + _FinalStage addScopeProfiles(AppScopeProfilesItem scopeProfiles); + + _FinalStage addAllScopeProfiles(List scopeProfiles); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -264,6 +287,8 @@ public static final class Builder private double featuredWeight; + private List scopeProfiles = new ArrayList<>(); + private List categories = new ArrayList<>(); private Optional customFieldsJson = Optional.empty(); @@ -290,6 +315,7 @@ public Builder from(App other) { customFieldsJson(other.getCustomFieldsJson()); categories(other.getCategories()); featuredWeight(other.getFeaturedWeight()); + scopeProfiles(other.getScopeProfiles()); return this; } @@ -341,6 +367,41 @@ public _FinalStage featuredWeight(double featuredWeight) { return this; } + /** + *

Named subsets of the app's OAuth scopes that may be requested when users connect their accounts (via the oauth_scope_profile parameter). Empty for apps that don't define any.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllScopeProfiles(List scopeProfiles) { + if (scopeProfiles != null) { + this.scopeProfiles.addAll(scopeProfiles); + } + return this; + } + + /** + *

Named subsets of the app's OAuth scopes that may be requested when users connect their accounts (via the oauth_scope_profile parameter). Empty for apps that don't define any.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addScopeProfiles(AppScopeProfilesItem scopeProfiles) { + this.scopeProfiles.add(scopeProfiles); + return this; + } + + /** + *

Named subsets of the app's OAuth scopes that may be requested when users connect their accounts (via the oauth_scope_profile parameter). Empty for apps that don't define any.

+ */ + @java.lang.Override + @JsonSetter(value = "scope_profiles", nulls = Nulls.SKIP) + public _FinalStage scopeProfiles(List scopeProfiles) { + this.scopeProfiles.clear(); + if (scopeProfiles != null) { + this.scopeProfiles.addAll(scopeProfiles); + } + return this; + } + /** *

Categories associated with the app

* @return Reference to {@code this} so that method calls can be chained together. @@ -461,6 +522,7 @@ public App build() { customFieldsJson, categories, featuredWeight, + scopeProfiles, additionalProperties); } diff --git a/src/main/java/com/pipedream/api/types/AppScopeProfilesItem.java b/src/main/java/com/pipedream/api/types/AppScopeProfilesItem.java new file mode 100644 index 0000000..9c139df --- /dev/null +++ b/src/main/java/com/pipedream/api/types/AppScopeProfilesItem.java @@ -0,0 +1,191 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.pipedream.api.core.ObjectMappers; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AppScopeProfilesItem.Builder.class) +public final class AppScopeProfilesItem { + private final AppScopeProfilesItemName name; + + private final List scopes; + + private final Map additionalProperties; + + private AppScopeProfilesItem( + AppScopeProfilesItemName name, List scopes, Map additionalProperties) { + this.name = name; + this.scopes = scopes; + this.additionalProperties = additionalProperties; + } + + /** + * @return The profile name. Pass this back as oauth_scope_profile when starting the OAuth flow for this app. + */ + @JsonProperty("name") + public AppScopeProfilesItemName getName() { + return name; + } + + /** + * @return The actual OAuth scopes of the upstream API that the user will be asked to authorize when this profile is selected. + */ + @JsonProperty("scopes") + public List getScopes() { + return scopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AppScopeProfilesItem && equalTo((AppScopeProfilesItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AppScopeProfilesItem other) { + return name.equals(other.name) && scopes.equals(other.scopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.scopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

The profile name. Pass this back as oauth_scope_profile when starting the OAuth flow for this app.

+ */ + _FinalStage name(@NotNull AppScopeProfilesItemName name); + + Builder from(AppScopeProfilesItem other); + } + + public interface _FinalStage { + AppScopeProfilesItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The actual OAuth scopes of the upstream API that the user will be asked to authorize when this profile is selected.

+ */ + _FinalStage scopes(List scopes); + + _FinalStage addScopes(String scopes); + + _FinalStage addAllScopes(List scopes); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private AppScopeProfilesItemName name; + + private List scopes = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AppScopeProfilesItem other) { + name(other.getName()); + scopes(other.getScopes()); + return this; + } + + /** + *

The profile name. Pass this back as oauth_scope_profile when starting the OAuth flow for this app.

+ *

The profile name. Pass this back as oauth_scope_profile when starting the OAuth flow for this app.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull AppScopeProfilesItemName name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

The actual OAuth scopes of the upstream API that the user will be asked to authorize when this profile is selected.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllScopes(List scopes) { + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + /** + *

The actual OAuth scopes of the upstream API that the user will be asked to authorize when this profile is selected.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addScopes(String scopes) { + this.scopes.add(scopes); + return this; + } + + /** + *

The actual OAuth scopes of the upstream API that the user will be asked to authorize when this profile is selected.

+ */ + @java.lang.Override + @JsonSetter(value = "scopes", nulls = Nulls.SKIP) + public _FinalStage scopes(List scopes) { + this.scopes.clear(); + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + @java.lang.Override + public AppScopeProfilesItem build() { + return new AppScopeProfilesItem(name, scopes, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/pipedream/api/types/AppScopeProfilesItemName.java b/src/main/java/com/pipedream/api/types/AppScopeProfilesItemName.java new file mode 100644 index 0000000..7c6b02d --- /dev/null +++ b/src/main/java/com/pipedream/api/types/AppScopeProfilesItemName.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class AppScopeProfilesItemName { + public static final AppScopeProfilesItemName ADMIN = new AppScopeProfilesItemName(Value.ADMIN, "admin"); + + public static final AppScopeProfilesItemName READ_ONLY = new AppScopeProfilesItemName(Value.READ_ONLY, "read_only"); + + public static final AppScopeProfilesItemName READ_WRITE = + new AppScopeProfilesItemName(Value.READ_WRITE, "read_write"); + + private final Value value; + + private final String string; + + AppScopeProfilesItemName(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof AppScopeProfilesItemName + && this.string.equals(((AppScopeProfilesItemName) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADMIN: + return visitor.visitAdmin(); + case READ_ONLY: + return visitor.visitReadOnly(); + case READ_WRITE: + return visitor.visitReadWrite(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AppScopeProfilesItemName valueOf(String value) { + switch (value) { + case "admin": + return ADMIN; + case "read_only": + return READ_ONLY; + case "read_write": + return READ_WRITE; + default: + return new AppScopeProfilesItemName(Value.UNKNOWN, value); + } + } + + public enum Value { + READ_ONLY, + + READ_WRITE, + + ADMIN, + + UNKNOWN + } + + public interface Visitor { + T visitReadOnly(); + + T visitReadWrite(); + + T visitAdmin(); + + T visitUnknown(String unknownType); + } +} From 255610694c818ff2008a817eb69208a6d545e4e0 Mon Sep 17 00:00:00 2001 From: Jay Vercellone Date: Tue, 19 May 2026 16:42:07 -0700 Subject: [PATCH 2/2] Fix test --- src/test/java/com/pipedream/api/TokensWireTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/pipedream/api/TokensWireTest.java b/src/test/java/com/pipedream/api/TokensWireTest.java index 54a3a19..d503c8c 100644 --- a/src/test/java/com/pipedream/api/TokensWireTest.java +++ b/src/test/java/com/pipedream/api/TokensWireTest.java @@ -64,7 +64,8 @@ public void testValidate() throws Exception { + " \"categories\": [\n" + " \"categories\"\n" + " ],\n" - + " \"featured_weight\": 1.1\n" + + " \"featured_weight\": 1.1,\n" + + " \"scope_profiles\": []\n" + " },\n" + " \"error\": \"error\",\n" + " \"error_redirect_uri\": \"error_redirect_uri\",\n"