Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.pipedream</groupId>
<artifactId>pipedream</artifactId>
<version>1.1.3</version>
<version>1.1.4</version>
</dependency>
```

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ java {

group = 'com.pipedream'

version = '1.1.3'
version = '1.1.4'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/pipedream/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ public CompletableFuture<BaseClientHttpResponse<SyncPagingIterable<App>>> 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);
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/pipedream/api/resources/apps/RawAppsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ public BaseClientHttpResponse<SyncPagingIterable<App>> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public final class AppsListRequest {

private final Optional<AppsListRequestSortDirection> sortDirection;

private final Optional<Boolean> hasComponents;

private final Optional<Boolean> hasActions;

private final Optional<Boolean> hasTriggers;

private final Map<String, Object> additionalProperties;

private AppsListRequest(
Expand All @@ -48,6 +54,9 @@ private AppsListRequest(
Optional<String> q,
Optional<AppsListRequestSortKey> sortKey,
Optional<AppsListRequestSortDirection> sortDirection,
Optional<Boolean> hasComponents,
Optional<Boolean> hasActions,
Optional<Boolean> hasTriggers,
Map<String, Object> additionalProperties) {
this.categoryIds = categoryIds;
this.after = after;
Expand All @@ -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;
}

Expand Down Expand Up @@ -115,6 +127,30 @@ public Optional<AppsListRequestSortDirection> getSortDirection() {
return sortDirection;
}

/**
* @return Filter to apps that have components (actions or triggers)
*/
@JsonProperty("has_components")
public Optional<Boolean> getHasComponents() {
return hasComponents;
}

/**
* @return Filter to apps that have actions
*/
@JsonProperty("has_actions")
public Optional<Boolean> getHasActions() {
return hasActions;
}

/**
* @return Filter to apps that have triggers
*/
@JsonProperty("has_triggers")
public Optional<Boolean> getHasTriggers() {
return hasTriggers;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -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
Expand Down Expand Up @@ -167,6 +215,12 @@ public static final class Builder {

private Optional<AppsListRequestSortDirection> sortDirection = Optional.empty();

private Optional<Boolean> hasComponents = Optional.empty();

private Optional<Boolean> hasActions = Optional.empty();

private Optional<Boolean> hasTriggers = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

Expand All @@ -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;
}

Expand Down Expand Up @@ -286,9 +343,61 @@ public Builder sortDirection(AppsListRequestSortDirection sortDirection) {
return this;
}

/**
* <p>Filter to apps that have components (actions or triggers)</p>
*/
@JsonSetter(value = "has_components", nulls = Nulls.SKIP)
public Builder hasComponents(Optional<Boolean> hasComponents) {
this.hasComponents = hasComponents;
return this;
}

public Builder hasComponents(Boolean hasComponents) {
this.hasComponents = Optional.ofNullable(hasComponents);
return this;
}

/**
* <p>Filter to apps that have actions</p>
*/
@JsonSetter(value = "has_actions", nulls = Nulls.SKIP)
public Builder hasActions(Optional<Boolean> hasActions) {
this.hasActions = hasActions;
return this;
}

public Builder hasActions(Boolean hasActions) {
this.hasActions = Optional.ofNullable(hasActions);
return this;
}

/**
* <p>Filter to apps that have triggers</p>
*/
@JsonSetter(value = "has_triggers", nulls = Nulls.SKIP)
public Builder hasTriggers(Optional<Boolean> 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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ public final class CreateProjectOpts {

private final Optional<String> supportEmail;

private final Optional<Boolean> connectRequireKeyAuthTest;

private final Map<String, Object> additionalProperties;

private CreateProjectOpts(
String name,
Optional<String> appName,
Optional<String> supportEmail,
Optional<Boolean> connectRequireKeyAuthTest,
Map<String, Object> additionalProperties) {
this.name = name;
this.appName = appName;
this.supportEmail = supportEmail;
this.connectRequireKeyAuthTest = connectRequireKeyAuthTest;
this.additionalProperties = additionalProperties;
}

Expand Down Expand Up @@ -64,6 +68,14 @@ public Optional<String> 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<Boolean> getConnectRequireKeyAuthTest() {
return connectRequireKeyAuthTest;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -76,12 +88,15 @@ public Map<String, Object> 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
Expand Down Expand Up @@ -118,12 +133,21 @@ public interface _FinalStage {
_FinalStage supportEmail(Optional<String> supportEmail);

_FinalStage supportEmail(String supportEmail);

/**
* <p>Send a test request to the upstream API when adding Connect accounts for key-based apps</p>
*/
_FinalStage connectRequireKeyAuthTest(Optional<Boolean> connectRequireKeyAuthTest);

_FinalStage connectRequireKeyAuthTest(Boolean connectRequireKeyAuthTest);
}

@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements NameStage, _FinalStage {
private String name;

private Optional<Boolean> connectRequireKeyAuthTest = Optional.empty();

private Optional<String> supportEmail = Optional.empty();

private Optional<String> appName = Optional.empty();
Expand All @@ -138,6 +162,7 @@ public Builder from(CreateProjectOpts other) {
name(other.getName());
appName(other.getAppName());
supportEmail(other.getSupportEmail());
connectRequireKeyAuthTest(other.getConnectRequireKeyAuthTest());
return this;
}

Expand All @@ -153,6 +178,26 @@ public _FinalStage name(@NotNull String name) {
return this;
}

/**
* <p>Send a test request to the upstream API when adding Connect accounts for key-based apps</p>
* @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;
}

/**
* <p>Send a test request to the upstream API when adding Connect accounts for key-based apps</p>
*/
@java.lang.Override
@JsonSetter(value = "connect_require_key_auth_test", nulls = Nulls.SKIP)
public _FinalStage connectRequireKeyAuthTest(Optional<Boolean> connectRequireKeyAuthTest) {
this.connectRequireKeyAuthTest = connectRequireKeyAuthTest;
return this;
}

/**
* <p>Support email displayed to end users</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down Expand Up @@ -195,7 +240,7 @@ public _FinalStage appName(Optional<String> appName) {

@java.lang.Override
public CreateProjectOpts build() {
return new CreateProjectOpts(name, appName, supportEmail, additionalProperties);
return new CreateProjectOpts(name, appName, supportEmail, connectRequireKeyAuthTest, additionalProperties);
}
}
}
Loading