Skip to content

Commit 82713e2

Browse files
Improve the Account and ConfigurablePropDir schemas
* Add the new `authorizedScopes` field to the `Account` schema * Add the missing `accessMode` and `sync` fields to the `ConfigurablePropDir` prop type
1 parent 06ec1ff commit 82713e2

6 files changed

Lines changed: 226 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Add the dependency in your `build.gradle` file:
2828

2929
```groovy
3030
dependencies {
31-
implementation 'com.pipedream:pipedream:1.1.11'
31+
implementation 'com.pipedream:pipedream:1.1.12'
3232
}
3333
```
3434

@@ -40,7 +40,7 @@ Add the dependency in your `pom.xml` file:
4040
<dependency>
4141
<groupId>com.pipedream</groupId>
4242
<artifactId>pipedream</artifactId>
43-
<version>1.1.11</version>
43+
<version>1.1.12</version>
4444
</dependency>
4545
```
4646

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ java {
4949

5050
group = 'com.pipedream'
5151

52-
version = '1.1.11'
52+
version = '1.1.12'
5353

5454
jar {
5555
dependsOn(":generatePomFileForMavenPublication")
@@ -80,7 +80,7 @@ publishing {
8080
maven(MavenPublication) {
8181
groupId = 'com.pipedream'
8282
artifactId = 'pipedream'
83-
version = '1.1.11'
83+
version = '1.1.12'
8484
from components.java
8585
pom {
8686
name = 'pipedream'

src/main/java/com/pipedream/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ private ClientOptions(
3535
this.headers.putAll(headers);
3636
this.headers.putAll(new HashMap<String, String>() {
3737
{
38-
put("User-Agent", "com.pipedream:pipedream/1.1.11");
38+
put("User-Agent", "com.pipedream:pipedream/1.1.12");
3939
put("X-Fern-Language", "JAVA");
4040
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
41-
put("X-Fern-SDK-Version", "1.1.11");
41+
put("X-Fern-SDK-Version", "1.1.12");
4242
}
4343
});
4444
this.headerSuppliers = headerSuppliers;

src/main/java/com/pipedream/api/types/Account.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.pipedream.api.core.ObjectMappers;
1515
import java.time.OffsetDateTime;
1616
import java.util.HashMap;
17+
import java.util.List;
1718
import java.util.Map;
1819
import java.util.Objects;
1920
import java.util.Optional;
@@ -38,6 +39,8 @@ public final class Account {
3839

3940
private final Optional<OffsetDateTime> updatedAt;
4041

42+
private final Optional<List<String>> authorizedScopes;
43+
4144
private final Optional<AccountCredentials> credentials;
4245

4346
private final Optional<OffsetDateTime> expiresAt;
@@ -59,6 +62,7 @@ private Account(
5962
Optional<App> app,
6063
Optional<OffsetDateTime> createdAt,
6164
Optional<OffsetDateTime> updatedAt,
65+
Optional<List<String>> authorizedScopes,
6266
Optional<AccountCredentials> credentials,
6367
Optional<OffsetDateTime> expiresAt,
6468
Optional<String> error,
@@ -73,6 +77,7 @@ private Account(
7377
this.app = app;
7478
this.createdAt = createdAt;
7579
this.updatedAt = updatedAt;
80+
this.authorizedScopes = authorizedScopes;
7681
this.credentials = credentials;
7782
this.expiresAt = expiresAt;
7883
this.error = error;
@@ -139,6 +144,14 @@ public Optional<OffsetDateTime> getUpdatedAt() {
139144
return updatedAt;
140145
}
141146

147+
/**
148+
* @return The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.
149+
*/
150+
@JsonProperty("authorized_scopes")
151+
public Optional<List<String>> getAuthorizedScopes() {
152+
return authorizedScopes;
153+
}
154+
142155
/**
143156
* @return The credentials associated with the account, if the <code>include_credentials</code> parameter was set to true in the request (only applicable for BYOA apps). In addition to the well-known OAuth fields listed below, this object may contain app-specific custom fields (e.g. <code>base_url</code>).
144157
*/
@@ -199,6 +212,7 @@ private boolean equalTo(Account other) {
199212
&& app.equals(other.app)
200213
&& createdAt.equals(other.createdAt)
201214
&& updatedAt.equals(other.updatedAt)
215+
&& authorizedScopes.equals(other.authorizedScopes)
202216
&& credentials.equals(other.credentials)
203217
&& expiresAt.equals(other.expiresAt)
204218
&& error.equals(other.error)
@@ -217,6 +231,7 @@ public int hashCode() {
217231
this.app,
218232
this.createdAt,
219233
this.updatedAt,
234+
this.authorizedScopes,
220235
this.credentials,
221236
this.expiresAt,
222237
this.error,
@@ -288,6 +303,13 @@ public interface _FinalStage {
288303

289304
_FinalStage updatedAt(OffsetDateTime updatedAt);
290305

306+
/**
307+
* <p>The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.</p>
308+
*/
309+
_FinalStage authorizedScopes(Optional<List<String>> authorizedScopes);
310+
311+
_FinalStage authorizedScopes(List<String> authorizedScopes);
312+
291313
/**
292314
* <p>The credentials associated with the account, if the <code>include_credentials</code> parameter was set to true in the request (only applicable for BYOA apps). In addition to the well-known OAuth fields listed below, this object may contain app-specific custom fields (e.g. <code>base_url</code>).</p>
293315
*/
@@ -338,6 +360,8 @@ public static final class Builder implements IdStage, _FinalStage {
338360

339361
private Optional<AccountCredentials> credentials = Optional.empty();
340362

363+
private Optional<List<String>> authorizedScopes = Optional.empty();
364+
341365
private Optional<OffsetDateTime> updatedAt = Optional.empty();
342366

343367
private Optional<OffsetDateTime> createdAt = Optional.empty();
@@ -367,6 +391,7 @@ public Builder from(Account other) {
367391
app(other.getApp());
368392
createdAt(other.getCreatedAt());
369393
updatedAt(other.getUpdatedAt());
394+
authorizedScopes(other.getAuthorizedScopes());
370395
credentials(other.getCredentials());
371396
expiresAt(other.getExpiresAt());
372397
error(other.getError());
@@ -482,6 +507,26 @@ public _FinalStage credentials(Optional<AccountCredentials> credentials) {
482507
return this;
483508
}
484509

510+
/**
511+
* <p>The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.</p>
512+
* @return Reference to {@code this} so that method calls can be chained together.
513+
*/
514+
@java.lang.Override
515+
public _FinalStage authorizedScopes(List<String> authorizedScopes) {
516+
this.authorizedScopes = Optional.ofNullable(authorizedScopes);
517+
return this;
518+
}
519+
520+
/**
521+
* <p>The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.</p>
522+
*/
523+
@java.lang.Override
524+
@JsonSetter(value = "authorized_scopes", nulls = Nulls.SKIP)
525+
public _FinalStage authorizedScopes(Optional<List<String>> authorizedScopes) {
526+
this.authorizedScopes = authorizedScopes;
527+
return this;
528+
}
529+
485530
/**
486531
* <p>The date and time the account was last updated, an ISO 8601 formatted string</p>
487532
* @return Reference to {@code this} so that method calls can be chained together.
@@ -626,6 +671,7 @@ public Account build() {
626671
app,
627672
createdAt,
628673
updatedAt,
674+
authorizedScopes,
629675
credentials,
630676
expiresAt,
631677
error,

src/main/java/com/pipedream/api/types/ConfigurablePropDir.java

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public final class ConfigurablePropDir implements IConfigurablePropBase {
4343

4444
private final Optional<Boolean> withLabel;
4545

46+
private final Optional<ConfigurablePropDirAccessMode> accessMode;
47+
48+
private final Optional<Boolean> sync;
49+
4650
private final Map<String, Object> additionalProperties;
4751

4852
private ConfigurablePropDir(
@@ -57,6 +61,8 @@ private ConfigurablePropDir(
5761
Optional<Boolean> useQuery,
5862
Optional<Boolean> reloadProps,
5963
Optional<Boolean> withLabel,
64+
Optional<ConfigurablePropDirAccessMode> accessMode,
65+
Optional<Boolean> sync,
6066
Map<String, Object> additionalProperties) {
6167
this.name = name;
6268
this.label = label;
@@ -69,6 +75,8 @@ private ConfigurablePropDir(
6975
this.useQuery = useQuery;
7076
this.reloadProps = reloadProps;
7177
this.withLabel = withLabel;
78+
this.accessMode = accessMode;
79+
this.sync = sync;
7280
this.additionalProperties = additionalProperties;
7381
}
7482

@@ -171,6 +179,19 @@ public Optional<Boolean> getWithLabel() {
171179
return withLabel;
172180
}
173181

182+
@JsonProperty("accessMode")
183+
public Optional<ConfigurablePropDirAccessMode> getAccessMode() {
184+
return accessMode;
185+
}
186+
187+
/**
188+
* @return If true, the component's /tmp directory is synchronized with File Stash
189+
*/
190+
@JsonProperty("sync")
191+
public Optional<Boolean> getSync() {
192+
return sync;
193+
}
194+
174195
@java.lang.Override
175196
public boolean equals(Object other) {
176197
if (this == other) return true;
@@ -193,7 +214,9 @@ private boolean equalTo(ConfigurablePropDir other) {
193214
&& remoteOptions.equals(other.remoteOptions)
194215
&& useQuery.equals(other.useQuery)
195216
&& reloadProps.equals(other.reloadProps)
196-
&& withLabel.equals(other.withLabel);
217+
&& withLabel.equals(other.withLabel)
218+
&& accessMode.equals(other.accessMode)
219+
&& sync.equals(other.sync);
197220
}
198221

199222
@java.lang.Override
@@ -209,7 +232,9 @@ public int hashCode() {
209232
this.remoteOptions,
210233
this.useQuery,
211234
this.reloadProps,
212-
this.withLabel);
235+
this.withLabel,
236+
this.accessMode,
237+
this.sync);
213238
}
214239

215240
@java.lang.Override
@@ -302,12 +327,27 @@ public interface _FinalStage {
302327
_FinalStage withLabel(Optional<Boolean> withLabel);
303328

304329
_FinalStage withLabel(Boolean withLabel);
330+
331+
_FinalStage accessMode(Optional<ConfigurablePropDirAccessMode> accessMode);
332+
333+
_FinalStage accessMode(ConfigurablePropDirAccessMode accessMode);
334+
335+
/**
336+
* <p>If true, the component's /tmp directory is synchronized with File Stash</p>
337+
*/
338+
_FinalStage sync(Optional<Boolean> sync);
339+
340+
_FinalStage sync(Boolean sync);
305341
}
306342

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

347+
private Optional<Boolean> sync = Optional.empty();
348+
349+
private Optional<ConfigurablePropDirAccessMode> accessMode = Optional.empty();
350+
311351
private Optional<Boolean> withLabel = Optional.empty();
312352

313353
private Optional<Boolean> reloadProps = Optional.empty();
@@ -346,6 +386,8 @@ public Builder from(ConfigurablePropDir other) {
346386
useQuery(other.getUseQuery());
347387
reloadProps(other.getReloadProps());
348388
withLabel(other.getWithLabel());
389+
accessMode(other.getAccessMode());
390+
sync(other.getSync());
349391
return this;
350392
}
351393

@@ -361,6 +403,39 @@ public _FinalStage name(@NotNull String name) {
361403
return this;
362404
}
363405

406+
/**
407+
* <p>If true, the component's /tmp directory is synchronized with File Stash</p>
408+
* @return Reference to {@code this} so that method calls can be chained together.
409+
*/
410+
@java.lang.Override
411+
public _FinalStage sync(Boolean sync) {
412+
this.sync = Optional.ofNullable(sync);
413+
return this;
414+
}
415+
416+
/**
417+
* <p>If true, the component's /tmp directory is synchronized with File Stash</p>
418+
*/
419+
@java.lang.Override
420+
@JsonSetter(value = "sync", nulls = Nulls.SKIP)
421+
public _FinalStage sync(Optional<Boolean> sync) {
422+
this.sync = sync;
423+
return this;
424+
}
425+
426+
@java.lang.Override
427+
public _FinalStage accessMode(ConfigurablePropDirAccessMode accessMode) {
428+
this.accessMode = Optional.ofNullable(accessMode);
429+
return this;
430+
}
431+
432+
@java.lang.Override
433+
@JsonSetter(value = "accessMode", nulls = Nulls.SKIP)
434+
public _FinalStage accessMode(Optional<ConfigurablePropDirAccessMode> accessMode) {
435+
this.accessMode = accessMode;
436+
return this;
437+
}
438+
364439
/**
365440
* <p>If true, you must save the configured prop value as a &quot;label-value&quot; object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label</p>
366441
* @return Reference to {@code this} so that method calls can be chained together.
@@ -575,6 +650,8 @@ public ConfigurablePropDir build() {
575650
useQuery,
576651
reloadProps,
577652
withLabel,
653+
accessMode,
654+
sync,
578655
additionalProperties);
579656
}
580657
}

0 commit comments

Comments
 (0)