diff --git a/.gradle/8.14.3/checksums/checksums.lock b/.gradle/8.14.3/checksums/checksums.lock index 38e96d8..eb0237a 100644 Binary files a/.gradle/8.14.3/checksums/checksums.lock and b/.gradle/8.14.3/checksums/checksums.lock differ diff --git a/.gradle/8.14.3/checksums/md5-checksums.bin b/.gradle/8.14.3/checksums/md5-checksums.bin index 342eb41..8ca95b1 100644 Binary files a/.gradle/8.14.3/checksums/md5-checksums.bin and b/.gradle/8.14.3/checksums/md5-checksums.bin differ diff --git a/.gradle/8.14.3/checksums/sha1-checksums.bin b/.gradle/8.14.3/checksums/sha1-checksums.bin index 72de126..f5bf89e 100644 Binary files a/.gradle/8.14.3/checksums/sha1-checksums.bin and b/.gradle/8.14.3/checksums/sha1-checksums.bin differ diff --git a/.gradle/8.14.3/executionHistory/executionHistory.bin b/.gradle/8.14.3/executionHistory/executionHistory.bin index 75f022a..9736935 100644 Binary files a/.gradle/8.14.3/executionHistory/executionHistory.bin and b/.gradle/8.14.3/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.14.3/executionHistory/executionHistory.lock b/.gradle/8.14.3/executionHistory/executionHistory.lock index 4421929..bc60ef9 100644 Binary files a/.gradle/8.14.3/executionHistory/executionHistory.lock and b/.gradle/8.14.3/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.14.3/fileHashes/fileHashes.bin b/.gradle/8.14.3/fileHashes/fileHashes.bin index 95375c2..5d0ba04 100644 Binary files a/.gradle/8.14.3/fileHashes/fileHashes.bin and b/.gradle/8.14.3/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.14.3/fileHashes/fileHashes.lock b/.gradle/8.14.3/fileHashes/fileHashes.lock index 79836cc..369aada 100644 Binary files a/.gradle/8.14.3/fileHashes/fileHashes.lock and b/.gradle/8.14.3/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 35c82f0..9a5b4c6 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties index e022fa9..e794940 100644 --- a/.gradle/buildOutputCleanup/cache.properties +++ b/.gradle/buildOutputCleanup/cache.properties @@ -1,2 +1,2 @@ -#Thu Jul 17 22:51:20 UTC 2025 +#Thu Jul 17 23:20:42 UTC 2025 gradle.version=8.14.3 diff --git a/README.md b/README.md index 02a0dc5..b2eef40 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 0.0.193 + 0.0.199 ``` diff --git a/build.gradle b/build.gradle index 444545a..a148701 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,8 @@ dependencies { api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' + implementation 'org.apache.commons:commons-text:1.11.0' + testImplementation 'org.apache.commons:commons-text:1.11.0' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } @@ -46,7 +48,7 @@ java { group = 'com.pipedream' -version = '0.0.193' +version = '0.0.199' jar { dependsOn(":generatePomFileForMavenPublication") @@ -77,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '0.0.193' + version = '0.0.199' from components.java pom { name = 'pipedream' diff --git a/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/ClientOptions.java b/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/ClientOptions.java index 2282eda..3699046 100644 --- a/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/build/spotless/spotlessJava/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.193"); + put("X-Fern-SDK-Version", "0.0.199"); } }); this.headerSuppliers = headerSuppliers; diff --git a/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java b/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java index a91bea5..82c8f4f 100644 --- a/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java +++ b/build/spotless/spotlessJava/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java @@ -8,7 +8,6 @@ import java.util.Objects; import okhttp3.MediaType; import okhttp3.RequestBody; -import okhttp3.internal.Util; import okio.BufferedSink; import okio.Okio; import okio.Source; @@ -68,12 +67,8 @@ public long contentLength() throws IOException { */ @Override public void writeTo(BufferedSink sink) throws IOException { - Source source = null; - try { - source = Okio.source(inputStream); + try (Source source = Okio.source(inputStream)) { sink.writeAll(source); - } finally { - Util.closeQuietly(Objects.requireNonNull(source)); } } } diff --git a/build/spotless/spotlessJava/src/test/java/com/pipedream/api/StreamTest.java b/build/spotless/spotlessJava/src/test/java/com/pipedream/api/StreamTest.java index a0f9ca9..57130cb 100644 --- a/build/spotless/spotlessJava/src/test/java/com/pipedream/api/StreamTest.java +++ b/build/spotless/spotlessJava/src/test/java/com/pipedream/api/StreamTest.java @@ -18,7 +18,7 @@ public final class StreamTest { @Test public void testJsonStream() { List messages = List.of(Map.of("message", "hello"), Map.of("message", "world")); - List jsonStrings = messages.stream().map(StreamTest::mapToJson).toList(); + List jsonStrings = messages.stream().map(StreamTest::mapToJson).collect(Collectors.toList()); String input = String.join("\n", jsonStrings); StringReader jsonInput = new StringReader(input); Stream jsonStream = Stream.fromJson(Map.class, jsonInput); @@ -34,7 +34,7 @@ public void testJsonStream() { @Test public void testSseStream() { List events = List.of(Map.of("event", "start"), Map.of("event", "end")); - List sseStrings = events.stream().map(StreamTest::mapToSse).toList(); + List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); String input = String.join("\n" + "\n", sseStrings); StringReader sseInput = new StringReader(input); Stream sseStream = Stream.fromSse(Map.class, sseInput); diff --git a/reference.md b/reference.md new file mode 100644 index 0000000..d4f2874 --- /dev/null +++ b/reference.md @@ -0,0 +1,2883 @@ +# Reference +## AppCategories +
client.appCategories.list() -> List<AppCategory> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.appCategories().list(); +``` +
+
+
+
+ + +
+
+
+ +
client.appCategories.retrieve(id) -> AppCategory +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.appCategories().retrieve("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The ID of the app category to retrieve + +
+
+
+
+ + +
+
+
+ +## Apps +
client.apps.list() -> ListAppsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.apps().list( + AppsListRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**q:** `Optional` — A search query to filter the apps + +
+
+ +
+
+ +**sortKey:** `Optional` — The key to sort the apps by + +
+
+ +
+
+ +**sortDirection:** `Optional` — The direction to sort the apps + +
+
+ +
+
+ +**categoryIds:** `Optional` — Only return apps in these categories + +
+
+
+
+ + +
+
+
+ +
client.apps.retrieve(appId) -> GetAppResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.apps().retrieve("app_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**appId:** `String` — The name slug or ID of the app (e.g., 'slack', 'github') + +
+
+
+
+ + +
+
+
+ +## Accounts +
client.accounts.list(projectId) -> ListAccountsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.accounts().list( + "project_id", + AccountsListRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**appId:** `Optional` — The app slug or ID to filter accounts by. + +
+
+ +
+
+ +**externalUserId:** `Optional` + +
+
+ +
+
+ +**oauthAppId:** `Optional` — The OAuth app ID to filter by, if applicable + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**includeCredentials:** `Optional` — Whether to retrieve the account's credentials or not + +
+
+
+
+ + +
+
+
+ +
client.accounts.create(projectId, request) -> Account +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.accounts().create( + "project_id", + CreateAccountRequest + .builder() + .appSlug("app_slug") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**appId:** `Optional` — The app slug or ID to filter accounts by. + +
+
+ +
+
+ +**externalUserId:** `Optional` + +
+
+ +
+
+ +**oauthAppId:** `Optional` — The OAuth app ID to filter by, if applicable + +
+
+ +
+
+ +**appSlug:** `String` — The app slug for the account + +
+
+ +
+
+ +**cfmapJson:** `Optional` — JSON string containing the custom fields mapping + +
+
+ +
+
+ +**name:** `Optional` — Optional name for the account + +
+
+
+
+ + +
+
+
+ +
client.accounts.retrieve(projectId, accountId) -> Account +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.accounts().retrieve( + "project_id", + "account_id", + AccountsRetrieveRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**accountId:** `String` + +
+
+ +
+
+ +**includeCredentials:** `Optional` — Whether to retrieve the account's credentials or not + +
+
+
+
+ + +
+
+
+ +
client.accounts.delete(projectId, accountId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.accounts().delete("project_id", "account_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**accountId:** `String` + +
+
+
+
+ + +
+
+
+ +
client.accounts.deleteByApp(projectId, appId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.accounts().deleteByApp("project_id", "app_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**appId:** `String` + +
+
+
+
+ + +
+
+
+ +## Users +
client.users.deleteExternalUser(projectId, externalUserId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.users().deleteExternalUser("project_id", "external_user_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**externalUserId:** `String` + +
+
+
+
+ + +
+
+
+ +## Components +
client.components.list(projectId) -> GetComponentsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.components().list( + "project_id", + ComponentsListRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**q:** `Optional` — A search query to filter the components + +
+
+ +
+
+ +**app:** `Optional` — The ID or name slug of the app to filter the components + +
+
+
+
+ + +
+
+
+ +
client.components.retrieve(projectId, componentId) -> GetComponentResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.components().retrieve("project_id", "component_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message') + +
+
+
+
+ + +
+
+
+ +
client.components.configureProp(projectId, request) -> ConfigurePropResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.components().configureProp( + "project_id", + ComponentsConfigurePropRequest + .builder() + .body( + ConfigurePropOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .propName("prop_name") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ConfigurePropOpts` + +
+
+
+
+ + +
+
+
+ +
client.components.reloadProps(projectId, request) -> ReloadPropsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.components().reloadProps( + "project_id", + ComponentsReloadPropsRequest + .builder() + .body( + ReloadPropsOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ReloadPropsOpts` + +
+
+
+
+ + +
+
+
+ +## Actions +
client.actions.list(projectId) -> GetComponentsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().list( + "project_id", + ActionsListRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**q:** `Optional` — A search query to filter the actions + +
+
+ +
+
+ +**app:** `Optional` — The ID or name slug of the app to filter the actions + +
+
+
+
+ + +
+
+
+ +
client.actions.retrieve(projectId, componentId) -> GetComponentResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().retrieve("project_id", "component_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message') + +
+
+
+
+ + +
+
+
+ +
client.actions.configureProp(projectId, request) -> ConfigurePropResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().configureProp( + "project_id", + ActionsConfigurePropRequest + .builder() + .body( + ConfigurePropOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .propName("prop_name") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ConfigurePropOpts` + +
+
+
+
+ + +
+
+
+ +
client.actions.reloadProps(projectId, request) -> ReloadPropsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().reloadProps( + "project_id", + ActionsReloadPropsRequest + .builder() + .body( + ReloadPropsOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ReloadPropsOpts` + +
+
+
+
+ + +
+
+
+ +
client.actions.run(projectId, request) -> RunActionResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().run( + "project_id", + RunActionOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**id:** `String` — The action component ID + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID + +
+
+ +
+
+ +**configuredProps:** `Optional>` — The configured properties for the action + +
+
+ +
+
+ +**dynamicPropsId:** `Optional` — The ID for dynamic props + +
+
+
+
+ + +
+
+
+ +## Triggers +
client.triggers.list(projectId) -> GetComponentsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.triggers().list( + "project_id", + TriggersListRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**q:** `Optional` — A search query to filter the triggers + +
+
+ +
+
+ +**app:** `Optional` — The ID or name slug of the app to filter the triggers + +
+
+
+
+ + +
+
+
+ +
client.triggers.retrieve(projectId, componentId) -> GetComponentResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.triggers().retrieve("project_id", "component_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**componentId:** `String` — The key that uniquely identifies the component (e.g., 'slack-send-message') + +
+
+
+
+ + +
+
+
+ +
client.triggers.configureProp(projectId, request) -> ConfigurePropResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.triggers().configureProp( + "project_id", + TriggersConfigurePropRequest + .builder() + .body( + ConfigurePropOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .propName("prop_name") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ConfigurePropOpts` + +
+
+
+
+ + +
+
+
+ +
client.triggers.reloadProps(projectId, request) -> ReloadPropsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.triggers().reloadProps( + "project_id", + TriggersReloadPropsRequest + .builder() + .body( + ReloadPropsOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**asyncHandle:** `Optional` + +
+
+ +
+
+ +**request:** `ReloadPropsOpts` + +
+
+
+
+ + +
+
+
+ +
client.triggers.deploy(projectId, request) -> DeployTriggerResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.triggers().deploy( + "project_id", + DeployTriggerOpts + .builder() + .id("id") + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**id:** `String` — The trigger component ID + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID + +
+
+ +
+
+ +**configuredProps:** `Optional>` — The configured properties for the trigger + +
+
+ +
+
+ +**dynamicPropsId:** `Optional` — The ID for dynamic props + +
+
+ +
+
+ +**webhookUrl:** `Optional` — Optional webhook URL to receive trigger events + +
+
+
+
+ + +
+
+
+ +## DeployedTriggers +
client.deployedTriggers.list(projectId) -> GetTriggersResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().list( + "project_id", + DeployedTriggersListRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**after:** `Optional` — The cursor to start from for pagination + +
+
+ +
+
+ +**before:** `Optional` — The cursor to end before for pagination + +
+
+ +
+
+ +**limit:** `Optional` — The maximum number of results to return + +
+
+ +
+
+ +**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.retrieve(projectId, triggerId) -> GetTriggerResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().retrieve( + "project_id", + "trigger_id", + DeployedTriggersRetrieveRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.update(projectId, triggerId, request) -> GetTriggerResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().update( + "project_id", + "trigger_id", + UpdateTriggerOpts + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+ +
+
+ +**active:** `Optional` — Whether the trigger should be active + +
+
+ +
+
+ +**configuredProps:** `Optional>` — The configured properties for the trigger + +
+
+ +
+
+ +**name:** `Optional` — The name of the trigger + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.delete(projectId, triggerId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().delete( + "project_id", + "trigger_id", + DeployedTriggersDeleteRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+ +
+
+ +**ignoreHookErrors:** `Optional` — Whether to ignore errors during deactivation hook + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.listEvents(projectId, triggerId) -> GetTriggerEventsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().listEvents( + "project_id", + "trigger_id", + DeployedTriggersListEventsRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — Your end user ID, for whom you deployed the trigger + +
+
+ +
+
+ +**n:** `Optional` — The number of events to retrieve (defaults to 20 if not provided) + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.listWorkflows(projectId, triggerId) -> GetTriggerWorkflowsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().listWorkflows( + "project_id", + "trigger_id", + DeployedTriggersListWorkflowsRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.updateWorkflows(projectId, triggerId, request) -> GetTriggerWorkflowsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().updateWorkflows( + "project_id", + "trigger_id", + UpdateTriggerWorkflowsOpts + .builder() + .externalUserId("external_user_id") + .workflowIds( + new ArrayList( + Arrays.asList("workflow_ids") + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+ +
+
+ +**workflowIds:** `List` — Array of workflow IDs to set + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.listWebhooks(projectId, triggerId) -> GetTriggerWebhooksResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().listWebhooks( + "project_id", + "trigger_id", + DeployedTriggersListWebhooksRequest + .builder() + .externalUserId("external_user_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+
+
+ + +
+
+
+ +
client.deployedTriggers.updateWebhooks(projectId, triggerId, request) -> GetTriggerWebhooksResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.deployedTriggers().updateWebhooks( + "project_id", + "trigger_id", + UpdateTriggerWebhooksOpts + .builder() + .externalUserId("external_user_id") + .webhookUrls( + new ArrayList( + Arrays.asList("webhook_urls") + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**triggerId:** `String` + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID who owns the trigger + +
+
+ +
+
+ +**webhookUrls:** `List` — Array of webhook URLs to set + +
+
+
+
+ + +
+
+
+ +## Projects +
client.projects.retrieveInfo(projectId) -> ProjectInfoResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.projects().retrieveInfo("project_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+
+
+ + +
+
+
+ +## Proxy +
client.proxy.get(projectId, url64) -> Map<String, Object> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.proxy().get( + "project_id", + "url_64", + ProxyGetRequest + .builder() + .externalUserId("external_user_id") + .accountId("account_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**url64:** `String` — Base64-encoded target URL + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID for the proxy request + +
+
+ +
+
+ +**accountId:** `String` — The account ID to use for authentication + +
+
+
+
+ + +
+
+
+ +
client.proxy.post(projectId, url64, request) -> Map<String, Object> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.proxy().post( + "project_id", + "url_64", + ProxyPostRequest + .builder() + .externalUserId("external_user_id") + .accountId("account_id") + .body( + new HashMap() {{ + put("key", "value"); + }} + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**url64:** `String` — Base64-encoded target URL + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID for the proxy request + +
+
+ +
+
+ +**accountId:** `String` — The account ID to use for authentication + +
+
+ +
+
+ +**request:** `Map` — Request body to forward to the target API + +
+
+
+
+ + +
+
+
+ +
client.proxy.put(projectId, url64, request) -> Map<String, Object> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.proxy().put( + "project_id", + "url_64", + ProxyPutRequest + .builder() + .externalUserId("external_user_id") + .accountId("account_id") + .body( + new HashMap() {{ + put("key", "value"); + }} + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**url64:** `String` — Base64-encoded target URL + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID for the proxy request + +
+
+ +
+
+ +**accountId:** `String` — The account ID to use for authentication + +
+
+ +
+
+ +**request:** `Map` — Request body to forward to the target API + +
+
+
+
+ + +
+
+
+ +
client.proxy.delete(projectId, url64) -> Map<String, Object> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.proxy().delete( + "project_id", + "url_64", + ProxyDeleteRequest + .builder() + .externalUserId("external_user_id") + .accountId("account_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**url64:** `String` — Base64-encoded target URL + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID for the proxy request + +
+
+ +
+
+ +**accountId:** `String` — The account ID to use for authentication + +
+
+
+
+ + +
+
+
+ +
client.proxy.patch(projectId, url64, request) -> Map<String, Object> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.proxy().patch( + "project_id", + "url_64", + ProxyPatchRequest + .builder() + .externalUserId("external_user_id") + .accountId("account_id") + .body( + new HashMap() {{ + put("key", "value"); + }} + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**projectId:** `String` — The project ID, which starts with 'proj_'. + +
+
+ +
+
+ +**url64:** `String` — Base64-encoded target URL + +
+
+ +
+
+ +**externalUserId:** `String` — The external user ID for the proxy request + +
+
+ +
+
+ +**accountId:** `String` — The account ID to use for authentication + +
+
+ +
+
+ +**request:** `Map` — Request body to forward to the target API + +
+
+
+
+ + +
+
+
+ +## Tokens +
client.tokens.create(request) -> CreateTokenResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.tokens().create( + CreateTokenRequest + .builder() + .externalUserId("external_user_id") + .projectId("project_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**allowedOrigins:** `Optional>` — List of allowed origins for CORS + +
+
+ +
+
+ +**errorRedirectUri:** `Optional` — URI to redirect to on error + +
+
+ +
+
+ +**externalUserId:** `String` — Your end user ID, for whom you're creating the token + +
+
+ +
+
+ +**projectId:** `String` — The ID of the project + +
+
+ +
+
+ +**successRedirectUri:** `Optional` — URI to redirect to on success + +
+
+ +
+
+ +**webhookUri:** `Optional` — Webhook URI for notifications + +
+
+
+
+ + +
+
+
+ +
client.tokens.validate(ctok) -> ValidateTokenResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.tokens().validate( + "ctok", + TokensValidateRequest + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ctok:** `String` + +
+
+ +
+
+ +**params:** `Optional` + +
+
+
+
+ + +
+
+
+ +## OauthTokens +
client.oauthTokens.create(request) -> CreateOAuthTokenResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.oauthTokens().create( + CreateOAuthTokenOpts + .builder() + .grantType("client_credentials") + .clientId("client_id") + .clientSecret("client_secret") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**grantType:** `String` + +
+
+ +
+
+ +**clientId:** `String` + +
+
+ +
+
+ +**clientSecret:** `String` + +
+
+
+
+ + +
+
+
diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java index 2282eda..3699046 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.193"); + put("X-Fern-SDK-Version", "0.0.199"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java b/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java index a91bea5..82c8f4f 100644 --- a/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java +++ b/src/main/java/com/pipedream/api/core/InputStreamRequestBody.java @@ -8,7 +8,6 @@ import java.util.Objects; import okhttp3.MediaType; import okhttp3.RequestBody; -import okhttp3.internal.Util; import okio.BufferedSink; import okio.Okio; import okio.Source; @@ -68,12 +67,8 @@ public long contentLength() throws IOException { */ @Override public void writeTo(BufferedSink sink) throws IOException { - Source source = null; - try { - source = Okio.source(inputStream); + try (Source source = Okio.source(inputStream)) { sink.writeAll(source); - } finally { - Util.closeQuietly(Objects.requireNonNull(source)); } } } diff --git a/src/test/java/com/pipedream/api/StreamTest.java b/src/test/java/com/pipedream/api/StreamTest.java index a0f9ca9..57130cb 100644 --- a/src/test/java/com/pipedream/api/StreamTest.java +++ b/src/test/java/com/pipedream/api/StreamTest.java @@ -18,7 +18,7 @@ public final class StreamTest { @Test public void testJsonStream() { List messages = List.of(Map.of("message", "hello"), Map.of("message", "world")); - List jsonStrings = messages.stream().map(StreamTest::mapToJson).toList(); + List jsonStrings = messages.stream().map(StreamTest::mapToJson).collect(Collectors.toList()); String input = String.join("\n", jsonStrings); StringReader jsonInput = new StringReader(input); Stream jsonStream = Stream.fromJson(Map.class, jsonInput); @@ -34,7 +34,7 @@ public void testJsonStream() { @Test public void testSseStream() { List events = List.of(Map.of("event", "start"), Map.of("event", "end")); - List sseStrings = events.stream().map(StreamTest::mapToSse).toList(); + List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); String input = String.join("\n" + "\n", sseStrings); StringReader sseInput = new StringReader(input); Stream sseStream = Stream.fromSse(Map.class, sseInput);