@@ -45,15 +45,15 @@ The samples below show how a published SDK artifact is used:
4545
4646Gradle:
4747``` groovy
48- implementation 'com.stackone:stackone-client-java:0.12.1 '
48+ implementation 'com.stackone:stackone-client-java:0.13.0 '
4949```
5050
5151Maven:
5252``` xml
5353<dependency >
5454 <groupId >com.stackone</groupId >
5555 <artifactId >stackone-client-java</artifactId >
56- <version >0.12.1 </version >
56+ <version >0.13.0 </version >
5757</dependency >
5858```
5959
@@ -108,8 +108,8 @@ public class Application {
108108 .include(" avatar_url,avatar,custom_fields,job_description,benefits" )
109109 .build();
110110
111+
111112 sdk. hris(). listEmployees()
112- .request(req)
113113 .callAsStream()
114114 .forEach((HrisListEmployeesResponse item) - > {
115115 // handle page
@@ -118,6 +118,64 @@ public class Application {
118118 }
119119}
120120```
121+ #### Asynchronous Call
122+ An asynchronous SDK client is also available that returns a [ ` CompletableFuture<T> ` ] [ comp-fut ] . See [ Asynchronous Support] ( #asynchronous-support ) for more details on async benefits and reactive library integration.
123+ ``` java
124+ package hello.world ;
125+
126+ import com.stackone.stackone_client_java.AsyncStackOne ;
127+ import com.stackone.stackone_client_java.StackOne ;
128+ import com.stackone.stackone_client_java.models.components.* ;
129+ import com.stackone.stackone_client_java.models.operations.async.StackoneCreateConnectSessionResponse ;
130+ import java.util.List ;
131+ import java.util.concurrent.CompletableFuture ;
132+
133+ public class Application {
134+
135+ public static void main (String [] args ) {
136+
137+ AsyncStackOne sdk = StackOne . builder()
138+ .security(Security . builder()
139+ .username(" " )
140+ .password(" " )
141+ .build())
142+ .build()
143+ .async();
144+
145+ ConnectSessionCreate req = ConnectSessionCreate . builder()
146+ .originOwnerId(" <id>" )
147+ .originOwnerName(" <value>" )
148+ .categories(List . of(
149+ Categories . ATS ,
150+ Categories . HRIS ,
151+ Categories . DOCUMENTS ,
152+ Categories . CRM ,
153+ Categories . IAM ,
154+ Categories . MARKETING ,
155+ Categories . LMS ,
156+ Categories . IAM ,
157+ Categories . DOCUMENTS ,
158+ Categories . TICKETING ,
159+ Categories . SCREENING ,
160+ Categories . MESSAGING ,
161+ Categories . ACCOUNTING ))
162+ .type(Type . TEST )
163+ .build();
164+
165+ CompletableFuture<StackoneCreateConnectSessionResponse > resFut = sdk. connectSessions(). createConnectSession()
166+ .request(req)
167+ .call();
168+
169+ resFut. thenAccept(res - > {
170+ if (res. connectSessionTokenAuthLink(). isPresent()) {
171+ // handle response
172+ }
173+ });
174+ }
175+ }
176+ ```
177+
178+ [ comp-fut ] : https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
121179<!-- End SDK Example Usage [usage] -->
122180
123181<!-- Start Available Resources and Operations [operations] -->
@@ -147,6 +205,11 @@ public class Application {
147205* [ updateAccount] ( docs/sdks/accounts/README.md#updateaccount ) - Update Account
148206* [ getAccountMetaInfo] ( docs/sdks/accounts/README.md#getaccountmetainfo ) - Get Account Meta Information
149207
208+ ### [ actions()] ( docs/sdks/actions/README.md )
209+
210+ * [ listActionsMeta] ( docs/sdks/actions/README.md#listactionsmeta ) - List all actions metadata
211+ * [ rpcAction] ( docs/sdks/actions/README.md#rpcaction ) - Make an RPC call to an action
212+
150213### [ ats()] ( docs/sdks/ats/README.md )
151214
152215* [ listApplications] ( docs/sdks/ats/README.md#listapplications ) - List Applications
@@ -185,8 +248,10 @@ public class Application {
185248* [ getJobCustomFieldDefinition] ( docs/sdks/ats/README.md#getjobcustomfielddefinition ) - Get Job Custom Field Definition
186249* [ listDepartments] ( docs/sdks/ats/README.md#listdepartments ) - List Departments
187250* [ getDepartment] ( docs/sdks/ats/README.md#getdepartment ) - Get Department
188- * [ listInterviewStages] ( docs/sdks/ats/README.md#listinterviewstages ) - List Interview Stages
189- * [ getInterviewStage] ( docs/sdks/ats/README.md#getinterviewstage ) - Get Interview Stage
251+ * [ ~~ listInterviewStages~~ ] ( docs/sdks/ats/README.md#listinterviewstages ) - List Interview Stages :warning : ** Deprecated**
252+ * [ ~~ getInterviewStage~~ ] ( docs/sdks/ats/README.md#getinterviewstage ) - Get Interview Stage :warning : ** Deprecated**
253+ * [ listApplicationStages] ( docs/sdks/ats/README.md#listapplicationstages ) - List Application Stages
254+ * [ getApplicationStage] ( docs/sdks/ats/README.md#getapplicationstage ) - Get Application Stage
190255* [ listInterviews] ( docs/sdks/ats/README.md#listinterviews ) - List Interviews
191256* [ getInterview] ( docs/sdks/ats/README.md#getinterview ) - Get Interview
192257* [ listJobs] ( docs/sdks/ats/README.md#listjobs ) - List Jobs
@@ -400,6 +465,12 @@ public class Application {
400465* [ getContentBlock] ( docs/sdks/marketing/README.md#getcontentblock ) - Get Content Blocks
401466* [ updateContentBlock] ( docs/sdks/marketing/README.md#updatecontentblock ) - Update Content Block
402467
468+ ### [ mcp()] ( docs/sdks/mcp/README.md )
469+
470+ * [ mcpGet] ( docs/sdks/mcp/README.md#mcpget ) - Open MCP SSE stream
471+ * [ mcpPost] ( docs/sdks/mcp/README.md#mcppost ) - Send MCP JSON-RPC message
472+ * [ mcpDelete] ( docs/sdks/mcp/README.md#mcpdelete ) - Delete MCP session
473+
403474### [ messaging()] ( docs/sdks/messaging/README.md )
404475
405476* [ listConversations] ( docs/sdks/messaging/README.md#listconversations ) - List Conversations
@@ -466,7 +537,6 @@ For certain operations, you can also use the `callAsStreamUnwrapped` method that
466537
467538Here's an example depicting the different ways to use pagination:
468539
469-
470540``` java
471541package hello.world ;
472542
@@ -476,7 +546,7 @@ import com.stackone.stackone_client_java.models.errors.*;
476546import com.stackone.stackone_client_java.models.operations.* ;
477547import java.lang.Exception ;
478548import java.lang.Iterable ;
479- import java.time.OffsetDateTime ;
549+ import java.util.List ;
480550
481551public class Application {
482552
@@ -489,21 +559,24 @@ public class Application {
489559 .build())
490560 .build();
491561
492- HrisListCompaniesRequest req = HrisListCompaniesRequest . builder()
493- .xAccountId(" <id>" )
494- .fields(" id,remote_id,name,full_name,display_name,created_at,updated_at" )
495- .filter(HrisListCompaniesQueryParamFilter . builder()
496- .updatedAfter(OffsetDateTime . parse(" 2020-01-01T00:00:00.000Z" ))
562+ StackoneListActionsMetaRequest req = StackoneListActionsMetaRequest . builder()
563+ .groupBy(" [\" connector\" ]" )
564+ .filter(StackoneListActionsMetaQueryParamFilter . builder()
565+ .connectors(" connector1,connector2" )
566+ .accountIds(" account1,account2" )
567+ .actionKey(" action1" )
497568 .build())
569+ .include(List . of(
570+ StackoneListActionsMetaQueryParamInclude . OPERATION_DETAILS ))
498571 .build();
499572
500- var b = sdk . hris() . listCompanies()
501- .request(req );
573+
574+ var b = sdk . actions() . listActionsMeta( );
502575
503576 // Iterate through all pages using a traditional for-each loop
504577 // Each iteration returns a complete page response
505- Iterable<HrisListCompaniesResponse > iterable = b. callAsIterable();
506- for (HrisListCompaniesResponse page : iterable) {
578+ Iterable<StackoneListActionsMetaResponse > iterable = b. callAsIterable();
579+ for (StackoneListActionsMetaResponse page : iterable) {
507580 // handle page
508581 }
509582
@@ -512,13 +585,65 @@ public class Application {
512585
513586 // Stream through pages without unwrapping (each item is a complete page)
514587 b. callAsStream()
515- .forEach((HrisListCompaniesResponse page) - > {
588+ .forEach((StackoneListActionsMetaResponse page) - > {
516589 // handle page
517590 });
518591
519592 }
520593}
521594```
595+ #### Asynchronous Pagination
596+ An asynchronous SDK client is also available for pagination that returns a [ ` Flow.Publisher<T> ` ] [ flow-pub ] . For async pagination, you can use ` callAsPublisher() ` to get pages as a publisher, or ` callAsPublisherUnwrapped() ` to get individual items directly. See [ Asynchronous Support] ( #asynchronous-support ) for more details on async benefits and reactive library integration.
597+ ``` java
598+ package hello.world ;
599+
600+ import com.stackone.stackone_client_java.AsyncStackOne ;
601+ import com.stackone.stackone_client_java.StackOne ;
602+ import com.stackone.stackone_client_java.models.components.Security ;
603+ import com.stackone.stackone_client_java.models.operations.* ;
604+ import com.stackone.stackone_client_java.models.operations.async.StackoneListActionsMetaResponse ;
605+ import java.util.List ;
606+ import reactor.core.publisher.Flux ;
607+
608+ public class Application {
609+
610+ public static void main (String [] args ) {
611+
612+ AsyncStackOne sdk = StackOne . builder()
613+ .security(Security . builder()
614+ .username(" " )
615+ .password(" " )
616+ .build())
617+ .build()
618+ .async();
619+
620+ StackoneListActionsMetaRequest req = StackoneListActionsMetaRequest . builder()
621+ .groupBy(" [\" connector\" ]" )
622+ .filter(StackoneListActionsMetaQueryParamFilter . builder()
623+ .connectors(" connector1,connector2" )
624+ .accountIds(" account1,account2" )
625+ .actionKey(" action1" )
626+ .build())
627+ .include(List . of(
628+ StackoneListActionsMetaQueryParamInclude . OPERATION_DETAILS ))
629+ .build();
630+
631+
632+ var b = sdk. actions(). listActionsMeta();
633+
634+ // Example using Project Reactor (illustrative) - pages
635+ Flux<StackoneListActionsMetaResponse > pageFlux = Flux . from(b. callAsPublisher());
636+ pageFlux. subscribe(
637+ page - > System . out. println(page),
638+ error - > error. printStackTrace(),
639+ () - > System . out. println(" Pagination completed" )
640+ );
641+
642+ }
643+ }
644+ ```
645+
646+ [ flow-pub ] : https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.Publisher.html
522647<!-- End Pagination [pagination] -->
523648
524649<!-- Start Retries [retries] -->
@@ -925,6 +1050,38 @@ public class Application {
9251050 }
9261051}
9271052```
1053+
1054+ ### Per-Operation Security Schemes
1055+
1056+ Some operations in this SDK require the security scheme to be specified at the request level. For example:
1057+ ``` java
1058+ package hello.world ;
1059+
1060+ import com.stackone.stackone_client_java.StackOne ;
1061+ import com.stackone.stackone_client_java.models.errors.* ;
1062+ import com.stackone.stackone_client_java.models.operations.StackoneMcpGetResponse ;
1063+ import com.stackone.stackone_client_java.models.operations.StackoneMcpGetSecurity ;
1064+ import java.lang.Exception ;
1065+
1066+ public class Application {
1067+
1068+ public static void main (String [] args ) throws Exception {
1069+
1070+ StackOne sdk = StackOne . builder()
1071+ .build();
1072+
1073+ StackoneMcpGetResponse res = sdk. mcp(). mcpGet()
1074+ .security(StackoneMcpGetSecurity . builder()
1075+
1076+ .build())
1077+ .xAccountId(" <id>" )
1078+ .mcpSessionId(" <id>" )
1079+ .call();
1080+
1081+ // handle response
1082+ }
1083+ }
1084+ ```
9281085<!-- End Authentication [security] -->
9291086
9301087<!-- Start Debugging [debug] -->
0 commit comments