diff --git a/README.md b/README.md index 631c314..662c6e6 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 1.1.3 + 1.1.4 ``` @@ -119,7 +119,7 @@ try{ ### Custom Client -This SDK is built to work with any instance of `OkHttpClient`. By default, if no client is provided, the SDK will construct one. +This SDK is built to work with any instance of `OkHttpClient`. By default, if no client is provided, the SDK will construct one. However, you can pass your own client like so: ```java diff --git a/build.gradle b/build.gradle index 7dedcab..7a0cd54 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ java { group = 'com.pipedream' -version = '1.1.3' +version = '1.1.4' jar { dependsOn(":generatePomFileForMavenPublication") @@ -80,7 +80,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '1.1.3' + version = '1.1.4' 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 ac15526..52183c9 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.1.3"); + put("User-Agent", "com.pipedream:pipedream/1.1.4"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.1.3"); + put("X-Fern-SDK-Version", "1.1.4"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/resources/apps/AsyncRawAppsClient.java b/src/main/java/com/pipedream/api/resources/apps/AsyncRawAppsClient.java index bfc2fde..63900eb 100644 --- a/src/main/java/com/pipedream/api/resources/apps/AsyncRawAppsClient.java +++ b/src/main/java/com/pipedream/api/resources/apps/AsyncRawAppsClient.java @@ -82,6 +82,18 @@ public CompletableFuture>> list( QueryStringMapper.addQueryParameter( httpUrl, "sort_direction", request.getSortDirection().get(), false); } + if (request.getHasComponents().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_components", request.getHasComponents().get(), false); + } + if (request.getHasActions().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_actions", request.getHasActions().get(), false); + } + if (request.getHasTriggers().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_triggers", request.getHasTriggers().get(), false); + } if (request.getCategoryIds().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "category_ids", request.getCategoryIds().get(), true); diff --git a/src/main/java/com/pipedream/api/resources/apps/RawAppsClient.java b/src/main/java/com/pipedream/api/resources/apps/RawAppsClient.java index 1a8e637..403f724 100644 --- a/src/main/java/com/pipedream/api/resources/apps/RawAppsClient.java +++ b/src/main/java/com/pipedream/api/resources/apps/RawAppsClient.java @@ -77,6 +77,18 @@ public BaseClientHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "sort_direction", request.getSortDirection().get(), false); } + if (request.getHasComponents().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_components", request.getHasComponents().get(), false); + } + if (request.getHasActions().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_actions", request.getHasActions().get(), false); + } + if (request.getHasTriggers().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "has_triggers", request.getHasTriggers().get(), false); + } if (request.getCategoryIds().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "category_ids", request.getCategoryIds().get(), true); diff --git a/src/main/java/com/pipedream/api/resources/apps/requests/AppsListRequest.java b/src/main/java/com/pipedream/api/resources/apps/requests/AppsListRequest.java index 5e13f36..6d9c666 100644 --- a/src/main/java/com/pipedream/api/resources/apps/requests/AppsListRequest.java +++ b/src/main/java/com/pipedream/api/resources/apps/requests/AppsListRequest.java @@ -38,6 +38,12 @@ public final class AppsListRequest { private final Optional sortDirection; + private final Optional hasComponents; + + private final Optional hasActions; + + private final Optional hasTriggers; + private final Map additionalProperties; private AppsListRequest( @@ -48,6 +54,9 @@ private AppsListRequest( Optional q, Optional sortKey, Optional sortDirection, + Optional hasComponents, + Optional hasActions, + Optional hasTriggers, Map additionalProperties) { this.categoryIds = categoryIds; this.after = after; @@ -56,6 +65,9 @@ private AppsListRequest( this.q = q; this.sortKey = sortKey; this.sortDirection = sortDirection; + this.hasComponents = hasComponents; + this.hasActions = hasActions; + this.hasTriggers = hasTriggers; this.additionalProperties = additionalProperties; } @@ -115,6 +127,30 @@ public Optional getSortDirection() { return sortDirection; } + /** + * @return Filter to apps that have components (actions or triggers) + */ + @JsonProperty("has_components") + public Optional getHasComponents() { + return hasComponents; + } + + /** + * @return Filter to apps that have actions + */ + @JsonProperty("has_actions") + public Optional getHasActions() { + return hasActions; + } + + /** + * @return Filter to apps that have triggers + */ + @JsonProperty("has_triggers") + public Optional getHasTriggers() { + return hasTriggers; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -133,13 +169,25 @@ private boolean equalTo(AppsListRequest other) { && limit.equals(other.limit) && q.equals(other.q) && sortKey.equals(other.sortKey) - && sortDirection.equals(other.sortDirection); + && sortDirection.equals(other.sortDirection) + && hasComponents.equals(other.hasComponents) + && hasActions.equals(other.hasActions) + && hasTriggers.equals(other.hasTriggers); } @java.lang.Override public int hashCode() { return Objects.hash( - this.categoryIds, this.after, this.before, this.limit, this.q, this.sortKey, this.sortDirection); + this.categoryIds, + this.after, + this.before, + this.limit, + this.q, + this.sortKey, + this.sortDirection, + this.hasComponents, + this.hasActions, + this.hasTriggers); } @java.lang.Override @@ -167,6 +215,12 @@ public static final class Builder { private Optional sortDirection = Optional.empty(); + private Optional hasComponents = Optional.empty(); + + private Optional hasActions = Optional.empty(); + + private Optional hasTriggers = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -180,6 +234,9 @@ public Builder from(AppsListRequest other) { q(other.getQ()); sortKey(other.getSortKey()); sortDirection(other.getSortDirection()); + hasComponents(other.getHasComponents()); + hasActions(other.getHasActions()); + hasTriggers(other.getHasTriggers()); return this; } @@ -286,9 +343,61 @@ public Builder sortDirection(AppsListRequestSortDirection sortDirection) { return this; } + /** + *

Filter to apps that have components (actions or triggers)

+ */ + @JsonSetter(value = "has_components", nulls = Nulls.SKIP) + public Builder hasComponents(Optional hasComponents) { + this.hasComponents = hasComponents; + return this; + } + + public Builder hasComponents(Boolean hasComponents) { + this.hasComponents = Optional.ofNullable(hasComponents); + return this; + } + + /** + *

Filter to apps that have actions

+ */ + @JsonSetter(value = "has_actions", nulls = Nulls.SKIP) + public Builder hasActions(Optional hasActions) { + this.hasActions = hasActions; + return this; + } + + public Builder hasActions(Boolean hasActions) { + this.hasActions = Optional.ofNullable(hasActions); + return this; + } + + /** + *

Filter to apps that have triggers

+ */ + @JsonSetter(value = "has_triggers", nulls = Nulls.SKIP) + public Builder hasTriggers(Optional hasTriggers) { + this.hasTriggers = hasTriggers; + return this; + } + + public Builder hasTriggers(Boolean hasTriggers) { + this.hasTriggers = Optional.ofNullable(hasTriggers); + return this; + } + public AppsListRequest build() { return new AppsListRequest( - categoryIds, after, before, limit, q, sortKey, sortDirection, additionalProperties); + categoryIds, + after, + before, + limit, + q, + sortKey, + sortDirection, + hasComponents, + hasActions, + hasTriggers, + additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/projects/requests/CreateProjectOpts.java b/src/main/java/com/pipedream/api/resources/projects/requests/CreateProjectOpts.java index c8d49e1..f68a1a8 100644 --- a/src/main/java/com/pipedream/api/resources/projects/requests/CreateProjectOpts.java +++ b/src/main/java/com/pipedream/api/resources/projects/requests/CreateProjectOpts.java @@ -27,16 +27,20 @@ public final class CreateProjectOpts { private final Optional supportEmail; + private final Optional connectRequireKeyAuthTest; + private final Map additionalProperties; private CreateProjectOpts( String name, Optional appName, Optional supportEmail, + Optional connectRequireKeyAuthTest, Map additionalProperties) { this.name = name; this.appName = appName; this.supportEmail = supportEmail; + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; this.additionalProperties = additionalProperties; } @@ -64,6 +68,14 @@ public Optional getSupportEmail() { return supportEmail; } + /** + * @return Send a test request to the upstream API when adding Connect accounts for key-based apps + */ + @JsonProperty("connect_require_key_auth_test") + public Optional getConnectRequireKeyAuthTest() { + return connectRequireKeyAuthTest; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -76,12 +88,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(CreateProjectOpts other) { - return name.equals(other.name) && appName.equals(other.appName) && supportEmail.equals(other.supportEmail); + return name.equals(other.name) + && appName.equals(other.appName) + && supportEmail.equals(other.supportEmail) + && connectRequireKeyAuthTest.equals(other.connectRequireKeyAuthTest); } @java.lang.Override public int hashCode() { - return Objects.hash(this.name, this.appName, this.supportEmail); + return Objects.hash(this.name, this.appName, this.supportEmail, this.connectRequireKeyAuthTest); } @java.lang.Override @@ -118,12 +133,21 @@ public interface _FinalStage { _FinalStage supportEmail(Optional supportEmail); _FinalStage supportEmail(String supportEmail); + + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ */ + _FinalStage connectRequireKeyAuthTest(Optional connectRequireKeyAuthTest); + + _FinalStage connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional connectRequireKeyAuthTest = Optional.empty(); + private Optional supportEmail = Optional.empty(); private Optional appName = Optional.empty(); @@ -138,6 +162,7 @@ public Builder from(CreateProjectOpts other) { name(other.getName()); appName(other.getAppName()); supportEmail(other.getSupportEmail()); + connectRequireKeyAuthTest(other.getConnectRequireKeyAuthTest()); return this; } @@ -153,6 +178,26 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = Optional.ofNullable(connectRequireKeyAuthTest); + return this; + } + + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ */ + @java.lang.Override + @JsonSetter(value = "connect_require_key_auth_test", nulls = Nulls.SKIP) + public _FinalStage connectRequireKeyAuthTest(Optional connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; + return this; + } + /** *

Support email displayed to end users

* @return Reference to {@code this} so that method calls can be chained together. @@ -195,7 +240,7 @@ public _FinalStage appName(Optional appName) { @java.lang.Override public CreateProjectOpts build() { - return new CreateProjectOpts(name, appName, supportEmail, additionalProperties); + return new CreateProjectOpts(name, appName, supportEmail, connectRequireKeyAuthTest, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/projects/requests/UpdateProjectOpts.java b/src/main/java/com/pipedream/api/resources/projects/requests/UpdateProjectOpts.java index 7aba7fb..b0d108b 100644 --- a/src/main/java/com/pipedream/api/resources/projects/requests/UpdateProjectOpts.java +++ b/src/main/java/com/pipedream/api/resources/projects/requests/UpdateProjectOpts.java @@ -26,16 +26,20 @@ public final class UpdateProjectOpts { private final Optional supportEmail; + private final Optional connectRequireKeyAuthTest; + private final Map additionalProperties; private UpdateProjectOpts( Optional name, Optional appName, Optional supportEmail, + Optional connectRequireKeyAuthTest, Map additionalProperties) { this.name = name; this.appName = appName; this.supportEmail = supportEmail; + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; this.additionalProperties = additionalProperties; } @@ -63,6 +67,14 @@ public Optional getSupportEmail() { return supportEmail; } + /** + * @return Send a test request to the upstream API when adding Connect accounts for key-based apps + */ + @JsonProperty("connect_require_key_auth_test") + public Optional getConnectRequireKeyAuthTest() { + return connectRequireKeyAuthTest; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -75,12 +87,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(UpdateProjectOpts other) { - return name.equals(other.name) && appName.equals(other.appName) && supportEmail.equals(other.supportEmail); + return name.equals(other.name) + && appName.equals(other.appName) + && supportEmail.equals(other.supportEmail) + && connectRequireKeyAuthTest.equals(other.connectRequireKeyAuthTest); } @java.lang.Override public int hashCode() { - return Objects.hash(this.name, this.appName, this.supportEmail); + return Objects.hash(this.name, this.appName, this.supportEmail, this.connectRequireKeyAuthTest); } @java.lang.Override @@ -100,6 +115,8 @@ public static final class Builder { private Optional supportEmail = Optional.empty(); + private Optional connectRequireKeyAuthTest = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -109,6 +126,7 @@ public Builder from(UpdateProjectOpts other) { name(other.getName()); appName(other.getAppName()); supportEmail(other.getSupportEmail()); + connectRequireKeyAuthTest(other.getConnectRequireKeyAuthTest()); return this; } @@ -154,8 +172,22 @@ public Builder supportEmail(String supportEmail) { return this; } + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ */ + @JsonSetter(value = "connect_require_key_auth_test", nulls = Nulls.SKIP) + public Builder connectRequireKeyAuthTest(Optional connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; + return this; + } + + public Builder connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = Optional.ofNullable(connectRequireKeyAuthTest); + return this; + } + public UpdateProjectOpts build() { - return new UpdateProjectOpts(name, appName, supportEmail, additionalProperties); + return new UpdateProjectOpts(name, appName, supportEmail, connectRequireKeyAuthTest, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/Project.java b/src/main/java/com/pipedream/api/types/Project.java index 144772f..a6f8b72 100644 --- a/src/main/java/com/pipedream/api/types/Project.java +++ b/src/main/java/com/pipedream/api/types/Project.java @@ -29,6 +29,8 @@ public final class Project { private final Optional supportEmail; + private final Optional connectRequireKeyAuthTest; + private final Map additionalProperties; private Project( @@ -36,11 +38,13 @@ private Project( String name, Optional appName, Optional supportEmail, + Optional connectRequireKeyAuthTest, Map additionalProperties) { this.id = id; this.name = name; this.appName = appName; this.supportEmail = supportEmail; + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; this.additionalProperties = additionalProperties; } @@ -76,6 +80,14 @@ public Optional getSupportEmail() { return supportEmail; } + /** + * @return Send a test request to the upstream API when adding Connect accounts for key-based apps + */ + @JsonProperty("connect_require_key_auth_test") + public Optional getConnectRequireKeyAuthTest() { + return connectRequireKeyAuthTest; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -91,12 +103,13 @@ private boolean equalTo(Project other) { return id.equals(other.id) && name.equals(other.name) && appName.equals(other.appName) - && supportEmail.equals(other.supportEmail); + && supportEmail.equals(other.supportEmail) + && connectRequireKeyAuthTest.equals(other.connectRequireKeyAuthTest); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.appName, this.supportEmail); + return Objects.hash(this.id, this.name, this.appName, this.supportEmail, this.connectRequireKeyAuthTest); } @java.lang.Override @@ -140,6 +153,13 @@ public interface _FinalStage { _FinalStage supportEmail(Optional supportEmail); _FinalStage supportEmail(String supportEmail); + + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ */ + _FinalStage connectRequireKeyAuthTest(Optional connectRequireKeyAuthTest); + + _FinalStage connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -148,6 +168,8 @@ public static final class Builder implements IdStage, NameStage, _FinalStage { private String name; + private Optional connectRequireKeyAuthTest = Optional.empty(); + private Optional supportEmail = Optional.empty(); private Optional appName = Optional.empty(); @@ -163,6 +185,7 @@ public Builder from(Project other) { name(other.getName()); appName(other.getAppName()); supportEmail(other.getSupportEmail()); + connectRequireKeyAuthTest(other.getConnectRequireKeyAuthTest()); return this; } @@ -190,6 +213,26 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = Optional.ofNullable(connectRequireKeyAuthTest); + return this; + } + + /** + *

Send a test request to the upstream API when adding Connect accounts for key-based apps

+ */ + @java.lang.Override + @JsonSetter(value = "connect_require_key_auth_test", nulls = Nulls.SKIP) + public _FinalStage connectRequireKeyAuthTest(Optional connectRequireKeyAuthTest) { + this.connectRequireKeyAuthTest = connectRequireKeyAuthTest; + return this; + } + /** *

Support email configured for the project

* @return Reference to {@code this} so that method calls can be chained together. @@ -232,7 +275,7 @@ public _FinalStage appName(Optional appName) { @java.lang.Override public Project build() { - return new Project(id, name, appName, supportEmail, additionalProperties); + return new Project(id, name, appName, supportEmail, connectRequireKeyAuthTest, additionalProperties); } } }