Skip to content

Commit 046e2d8

Browse files
Release 1.17.1
1 parent ccb707c commit 046e2d8

85 files changed

Lines changed: 3664 additions & 261 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,8 @@ jobs:
5454

5555
- name: Publish to maven
5656
run: |
57-
./.publish/prepare.sh
5857
./gradlew publish
5958
env:
6059
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
6160
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
62-
MAVEN_PUBLISH_REGISTRY_URL: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
63-
MAVEN_SIGNATURE_KID: ${{ secrets.MAVEN_SIGNATURE_KID }}
64-
MAVEN_SIGNATURE_SECRET_KEY: ${{ secrets.MAVEN_SIGNATURE_SECRET_KEY }}
65-
MAVEN_SIGNATURE_PASSWORD: ${{ secrets.MAVEN_SIGNATURE_PASSWORD }}
61+
MAVEN_PUBLISH_REGISTRY_URL: "https://s01.oss.sonatype.org/content/repositories/releases/"

.publish/prepare.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ plugins {
22
id 'java-library'
33
id 'maven-publish'
44
id 'com.diffplug.spotless' version '6.11.0'
5-
id 'signing'
65
}
76

87
repositories {
98
mavenCentral()
109
maven {
11-
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
10+
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
1211
}
1312
}
1413

@@ -36,9 +35,6 @@ java {
3635
withJavadocJar()
3736
}
3837

39-
signing {
40-
sign(publishing.publications)
41-
}
4238
test {
4339
useJUnitPlatform()
4440
testLogging {
@@ -50,23 +46,14 @@ publishing {
5046
maven(MavenPublication) {
5147
groupId = 'com.polytomic'
5248
artifactId = 'polytomic-java'
53-
version = '1.16.1'
49+
version = '1.17.1'
5450
from components.java
5551
pom {
56-
name = 'polytomic'
57-
description = 'The official SDK of polytomic'
58-
url = 'https://buildwithfern.com'
5952
licenses {
6053
license {
6154
name = 'MIT'
6255
}
6356
}
64-
developers {
65-
developer {
66-
name = 'polytomic'
67-
68-
}
69-
}
7057
scm {
7158
connection = 'scm:git:git://github.com/polytomic/polytomic-java.git'
7259
developerConnection = 'scm:git:git://github.com/polytomic/polytomic-java.git'

gradle.properties

Whitespace-only changes.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private ClientOptions(
3030
{
3131
put("X-Fern-Language", "JAVA");
3232
put("X-Fern-SDK-Name", "com.polytomic.fern:api-sdk");
33-
put("X-Fern-SDK-Version", "1.16.1");
33+
put("X-Fern-SDK-Version", "1.17.1");
3434
}
3535
});
3636
this.headerSuppliers = headerSuppliers;

src/main/java/com/polytomic/api/resources/bulksync/BulkSyncClient.java

Lines changed: 369 additions & 18 deletions
Large diffs are not rendered by default.

src/main/java/com/polytomic/api/resources/bulksync/executions/ExecutionsClient.java

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,50 @@ public ExecutionsClient(ClientOptions clientOptions) {
3232
this.clientOptions = clientOptions;
3333
}
3434

35+
/**
36+
* Returns a concise per-schema status for one or more bulk syncs.
37+
* <p>This endpoint is a summary view, not an execution-history view. Each schema is
38+
* represented at most once with its most recent execution status, and running
39+
* executions are preferred over older terminal ones.</p>
40+
* <p>Use this endpoint when you want a dashboard-style answer to &quot;what is each sync
41+
* doing now?&quot; If you need the full execution history or a single execution's
42+
* details, use <a href="./list"><code>GET /api/bulk/syncs/{id}/executions</code></a> or
43+
* <a href="./get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a> instead.</p>
44+
* <p>Setting <code>all=true</code> or <code>active=true</code> ignores any explicit <code>sync_id</code> filters and
45+
* expands the request to the caller's organization scope.</p>
46+
*/
3547
public ListBulkSyncExecutionStatusEnvelope listStatus() {
3648
return listStatus(ExecutionsListStatusRequest.builder().build());
3749
}
3850

51+
/**
52+
* Returns a concise per-schema status for one or more bulk syncs.
53+
* <p>This endpoint is a summary view, not an execution-history view. Each schema is
54+
* represented at most once with its most recent execution status, and running
55+
* executions are preferred over older terminal ones.</p>
56+
* <p>Use this endpoint when you want a dashboard-style answer to &quot;what is each sync
57+
* doing now?&quot; If you need the full execution history or a single execution's
58+
* details, use <a href="./list"><code>GET /api/bulk/syncs/{id}/executions</code></a> or
59+
* <a href="./get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a> instead.</p>
60+
* <p>Setting <code>all=true</code> or <code>active=true</code> ignores any explicit <code>sync_id</code> filters and
61+
* expands the request to the caller's organization scope.</p>
62+
*/
3963
public ListBulkSyncExecutionStatusEnvelope listStatus(ExecutionsListStatusRequest request) {
4064
return listStatus(request, null);
4165
}
4266

67+
/**
68+
* Returns a concise per-schema status for one or more bulk syncs.
69+
* <p>This endpoint is a summary view, not an execution-history view. Each schema is
70+
* represented at most once with its most recent execution status, and running
71+
* executions are preferred over older terminal ones.</p>
72+
* <p>Use this endpoint when you want a dashboard-style answer to &quot;what is each sync
73+
* doing now?&quot; If you need the full execution history or a single execution's
74+
* details, use <a href="./list"><code>GET /api/bulk/syncs/{id}/executions</code></a> or
75+
* <a href="./get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a> instead.</p>
76+
* <p>Setting <code>all=true</code> or <code>active=true</code> ignores any explicit <code>sync_id</code> filters and
77+
* expands the request to the caller's organization scope.</p>
78+
*/
4379
public ListBulkSyncExecutionStatusEnvelope listStatus(
4480
ExecutionsListStatusRequest request, RequestOptions requestOptions) {
4581
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
@@ -80,14 +116,53 @@ public ListBulkSyncExecutionStatusEnvelope listStatus(
80116
}
81117
}
82118

119+
/**
120+
* Lists executions for a bulk sync.
121+
* <p>Results are ordered by start time descending by default. When more results are
122+
* available, the response includes an opaque <code>pagination.next_page_token</code>; pass it
123+
* back as the <code>page_token</code> query parameter to retrieve the next page. The <code>limit</code>
124+
* parameter is optional, and the maximum page size is 100 executions.</p>
125+
* <p>Use <code>only_terminal=true</code> to return only finished executions. In that mode,
126+
* executions are ordered by <code>updated_at</code> so recently completed runs appear first.</p>
127+
* <p>Use <code>ascending=true</code> to walk forward from the oldest execution instead of
128+
* starting with the newest execution.</p>
129+
* <p>For the full details of a single run — including per-schema execution status —
130+
* use <a href="../../../../../api-reference/bulk-sync/executions/get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a>.</p>
131+
*/
83132
public ListBulkSyncExecutionsEnvelope list(String id) {
84133
return list(id, ExecutionsListRequest.builder().build());
85134
}
86135

136+
/**
137+
* Lists executions for a bulk sync.
138+
* <p>Results are ordered by start time descending by default. When more results are
139+
* available, the response includes an opaque <code>pagination.next_page_token</code>; pass it
140+
* back as the <code>page_token</code> query parameter to retrieve the next page. The <code>limit</code>
141+
* parameter is optional, and the maximum page size is 100 executions.</p>
142+
* <p>Use <code>only_terminal=true</code> to return only finished executions. In that mode,
143+
* executions are ordered by <code>updated_at</code> so recently completed runs appear first.</p>
144+
* <p>Use <code>ascending=true</code> to walk forward from the oldest execution instead of
145+
* starting with the newest execution.</p>
146+
* <p>For the full details of a single run — including per-schema execution status —
147+
* use <a href="../../../../../api-reference/bulk-sync/executions/get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a>.</p>
148+
*/
87149
public ListBulkSyncExecutionsEnvelope list(String id, ExecutionsListRequest request) {
88150
return list(id, request, null);
89151
}
90152

153+
/**
154+
* Lists executions for a bulk sync.
155+
* <p>Results are ordered by start time descending by default. When more results are
156+
* available, the response includes an opaque <code>pagination.next_page_token</code>; pass it
157+
* back as the <code>page_token</code> query parameter to retrieve the next page. The <code>limit</code>
158+
* parameter is optional, and the maximum page size is 100 executions.</p>
159+
* <p>Use <code>only_terminal=true</code> to return only finished executions. In that mode,
160+
* executions are ordered by <code>updated_at</code> so recently completed runs appear first.</p>
161+
* <p>Use <code>ascending=true</code> to walk forward from the oldest execution instead of
162+
* starting with the newest execution.</p>
163+
* <p>For the full details of a single run — including per-schema execution status —
164+
* use <a href="../../../../../api-reference/bulk-sync/executions/get"><code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code></a>.</p>
165+
*/
91166
public ListBulkSyncExecutionsEnvelope list(
92167
String id, ExecutionsListRequest request, RequestOptions requestOptions) {
93168
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
@@ -133,10 +208,24 @@ public ListBulkSyncExecutionsEnvelope list(
133208
}
134209
}
135210

211+
/**
212+
* Returns a single bulk sync execution, including per-schema execution status.
213+
* <p>The response includes a breakdown of each schema (table or object) that
214+
* participated in the execution, with its individual status, row counts, and any
215+
* error details. This makes it suitable for diagnosing partial failures where
216+
* some schemas succeeded while others did not.</p>
217+
*/
136218
public BulkSyncExecutionEnvelope get(String id, String execId) {
137219
return get(id, execId, null);
138220
}
139221

222+
/**
223+
* Returns a single bulk sync execution, including per-schema execution status.
224+
* <p>The response includes a breakdown of each schema (table or object) that
225+
* participated in the execution, with its individual status, row counts, and any
226+
* error details. This makes it suitable for diagnosing partial failures where
227+
* some schemas succeeded while others did not.</p>
228+
*/
140229
public BulkSyncExecutionEnvelope get(String id, String execId, RequestOptions requestOptions) {
141230
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
142231
.newBuilder()
@@ -170,10 +259,26 @@ public BulkSyncExecutionEnvelope get(String id, String execId, RequestOptions re
170259
}
171260
}
172261

262+
/**
263+
* Requests cancellation of a specific bulk sync execution.
264+
* <p>Cancellation is asynchronous. A successful response means the cancellation
265+
* signal has been queued; the execution continues to run until the signal is
266+
* processed. Poll <code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code> until the
267+
* execution reaches a terminal state (<code>completed</code>, <code>canceled</code>, or <code>failed</code>) to
268+
* confirm cancellation has taken effect.</p>
269+
*/
173270
public CancelBulkSyncResponseEnvelope cancel(String id, String execId) {
174271
return cancel(id, execId, null);
175272
}
176273

274+
/**
275+
* Requests cancellation of a specific bulk sync execution.
276+
* <p>Cancellation is asynchronous. A successful response means the cancellation
277+
* signal has been queued; the execution continues to run until the signal is
278+
* processed. Poll <code>GET /api/bulk/syncs/{id}/executions/{exec_id}</code> until the
279+
* execution reaches a terminal state (<code>completed</code>, <code>canceled</code>, or <code>failed</code>) to
280+
* confirm cancellation has taken effect.</p>
281+
*/
177282
public CancelBulkSyncResponseEnvelope cancel(String id, String execId, RequestOptions requestOptions) {
178283
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
179284
.newBuilder()
@@ -208,10 +313,34 @@ public CancelBulkSyncResponseEnvelope cancel(String id, String execId, RequestOp
208313
}
209314
}
210315

316+
/**
317+
* Returns signed URLs for the log files produced by a single bulk sync execution.
318+
* <p>Each URL in the response is pre-signed and grants temporary read access to the
319+
* corresponding log file. URLs expire after a short period; if you need to access
320+
* a file after the URL has expired, call this endpoint again to obtain a fresh set
321+
* of signed URLs.</p>
322+
* <blockquote>
323+
* <p>📘 To export logs asynchronously to a destination of your choice, use
324+
* <a href="../../../../../../../api-reference/bulk-sync/executions/export-logs"><code>POST /api/bulk/syncs/{sync_id}/executions/{execution_id}/logs/export</code></a>
325+
* instead.</p>
326+
* </blockquote>
327+
*/
211328
public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId) {
212329
return getLogs(syncId, executionId, null);
213330
}
214331

332+
/**
333+
* Returns signed URLs for the log files produced by a single bulk sync execution.
334+
* <p>Each URL in the response is pre-signed and grants temporary read access to the
335+
* corresponding log file. URLs expire after a short period; if you need to access
336+
* a file after the URL has expired, call this endpoint again to obtain a fresh set
337+
* of signed URLs.</p>
338+
* <blockquote>
339+
* <p>📘 To export logs asynchronously to a destination of your choice, use
340+
* <a href="../../../../../../../api-reference/bulk-sync/executions/export-logs"><code>POST /api/bulk/syncs/{sync_id}/executions/{execution_id}/logs/export</code></a>
341+
* instead.</p>
342+
* </blockquote>
343+
*/
215344
public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId, RequestOptions requestOptions) {
216345
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
217346
.newBuilder()
@@ -247,15 +376,57 @@ public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId
247376
}
248377
}
249378

379+
/**
380+
* Starts an asynchronous job that packages the log files for a single bulk sync execution into a downloadable archive.
381+
* <blockquote>
382+
* <p>📘 Log export is asynchronous</p>
383+
* <p>This endpoint starts a background job that packages an execution's log
384+
* files into a downloadable archive. The first call typically returns a
385+
* <code>job</code> descriptor instead of a completed result. Poll
386+
* <a href="../../../../../../../../api-reference/jobs/get"><code>GET /api/jobs/exportlogs/{id}</code></a>
387+
* with the returned <code>job_id</code> until <code>status</code> is <code>done</code>; the final response
388+
* contains a signed <code>url</code> that can be used to download the archive.</p>
389+
* <p>Set <code>notify=true</code> to also email the requesting user when the archive is
390+
* ready.</p>
391+
* </blockquote>
392+
*/
250393
public V4ExportSyncLogsEnvelope exportLogs(String syncId, String executionId) {
251394
return exportLogs(
252395
syncId, executionId, ExecutionsExportLogsRequest.builder().build());
253396
}
254397

398+
/**
399+
* Starts an asynchronous job that packages the log files for a single bulk sync execution into a downloadable archive.
400+
* <blockquote>
401+
* <p>📘 Log export is asynchronous</p>
402+
* <p>This endpoint starts a background job that packages an execution's log
403+
* files into a downloadable archive. The first call typically returns a
404+
* <code>job</code> descriptor instead of a completed result. Poll
405+
* <a href="../../../../../../../../api-reference/jobs/get"><code>GET /api/jobs/exportlogs/{id}</code></a>
406+
* with the returned <code>job_id</code> until <code>status</code> is <code>done</code>; the final response
407+
* contains a signed <code>url</code> that can be used to download the archive.</p>
408+
* <p>Set <code>notify=true</code> to also email the requesting user when the archive is
409+
* ready.</p>
410+
* </blockquote>
411+
*/
255412
public V4ExportSyncLogsEnvelope exportLogs(String syncId, String executionId, ExecutionsExportLogsRequest request) {
256413
return exportLogs(syncId, executionId, request, null);
257414
}
258415

416+
/**
417+
* Starts an asynchronous job that packages the log files for a single bulk sync execution into a downloadable archive.
418+
* <blockquote>
419+
* <p>📘 Log export is asynchronous</p>
420+
* <p>This endpoint starts a background job that packages an execution's log
421+
* files into a downloadable archive. The first call typically returns a
422+
* <code>job</code> descriptor instead of a completed result. Poll
423+
* <a href="../../../../../../../../api-reference/jobs/get"><code>GET /api/jobs/exportlogs/{id}</code></a>
424+
* with the returned <code>job_id</code> until <code>status</code> is <code>done</code>; the final response
425+
* contains a signed <code>url</code> that can be used to download the archive.</p>
426+
* <p>Set <code>notify=true</code> to also email the requesting user when the archive is
427+
* ready.</p>
428+
* </blockquote>
429+
*/
259430
public V4ExportSyncLogsEnvelope exportLogs(
260431
String syncId, String executionId, ExecutionsExportLogsRequest request, RequestOptions requestOptions) {
261432
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())

src/main/java/com/polytomic/api/resources/bulksync/executions/requests/ExecutionsListRequest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,33 @@ private ExecutionsListRequest(
4343
this.additionalProperties = additionalProperties;
4444
}
4545

46+
/**
47+
* @return Pagination cursor returned in the previous response. Omit on the first request.
48+
*/
4649
@JsonProperty("page_token")
4750
public Optional<String> getPageToken() {
4851
return pageToken;
4952
}
5053

54+
/**
55+
* @return When true, only return executions that have finished. Terminal executions are ordered by updated_at.
56+
*/
5157
@JsonProperty("only_terminal")
5258
public Optional<Boolean> getOnlyTerminal() {
5359
return onlyTerminal;
5460
}
5561

62+
/**
63+
* @return When true, return executions from oldest to newest. Default is newest first.
64+
*/
5665
@JsonProperty("ascending")
5766
public Optional<Boolean> getAscending() {
5867
return ascending;
5968
}
6069

70+
/**
71+
* @return Maximum number of executions to return. Capped at 100.
72+
*/
6173
@JsonProperty("limit")
6274
public Optional<Integer> getLimit() {
6375
return limit;

src/main/java/com/polytomic/api/resources/bulksync/executions/requests/ExecutionsListStatusRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@ private ExecutionsListStatusRequest(
4040
}
4141

4242
/**
43-
* @return Return the execution status of all syncs in the organization
43+
* @return When true, return status for every sync in the caller's organization. Overrides any sync_id values.
4444
*/
4545
@JsonProperty("all")
4646
public Optional<Boolean> getAll() {
4747
return all;
4848
}
4949

5050
/**
51-
* @return Return the execution status of all active syncs in the organization
51+
* @return When true, return status only for active syncs in the caller's organization. Overrides any sync_id values.
5252
*/
5353
@JsonProperty("active")
5454
public Optional<Boolean> getActive() {
5555
return active;
5656
}
5757

5858
/**
59-
* @return Return the execution status of the specified sync; this may be supplied multiple times.
59+
* @return Return status for the specified bulk sync. Repeat the parameter to target multiple syncs. Ignored if all or active is true.
6060
*/
6161
@JsonProperty("sync_id")
6262
public Optional<String> getSyncId() {

0 commit comments

Comments
 (0)