diff --git a/README.md b/README.md
index 57b37a1..a52dbc3 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file:
com.pipedreampipedream
- 1.0.1
+ 1.0.2
```
diff --git a/build.gradle b/build.gradle
index 61f024a..02bdd26 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,7 @@ java {
group = 'com.pipedream'
-version = '1.0.1'
+version = '1.0.2'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.pipedream'
artifactId = 'pipedream'
- version = '1.0.1'
+ version = '1.0.2'
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 534a35d..71fa012 100644
--- a/src/main/java/com/pipedream/api/core/ClientOptions.java
+++ b/src/main/java/com/pipedream/api/core/ClientOptions.java
@@ -35,10 +35,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.pipedream:pipedream/1.0.1");
+ put("User-Agent", "com.pipedream:pipedream/1.0.2");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.0.1");
+ put("X-Fern-SDK-Version", "1.0.2");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java b/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java
index 9da7ae6..e9ba960 100644
--- a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java
+++ b/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java
@@ -6,12 +6,14 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.pipedream.api.core.ObjectMappers;
import java.io.IOException;
import java.util.Objects;
+import java.util.Optional;
@JsonDeserialize(using = RunActionOptsStashId.Deserializer.class)
public final class RunActionOptsStashId {
@@ -32,8 +34,10 @@ public Object get() {
@SuppressWarnings("unchecked")
public T visit(Visitor visitor) {
if (this.type == 0) {
- return visitor.visit((String) this.value);
+ return visitor.visit((Optional) this.value);
} else if (this.type == 1) {
+ return visitor.visit((String) this.value);
+ } else if (this.type == 2) {
return visitor.visit((boolean) this.value);
}
throw new IllegalStateException("Failed to visit value. This should never happen.");
@@ -59,15 +63,33 @@ public String toString() {
return this.value.toString();
}
- public static RunActionOptsStashId of(String value) {
+ public static RunActionOptsStashId of(Optional value) {
return new RunActionOptsStashId(value, 0);
}
- public static RunActionOptsStashId of(boolean value) {
+ /**
+ * @param value must be one of the following:
+ *
+ *
"NEW"
+ *
+ */
+ public static RunActionOptsStashId of(String value) {
return new RunActionOptsStashId(value, 1);
}
+ public static RunActionOptsStashId of(boolean value) {
+ return new RunActionOptsStashId(value, 2);
+ }
+
public interface Visitor {
+ T visit(Optional value);
+
+ /**
+ * @param value must be one of the following:
+ *
+ *
"NEW"
+ *
+ */
T visit(String value);
T visit(boolean value);
@@ -81,6 +103,10 @@ static final class Deserializer extends StdDeserializer {
@java.lang.Override
public RunActionOptsStashId deserialize(JsonParser p, DeserializationContext context) throws IOException {
Object value = p.readValueAs(Object.class);
+ try {
+ return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {}));
+ } catch (IllegalArgumentException e) {
+ }
try {
return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class));
} catch (IllegalArgumentException e) {
diff --git a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java
index e6f7c8c..840f84b 100644
--- a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java
+++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java
@@ -110,9 +110,7 @@ public CompletableFuture> validate
String ctok, TokensValidateRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
- .addPathSegments("v1/connect")
- .addPathSegment(clientOptions.projectId())
- .addPathSegments("tokens")
+ .addPathSegments("v1/connect/tokens")
.addPathSegment(ctok)
.addPathSegments("validate");
if (request.getParams().isPresent()) {
diff --git a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java
index 7b0a9de..e560d15 100644
--- a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java
+++ b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java
@@ -91,9 +91,7 @@ public BaseClientHttpResponse validate(
String ctok, TokensValidateRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
- .addPathSegments("v1/connect")
- .addPathSegment(clientOptions.projectId())
- .addPathSegments("tokens")
+ .addPathSegments("v1/connect/tokens")
.addPathSegment(ctok)
.addPathSegments("validate");
if (request.getParams().isPresent()) {
diff --git a/src/main/java/com/pipedream/api/types/App.java b/src/main/java/com/pipedream/api/types/App.java
index 2983820..ea4a85d 100644
--- a/src/main/java/com/pipedream/api/types/App.java
+++ b/src/main/java/com/pipedream/api/types/App.java
@@ -90,9 +90,6 @@ public String getName() {
return name;
}
- /**
- * @return The authentication type used by the app
- */
@JsonProperty("auth_type")
public Optional getAuthType() {
return authType;
@@ -224,9 +221,6 @@ public interface _FinalStage {
_FinalStage id(String id);
- /**
- *