Skip to content

Commit 47e037e

Browse files
committed
feat: apply new ordering description approach.
1 parent 5104246 commit 47e037e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/com/crowdin/client/workflows/WorkflowsApi.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.crowdin.client.core.http.exceptions.HttpException;
77
import com.crowdin.client.core.model.ClientConfig;
88
import com.crowdin.client.core.model.Credentials;
9+
import com.crowdin.client.core.model.OrderByField;
910
import com.crowdin.client.core.model.ResponseList;
1011
import com.crowdin.client.core.model.ResponseObject;
1112
import com.crowdin.client.sourcestrings.model.SourceString;
@@ -17,6 +18,7 @@
1718
import com.crowdin.client.workflows.model.WorkflowTemplateResponseList;
1819
import com.crowdin.client.workflows.model.WorkflowTemplateResponseObject;
1920

21+
import java.util.List;
2022
import java.util.Map;
2123
import java.util.Optional;
2224

@@ -58,7 +60,7 @@ public ResponseObject<WorkflowStep> getWorkflowStep(Long projectId, Long stepId)
5860
* @param projectId project identifier
5961
* @param stepId workflow step identifier
6062
* @param languageIds filter progress by language identifiers
61-
* @param orderBy ["id", "text", "identifier", "context", "createdAt", "updatedAt"]. Result sorting rules (default "id")
63+
* @param orderBy ["id", "text", "identifier", "context", "createdAt", "updatedAt"]. List of OrderByField (default "id asc")
6264
* @param status ["todo", "done", "pending", "incomplete", "need_review"]. String status on the workflow step
6365
* @param limit maximum number of items to retrieve (default 25)
6466
* @param offset starting offset in the collection (default 0)
@@ -67,10 +69,10 @@ public ResponseObject<WorkflowStep> getWorkflowStep(Long projectId, Long stepId)
6769
* <li><a href="https://support.crowdin.com/developer/enterprise/api/v2/#tag/Workflows/operation/api.projects.workflow-steps.strings.getMany" target="_blank"><b>Enterprise API Documentation</b></a></li>
6870
* </ul>
6971
*/
70-
public ResponseList<SourceString> listWorkflowStepStrings(Long projectId, Long stepId, String languageIds, String orderBy, String status, Integer limit, Integer offset) throws HttpException, HttpBadRequestException {
72+
public ResponseList<SourceString> listWorkflowStepStrings(Long projectId, Long stepId, String languageIds, List<OrderByField> orderBy, String status, Integer limit, Integer offset) throws HttpException, HttpBadRequestException {
7173
Map<String, Optional<Object>> queryParams = HttpRequestConfig.buildUrlParams(
7274
"languageIds", Optional.ofNullable(languageIds),
73-
"orderBy", Optional.ofNullable(orderBy),
75+
"orderBy", Optional.ofNullable(OrderByField.generateSortParam(orderBy)),
7476
"status", Optional.ofNullable(status),
7577
"limit", Optional.ofNullable(limit),
7678
"offset", Optional.ofNullable(offset)

0 commit comments

Comments
 (0)