Skip to content

Commit a66a698

Browse files
SDK regeneration (#343)
1 parent cd81284 commit a66a698

File tree

707 files changed

+125434
-1025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

707 files changed

+125434
-1025
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,24 @@ Intercom client = Intercom
9999
### Retries
100100

101101
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
102-
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
102+
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
103103
retry limit (default: 2).
104104

105-
A request is deemed retriable when any of the following HTTP status codes is returned:
105+
A request is deemed retryable when any of the following HTTP status codes is returned:
106106

107107
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
108108
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
109109
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
110110

111-
Use the `maxRetries` request option to configure this behavior.
111+
Use the `maxRetries` client option to configure this behavior.
112112

113113
```java
114-
import com.intercom.api.core.RequestOptions;
114+
import com.intercom.api.Intercom;
115115

116-
client.articles().create(
117-
...,
118-
RequestOptions
119-
.builder()
120-
.maxRetries(1)
121-
.build()
122-
);
116+
Intercom client = Intercom
117+
.builder()
118+
.maxRetries(1)
119+
.build();
123120
```
124121

125122
### Timeouts

build.gradle

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

4747
group = 'io.intercom'
4848

49-
version = '3.0.0-alpha7'
49+
version = '3.0.0'
5050

5151
jar {
5252
dependsOn(":generatePomFileForMavenPublication")
@@ -77,7 +77,7 @@ publishing {
7777
maven(MavenPublication) {
7878
groupId = 'io.intercom'
7979
artifactId = 'intercom-java'
80-
version = '3.0.0-alpha7'
80+
version = '3.0.0'
8181
from components.java
8282
pom {
8383
name = 'intercom'

gradle/wrapper/gradle-wrapper.jar

59 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

src/main/java/com/intercom/api/AsyncIntercom.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.intercom.api.resources.companies.AsyncCompaniesClient;
1111
import com.intercom.api.resources.contacts.AsyncContactsClient;
1212
import com.intercom.api.resources.conversations.AsyncConversationsClient;
13-
import com.intercom.api.resources.customchannelevents.AsyncCustomChannelEventsClient;
1413
import com.intercom.api.resources.dataattributes.AsyncDataAttributesClient;
1514
import com.intercom.api.resources.dataexport.AsyncDataExportClient;
1615
import com.intercom.api.resources.events.AsyncEventsClient;
@@ -25,6 +24,7 @@
2524
import com.intercom.api.resources.teams.AsyncTeamsClient;
2625
import com.intercom.api.resources.tickets.AsyncTicketsClient;
2726
import com.intercom.api.resources.tickettypes.AsyncTicketTypesClient;
27+
import com.intercom.api.resources.unstable.AsyncUnstableClient;
2828
import com.intercom.api.resources.visitors.AsyncVisitorsClient;
2929
import java.util.function.Supplier;
3030

@@ -69,10 +69,10 @@ public class AsyncIntercom {
6969

7070
protected final Supplier<AsyncVisitorsClient> visitorsClient;
7171

72-
protected final Supplier<AsyncCustomChannelEventsClient> customChannelEventsClient;
73-
7472
protected final Supplier<AsyncNewsClient> newsClient;
7573

74+
protected final Supplier<AsyncUnstableClient> unstableClient;
75+
7676
public AsyncIntercom(ClientOptions clientOptions) {
7777
this.clientOptions = clientOptions;
7878
this.adminsClient = Suppliers.memoize(() -> new AsyncAdminsClient(clientOptions));
@@ -94,8 +94,8 @@ public AsyncIntercom(ClientOptions clientOptions) {
9494
this.ticketTypesClient = Suppliers.memoize(() -> new AsyncTicketTypesClient(clientOptions));
9595
this.ticketsClient = Suppliers.memoize(() -> new AsyncTicketsClient(clientOptions));
9696
this.visitorsClient = Suppliers.memoize(() -> new AsyncVisitorsClient(clientOptions));
97-
this.customChannelEventsClient = Suppliers.memoize(() -> new AsyncCustomChannelEventsClient(clientOptions));
9897
this.newsClient = Suppliers.memoize(() -> new AsyncNewsClient(clientOptions));
98+
this.unstableClient = Suppliers.memoize(() -> new AsyncUnstableClient(clientOptions));
9999
}
100100

101101
public AsyncAdminsClient admins() {
@@ -174,14 +174,14 @@ public AsyncVisitorsClient visitors() {
174174
return this.visitorsClient.get();
175175
}
176176

177-
public AsyncCustomChannelEventsClient customChannelEvents() {
178-
return this.customChannelEventsClient.get();
179-
}
180-
181177
public AsyncNewsClient news() {
182178
return this.newsClient.get();
183179
}
184180

181+
public AsyncUnstableClient unstable() {
182+
return this.unstableClient.get();
183+
}
184+
185185
public static AsyncIntercomBuilder builder() {
186186
return new AsyncIntercomBuilder();
187187
}

src/main/java/com/intercom/api/Intercom.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.intercom.api.resources.companies.CompaniesClient;
1111
import com.intercom.api.resources.contacts.ContactsClient;
1212
import com.intercom.api.resources.conversations.ConversationsClient;
13-
import com.intercom.api.resources.customchannelevents.CustomChannelEventsClient;
1413
import com.intercom.api.resources.dataattributes.DataAttributesClient;
1514
import com.intercom.api.resources.dataexport.DataExportClient;
1615
import com.intercom.api.resources.events.EventsClient;
@@ -25,6 +24,7 @@
2524
import com.intercom.api.resources.teams.TeamsClient;
2625
import com.intercom.api.resources.tickets.TicketsClient;
2726
import com.intercom.api.resources.tickettypes.TicketTypesClient;
27+
import com.intercom.api.resources.unstable.UnstableClient;
2828
import com.intercom.api.resources.visitors.VisitorsClient;
2929
import java.util.function.Supplier;
3030

@@ -69,10 +69,10 @@ public class Intercom {
6969

7070
protected final Supplier<VisitorsClient> visitorsClient;
7171

72-
protected final Supplier<CustomChannelEventsClient> customChannelEventsClient;
73-
7472
protected final Supplier<NewsClient> newsClient;
7573

74+
protected final Supplier<UnstableClient> unstableClient;
75+
7676
public Intercom(ClientOptions clientOptions) {
7777
this.clientOptions = clientOptions;
7878
this.adminsClient = Suppliers.memoize(() -> new AdminsClient(clientOptions));
@@ -94,8 +94,8 @@ public Intercom(ClientOptions clientOptions) {
9494
this.ticketTypesClient = Suppliers.memoize(() -> new TicketTypesClient(clientOptions));
9595
this.ticketsClient = Suppliers.memoize(() -> new TicketsClient(clientOptions));
9696
this.visitorsClient = Suppliers.memoize(() -> new VisitorsClient(clientOptions));
97-
this.customChannelEventsClient = Suppliers.memoize(() -> new CustomChannelEventsClient(clientOptions));
9897
this.newsClient = Suppliers.memoize(() -> new NewsClient(clientOptions));
98+
this.unstableClient = Suppliers.memoize(() -> new UnstableClient(clientOptions));
9999
}
100100

101101
public AdminsClient admins() {
@@ -174,14 +174,14 @@ public VisitorsClient visitors() {
174174
return this.visitorsClient.get();
175175
}
176176

177-
public CustomChannelEventsClient customChannelEvents() {
178-
return this.customChannelEventsClient.get();
179-
}
180-
181177
public NewsClient news() {
182178
return this.newsClient.get();
183179
}
184180

181+
public UnstableClient unstable() {
182+
return this.unstableClient.get();
183+
}
184+
185185
public static IntercomBuilder builder() {
186186
return new IntercomBuilder();
187187
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ private ClientOptions(
4141
this.headers.putAll(headers);
4242
this.headers.putAll(new HashMap<String, String>() {
4343
{
44-
put("User-Agent", "io.intercom:intercom-java/3.0.0-alpha7");
44+
put("User-Agent", "io.intercom:intercom-java/3.0.0");
4545
put("X-Fern-Language", "JAVA");
4646
put("X-Fern-SDK-Name", "com.intercom.fern:api-sdk");
47-
put("X-Fern-SDK-Version", "3.0.0-alpha7");
47+
put("X-Fern-SDK-Version", "3.0.0");
4848
}
4949
});
5050
this.headerSuppliers = headerSuppliers;

src/main/java/com/intercom/api/resources/admins/requests/ConfigureAwayAdminRequest.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,25 @@ public static AdminIdStage builder() {
9494
}
9595

9696
public interface AdminIdStage {
97+
/**
98+
* The unique identifier of a given admin
99+
*/
97100
AwayModeEnabledStage adminId(@NotNull String adminId);
98101

99102
Builder from(ConfigureAwayAdminRequest other);
100103
}
101104

102105
public interface AwayModeEnabledStage {
106+
/**
107+
* Set to "true" to change the status of the admin to away.
108+
*/
103109
AwayModeReassignStage awayModeEnabled(boolean awayModeEnabled);
104110
}
105111

106112
public interface AwayModeReassignStage {
113+
/**
114+
* Set to "true" to assign any new conversation replies to your default inbox.
115+
*/
107116
_FinalStage awayModeReassign(boolean awayModeReassign);
108117
}
109118

@@ -134,7 +143,7 @@ public Builder from(ConfigureAwayAdminRequest other) {
134143
}
135144

136145
/**
137-
* <p>The unique identifier of a given admin</p>
146+
* The unique identifier of a given admin<p>The unique identifier of a given admin</p>
138147
* @return Reference to {@code this} so that method calls can be chained together.
139148
*/
140149
@java.lang.Override
@@ -145,7 +154,7 @@ public AwayModeEnabledStage adminId(@NotNull String adminId) {
145154
}
146155

147156
/**
148-
* <p>Set to &quot;true&quot; to change the status of the admin to away.</p>
157+
* Set to "true" to change the status of the admin to away.<p>Set to &quot;true&quot; to change the status of the admin to away.</p>
149158
* @return Reference to {@code this} so that method calls can be chained together.
150159
*/
151160
@java.lang.Override
@@ -156,7 +165,7 @@ public AwayModeReassignStage awayModeEnabled(boolean awayModeEnabled) {
156165
}
157166

158167
/**
159-
* <p>Set to &quot;true&quot; to assign any new conversation replies to your default inbox.</p>
168+
* Set to "true" to assign any new conversation replies to your default inbox.<p>Set to &quot;true&quot; to assign any new conversation replies to your default inbox.</p>
160169
* @return Reference to {@code this} so that method calls can be chained together.
161170
*/
162171
@java.lang.Override

src/main/java/com/intercom/api/resources/admins/requests/FindAdminRequest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public static AdminIdStage builder() {
6666
}
6767

6868
public interface AdminIdStage {
69+
/**
70+
* The unique identifier of a given admin
71+
*/
6972
_FinalStage adminId(@NotNull String adminId);
7073

7174
Builder from(FindAdminRequest other);
@@ -91,7 +94,7 @@ public Builder from(FindAdminRequest other) {
9194
}
9295

9396
/**
94-
* <p>The unique identifier of a given admin</p>
97+
* The unique identifier of a given admin<p>The unique identifier of a given admin</p>
9598
* @return Reference to {@code this} so that method calls can be chained together.
9699
*/
97100
@java.lang.Override

src/main/java/com/intercom/api/resources/admins/requests/ListAllActivityLogsRequest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ public static CreatedAtAfterStage builder() {
8080
}
8181

8282
public interface CreatedAtAfterStage {
83+
/**
84+
* The start date that you request data for. It must be formatted as a UNIX timestamp.
85+
*/
8386
_FinalStage createdAtAfter(@NotNull String createdAtAfter);
8487

8588
Builder from(ListAllActivityLogsRequest other);
@@ -88,6 +91,9 @@ public interface CreatedAtAfterStage {
8891
public interface _FinalStage {
8992
ListAllActivityLogsRequest build();
9093

94+
/**
95+
* <p>The end date that you request data for. It must be formatted as a UNIX timestamp.</p>
96+
*/
9197
_FinalStage createdAtBefore(Optional<String> createdAtBefore);
9298

9399
_FinalStage createdAtBefore(String createdAtBefore);
@@ -112,7 +118,7 @@ public Builder from(ListAllActivityLogsRequest other) {
112118
}
113119

114120
/**
115-
* <p>The start date that you request data for. It must be formatted as a UNIX timestamp.</p>
121+
* The start date that you request data for. It must be formatted as a UNIX timestamp.<p>The start date that you request data for. It must be formatted as a UNIX timestamp.</p>
116122
* @return Reference to {@code this} so that method calls can be chained together.
117123
*/
118124
@java.lang.Override
@@ -132,6 +138,9 @@ public _FinalStage createdAtBefore(String createdAtBefore) {
132138
return this;
133139
}
134140

141+
/**
142+
* <p>The end date that you request data for. It must be formatted as a UNIX timestamp.</p>
143+
*/
135144
@java.lang.Override
136145
@JsonSetter(value = "created_at_before", nulls = Nulls.SKIP)
137146
public _FinalStage createdAtBefore(Optional<String> createdAtBefore) {

0 commit comments

Comments
 (0)