diff --git a/.fern/metadata.json b/.fern/metadata.json index 4d20afc..60ab4af 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,7 +10,7 @@ ], "retry-status-codes": "legacy" }, - "originGitCommit": "4ec89179f0cd7c09cc536f40a9c42a089d9cd425", + "originGitCommit": "55f4ed66327cc60c86a1edef9596d71673752c85", "originGitCommitIsDirty": false, "invokedBy": "ci", "ciProvider": "github", diff --git a/.fern/replay.lock b/.fern/replay.lock index 60be37c..94e641f 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -18,5 +18,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-java-sdk: 4.8.4 -current_generation: e296916f2e3ace45c8c47dc725cbb525c94a22b7 + - commit_sha: 0ed78dd1a3c4a70635cb29def9f461322f6937bc + tree_hash: 68b8f9f37298586f572e3a7ce732e8c6f9e48b72 + timestamp: 2026-09-03T18:10:23.697Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.8.4 +current_generation: 0ed78dd1a3c4a70635cb29def9f461322f6937bc patches: [] diff --git a/src/main/java/com/pipedream/api/resources/oauthapps/requests/CreateOauthAppOpts.java b/src/main/java/com/pipedream/api/resources/oauthapps/requests/CreateOauthAppOpts.java index a828022..0a8b55f 100644 --- a/src/main/java/com/pipedream/api/resources/oauthapps/requests/CreateOauthAppOpts.java +++ b/src/main/java/com/pipedream/api/resources/oauthapps/requests/CreateOauthAppOpts.java @@ -24,9 +24,9 @@ public final class CreateOauthAppOpts { private final String app; - private final String clientId; + private final Optional clientId; - private final String clientSecret; + private final Optional clientSecret; private final Optional name; @@ -40,8 +40,8 @@ public final class CreateOauthAppOpts { private CreateOauthAppOpts( String app, - String clientId, - String clientSecret, + Optional clientId, + Optional clientSecret, Optional name, Optional description, Optional> scopes, @@ -66,18 +66,18 @@ public String getApp() { } /** - * @return The OAuth client ID registered with the upstream provider + * @return The OAuth client ID registered with the upstream provider. Optional: providers that only issue credentials once they have a callback URL can be registered without one, and the client cannot connect accounts until it is set. */ @JsonProperty("client_id") - public String getClientId() { + public Optional getClientId() { return clientId; } /** - * @return The OAuth client secret. Write-only; never returned in responses. + * @return The OAuth client secret. Optional, like the client ID. Write-only; never returned in responses. */ @JsonProperty("client_secret") - public String getClientSecret() { + public Optional getClientSecret() { return clientSecret; } @@ -159,25 +159,11 @@ public interface AppStage { /** *

The app's ID or name slug. The app must have custom OAuth clients enabled.

*/ - ClientIdStage app(@NotNull String app); + _FinalStage app(@NotNull String app); Builder from(CreateOauthAppOpts other); } - public interface ClientIdStage { - /** - *

The OAuth client ID registered with the upstream provider

- */ - ClientSecretStage clientId(@NotNull String clientId); - } - - public interface ClientSecretStage { - /** - *

The OAuth client secret. Write-only; never returned in responses.

- */ - _FinalStage clientSecret(@NotNull String clientSecret); - } - public interface _FinalStage { CreateOauthAppOpts build(); @@ -185,6 +171,20 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

The OAuth client ID registered with the upstream provider. Optional: providers that only issue credentials once they have a callback URL can be registered without one, and the client cannot connect accounts until it is set.

+ */ + _FinalStage clientId(Optional clientId); + + _FinalStage clientId(String clientId); + + /** + *

The OAuth client secret. Optional, like the client ID. Write-only; never returned in responses.

+ */ + _FinalStage clientSecret(Optional clientSecret); + + _FinalStage clientSecret(String clientSecret); + /** *

Display name of the OAuth client

*/ @@ -215,13 +215,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppStage, ClientIdStage, ClientSecretStage, _FinalStage { + public static final class Builder implements AppStage, _FinalStage { private String app; - private String clientId; - - private String clientSecret; - private Optional> additionalScopes = Optional.empty(); private Optional> scopes = Optional.empty(); @@ -230,6 +226,10 @@ public static final class Builder implements AppStage, ClientIdStage, ClientSecr private Optional name = Optional.empty(); + private Optional clientSecret = Optional.empty(); + + private Optional clientId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -254,35 +254,11 @@ public Builder from(CreateOauthAppOpts other) { */ @java.lang.Override @JsonSetter("app") - public ClientIdStage app(@NotNull String app) { + public _FinalStage app(@NotNull String app) { this.app = Objects.requireNonNull(app, "app must not be null"); return this; } - /** - *

The OAuth client ID registered with the upstream provider

- *

The OAuth client ID registered with the upstream provider

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

The OAuth client secret. Write-only; never returned in responses.

- *

The OAuth client secret. Write-only; never returned in responses.

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

Extra OAuth scopes users may grant on top of the base scopes

* @return Reference to {@code this} so that method calls can be chained together. @@ -363,6 +339,46 @@ public _FinalStage name(Optional name) { return this; } + /** + *

The OAuth client secret. Optional, like the client ID. Write-only; never returned in responses.

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

The OAuth client secret. Optional, like the client ID. Write-only; never returned in responses.

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

The OAuth client ID registered with the upstream provider. Optional: providers that only issue credentials once they have a callback URL can be registered without one, and the client cannot connect accounts until it is set.

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

The OAuth client ID registered with the upstream provider. Optional: providers that only issue credentials once they have a callback URL can be registered without one, and the client cannot connect accounts until it is set.

+ */ + @java.lang.Override + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public _FinalStage clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + @java.lang.Override public CreateOauthAppOpts build() { return new CreateOauthAppOpts( diff --git a/src/main/java/com/pipedream/api/resources/oauthapps/requests/UpdateOauthAppOpts.java b/src/main/java/com/pipedream/api/resources/oauthapps/requests/UpdateOauthAppOpts.java index 0585513..73ff2c1 100644 --- a/src/main/java/com/pipedream/api/resources/oauthapps/requests/UpdateOauthAppOpts.java +++ b/src/main/java/com/pipedream/api/resources/oauthapps/requests/UpdateOauthAppOpts.java @@ -69,7 +69,7 @@ public Optional getDescription() { } /** - * @return The OAuth client ID registered with the upstream provider + * @return The OAuth client ID registered with the upstream provider. Blank values are ignored and the existing client ID is kept. */ @JsonProperty("client_id") public Optional getClientId() { @@ -193,7 +193,7 @@ public Builder description(String description) { } /** - *

The OAuth client ID registered with the upstream provider

+ *

The OAuth client ID registered with the upstream provider. Blank values are ignored and the existing client ID is kept.

*/ @JsonSetter(value = "client_id", nulls = Nulls.SKIP) public Builder clientId(Optional clientId) { diff --git a/src/main/java/com/pipedream/api/types/OauthApp.java b/src/main/java/com/pipedream/api/types/OauthApp.java index e361ec8..02678f5 100644 --- a/src/main/java/com/pipedream/api/types/OauthApp.java +++ b/src/main/java/com/pipedream/api/types/OauthApp.java @@ -26,7 +26,7 @@ public final class OauthApp { private final Optional id; - private final String clientId; + private final Optional clientId; private final Optional> scopes; @@ -62,7 +62,7 @@ public final class OauthApp { private OauthApp( Optional id, - String clientId, + Optional clientId, Optional> scopes, Optional> additionalScopes, Optional redirectUri, @@ -108,10 +108,10 @@ public Optional getId() { } /** - * @return The OAuth client ID registered with the upstream provider + * @return The OAuth client ID registered with the upstream provider. Null for a client registered before its provider issued credentials. */ @JsonProperty("client_id") - public String getClientId() { + public Optional getClientId() { return clientId; } @@ -284,24 +284,17 @@ public String toString() { return ObjectMappers.stringify(this); } - public static ClientIdStage builder() { + public static OwnerIdStage builder() { return new Builder(); } - public interface ClientIdStage { - /** - *

The OAuth client ID registered with the upstream provider

- */ - OwnerIdStage clientId(@NotNull String clientId); - - Builder from(OauthApp other); - } - public interface OwnerIdStage { /** *

Hash ID of the owner: the workspace (o_...) or the project (proj_...)

*/ NameSlugStage ownerId(@NotNull String ownerId); + + Builder from(OauthApp other); } public interface NameSlugStage { @@ -346,6 +339,13 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

The OAuth client ID registered with the upstream provider. Null for a client registered before its provider issued credentials.

+ */ + _FinalStage clientId(Optional clientId); + + _FinalStage clientId(String clientId); + /** *

OAuth scopes requested when users connect through this client

*/ @@ -414,15 +414,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder - implements ClientIdStage, - OwnerIdStage, - NameSlugStage, - NameStage, - ImgSrcStage, - FeaturedWeightStage, - _FinalStage { - private String clientId; - + implements OwnerIdStage, NameSlugStage, NameStage, ImgSrcStage, FeaturedWeightStage, _FinalStage { private String ownerId; private String nameSlug; @@ -453,6 +445,8 @@ public static final class Builder private Optional> scopes = Optional.empty(); + private Optional clientId = Optional.empty(); + private Optional id = Optional.empty(); @JsonAnySetter @@ -482,18 +476,6 @@ public Builder from(OauthApp other) { return this; } - /** - *

The OAuth client ID registered with the upstream provider

- *

The OAuth client ID registered with the upstream provider

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

Hash ID of the owner: the workspace (o_...) or the project (proj_...)

*

Hash ID of the owner: the workspace (o_...) or the project (proj_...)

@@ -763,6 +745,26 @@ public _FinalStage scopes(Optional> scopes) { return this; } + /** + *

The OAuth client ID registered with the upstream provider. Null for a client registered before its provider issued credentials.

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

The OAuth client ID registered with the upstream provider. Null for a client registered before its provider issued credentials.

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

Hash ID for the OAuth client

* @return Reference to {@code this} so that method calls can be chained together.