Skip to content

Commit c612904

Browse files
author
Phrase
committed
1 parent e5f9447 commit c612904

File tree

226 files changed

+482
-277
lines changed

Some content is hidden

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

226 files changed

+482
-277
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ docs/JobCompleteParameters.md
8989
docs/JobCreateParameters.md
9090
docs/JobDetails.md
9191
docs/JobKeysCreateParameters.md
92+
docs/JobKeysDeleteParameters.md
9293
docs/JobLocale.md
9394
docs/JobLocaleCompleteParameters.md
9495
docs/JobLocaleCompleteReviewParameters.md
@@ -417,6 +418,7 @@ src/main/java/com/phrase/client/model/JobCompleteParameters.java
417418
src/main/java/com/phrase/client/model/JobCreateParameters.java
418419
src/main/java/com/phrase/client/model/JobDetails.java
419420
src/main/java/com/phrase/client/model/JobKeysCreateParameters.java
421+
src/main/java/com/phrase/client/model/JobKeysDeleteParameters.java
420422
src/main/java/com/phrase/client/model/JobLocale.java
421423
src/main/java/com/phrase/client/model/JobLocaleCompleteParameters.java
422424
src/main/java/com/phrase/client/model/JobLocaleCompleteReviewParameters.java
@@ -679,6 +681,7 @@ src/test/java/com/phrase/client/model/JobCompleteParametersTest.java
679681
src/test/java/com/phrase/client/model/JobCreateParametersTest.java
680682
src/test/java/com/phrase/client/model/JobDetailsTest.java
681683
src/test/java/com/phrase/client/model/JobKeysCreateParametersTest.java
684+
src/test/java/com/phrase/client/model/JobKeysDeleteParametersTest.java
682685
src/test/java/com/phrase/client/model/JobLocaleCompleteParametersTest.java
683686
src/test/java/com/phrase/client/model/JobLocaleCompleteReviewParametersTest.java
684687
src/test/java/com/phrase/client/model/JobLocaleReopenParametersTest.java

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Class | Method | HTTP request | Description
447447
- [JobCreateParameters](docs/JobCreateParameters.md)
448448
- [JobDetails](docs/JobDetails.md)
449449
- [JobKeysCreateParameters](docs/JobKeysCreateParameters.md)
450+
- [JobKeysDeleteParameters](docs/JobKeysDeleteParameters.md)
450451
- [JobLocale](docs/JobLocale.md)
451452
- [JobLocaleCompleteParameters](docs/JobLocaleCompleteParameters.md)
452453
- [JobLocaleCompleteReviewParameters](docs/JobLocaleCompleteReviewParameters.md)

api/openapi.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8971,27 +8971,12 @@ paths:
89718971
schema:
89728972
type: string
89738973
style: simple
8974-
- description: specify the branch to use
8975-
example: my-feature-branch
8976-
explode: true
8977-
in: query
8978-
name: branch
8979-
required: false
8980-
schema:
8981-
type: string
8982-
style: form
8983-
- description: ids of keys that should be removed from the job
8984-
example:
8985-
- abcd1234cdef1234abcd1234cdef1234
8986-
explode: true
8987-
in: query
8988-
name: translation_key_ids
8989-
required: false
8990-
schema:
8991-
items:
8992-
type: string
8993-
type: array
8994-
style: form
8974+
requestBody:
8975+
content:
8976+
application/json:
8977+
schema:
8978+
$ref: '#/components/schemas/job_keys_delete_parameters'
8979+
required: true
89958980
responses:
89968981
"204":
89978982
description: The resource was deleted successfully.
@@ -9046,9 +9031,9 @@ paths:
90469031
--project_id <project_id> \
90479032
--id <id> \
90489033
--branch my-feature-branch \
9049-
--translation_key_ids "abcd1234cdef1234abcd1234cdef1234" \
9034+
--data '{"branch": "my-feature-branch", "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
90509035
--access_token <token>
9051-
x-cli-version: "2.5"
9036+
x-content-type: application/json
90529037
x-accepts: application/json
90539038
post:
90549039
description: Add multiple keys to a existing job.
@@ -32610,6 +32595,23 @@ components:
3261032595
type: array
3261132596
title: job/keys/create/parameters
3261232597
type: object
32598+
job_keys_delete_parameters:
32599+
properties:
32600+
branch:
32601+
description: specify the branch to use
32602+
example: my-feature-branch
32603+
type: string
32604+
translation_key_ids:
32605+
description: ids of keys that should be deleted from the job
32606+
example:
32607+
- abcd1234cdef1234abcd1234cdef1234
32608+
items:
32609+
type: string
32610+
type: array
32611+
required:
32612+
- translation_key_ids
32613+
title: job/keys/delete/parameters
32614+
type: object
3261332615
job_template_create_parameters:
3261432616
properties:
3261532617
branch:

docs/JobKeysDeleteParameters.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# JobKeysDeleteParameters
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**branch** | **String** | specify the branch to use | [optional]
10+
**translationKeyIds** | **List&lt;String&gt;** | ids of keys that should be deleted from the job |
11+
12+
13+

docs/JobsApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Name | Type | Description | Notes
346346

347347
<a name="jobKeysDelete"></a>
348348
# **jobKeysDelete**
349-
> jobKeysDelete(projectId, id, xPhraseAppOTP, branch, translationKeyIds)
349+
> jobKeysDelete(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP)
350350
351351
Remove keys from job
352352

@@ -380,11 +380,10 @@ public class Example {
380380
JobsApi apiInstance = new JobsApi(defaultClient);
381381
String projectId = "projectId_example"; // String | Project ID
382382
String id = "id_example"; // String | ID
383+
JobKeysDeleteParameters jobKeysDeleteParameters = new JobKeysDeleteParameters(); // JobKeysDeleteParameters |
383384
String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
384-
String branch = "my-feature-branch"; // String | specify the branch to use
385-
List<String> translationKeyIds = Arrays.asList(); // List<String> | ids of keys that should be removed from the job
386385
try {
387-
apiInstance.jobKeysDelete(projectId, id, xPhraseAppOTP, branch, translationKeyIds);
386+
apiInstance.jobKeysDelete(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP);
388387
} catch (ApiException e) {
389388
System.err.println("Exception when calling JobsApi#jobKeysDelete");
390389
System.err.println("Status code: " + e.getCode());
@@ -402,9 +401,8 @@ Name | Type | Description | Notes
402401
------------- | ------------- | ------------- | -------------
403402
**projectId** | **String**| Project ID |
404403
**id** | **String**| ID |
404+
**jobKeysDeleteParameters** | [**JobKeysDeleteParameters**](JobKeysDeleteParameters.md)| |
405405
**xPhraseAppOTP** | **String**| Two-Factor-Authentication token (optional) | [optional]
406-
**branch** | **String**| specify the branch to use | [optional]
407-
**translationKeyIds** | [**List&lt;String&gt;**](String.md)| ids of keys that should be removed from the job | [optional]
408406

409407
### Return type
410408

@@ -416,7 +414,7 @@ null (empty response body)
416414

417415
### HTTP request headers
418416

419-
- **Content-Type**: Not defined
417+
- **Content-Type**: application/json
420418
- **Accept**: Not defined
421419

422420
### HTTP response details

src/main/java/com/phrase/client/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import java.util.Map;
1616
import java.util.List;
1717

18-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-15T11:52:20.073452171Z[Etc/UTC]")
18+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-29T15:15:40.351400890Z[Etc/UTC]")
1919
public class ApiException extends Exception {
2020
private int code = 0;
2121
private Map<String, List<String>> responseHeaders = null;

src/main/java/com/phrase/client/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-15T11:52:20.073452171Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-29T15:15:40.351400890Z[Etc/UTC]")
1616
public class Configuration {
1717
private static ApiClient defaultApiClient = new ApiClient();
1818

src/main/java/com/phrase/client/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-15T11:52:20.073452171Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-29T15:15:40.351400890Z[Etc/UTC]")
1616
public class Pair {
1717
private String name = "";
1818
private String value = "";

src/main/java/com/phrase/client/StringUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-15T11:52:20.073452171Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-29T15:15:40.351400890Z[Etc/UTC]")
1616
public class StringUtil {
1717
/**
1818
* Check if the given array contains the given value (with case-insensitive comparison).

src/main/java/com/phrase/client/api/JobsApi.java

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.phrase.client.model.JobCreateParameters;
3232
import com.phrase.client.model.JobDetails;
3333
import com.phrase.client.model.JobKeysCreateParameters;
34+
import com.phrase.client.model.JobKeysDeleteParameters;
3435
import com.phrase.client.model.JobReopenParameters;
3536
import com.phrase.client.model.JobStartParameters;
3637
import com.phrase.client.model.JobUpdateParameters;
@@ -649,9 +650,8 @@ public okhttp3.Call jobKeysCreateAsync(String projectId, String id, JobKeysCreat
649650
* Build call for jobKeysDelete
650651
* @param projectId Project ID (required)
651652
* @param id ID (required)
653+
* @param jobKeysDeleteParameters (required)
652654
* @param xPhraseAppOTP Two-Factor-Authentication token (optional) (optional)
653-
* @param branch specify the branch to use (optional)
654-
* @param translationKeyIds ids of keys that should be removed from the job (optional)
655655
* @param _callback Callback for upload/download progress
656656
* @return Call to execute
657657
* @throws ApiException If fail to serialize the request body object
@@ -664,8 +664,8 @@ public okhttp3.Call jobKeysCreateAsync(String projectId, String id, JobKeysCreat
664664
<tr><td> 429 </td><td> Rate Limiting </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
665665
</table>
666666
*/
667-
public okhttp3.Call jobKeysDeleteCall(String projectId, String id, String xPhraseAppOTP, String branch, List<String> translationKeyIds, final ApiCallback _callback) throws ApiException {
668-
Object localVarPostBody = null;
667+
public okhttp3.Call jobKeysDeleteCall(String projectId, String id, JobKeysDeleteParameters jobKeysDeleteParameters, String xPhraseAppOTP, final ApiCallback _callback) throws ApiException {
668+
Object localVarPostBody = jobKeysDeleteParameters;
669669

670670
// create path and map variables
671671
String localVarPath = "/projects/{project_id}/jobs/{id}/keys"
@@ -674,14 +674,6 @@ public okhttp3.Call jobKeysDeleteCall(String projectId, String id, String xPhras
674674

675675
List<Pair> localVarQueryParams = new ArrayList<Pair>();
676676
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
677-
if (branch != null) {
678-
localVarQueryParams.addAll(localVarApiClient.parameterToPair("branch", branch));
679-
}
680-
681-
if (translationKeyIds != null) {
682-
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "translation_key_ids", translationKeyIds));
683-
}
684-
685677
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
686678
if (xPhraseAppOTP != null) {
687679
localVarHeaderParams.put("X-PhraseApp-OTP", localVarApiClient.parameterToString(xPhraseAppOTP));
@@ -698,7 +690,7 @@ public okhttp3.Call jobKeysDeleteCall(String projectId, String id, String xPhras
698690
}
699691

700692
final String[] localVarContentTypes = {
701-
693+
"application/json"
702694
};
703695
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
704696
localVarHeaderParams.put("Content-Type", localVarContentType);
@@ -708,7 +700,7 @@ public okhttp3.Call jobKeysDeleteCall(String projectId, String id, String xPhras
708700
}
709701

710702
@SuppressWarnings("rawtypes")
711-
private okhttp3.Call jobKeysDeleteValidateBeforeCall(String projectId, String id, String xPhraseAppOTP, String branch, List<String> translationKeyIds, final ApiCallback _callback) throws ApiException {
703+
private okhttp3.Call jobKeysDeleteValidateBeforeCall(String projectId, String id, JobKeysDeleteParameters jobKeysDeleteParameters, String xPhraseAppOTP, final ApiCallback _callback) throws ApiException {
712704

713705
// verify the required parameter 'projectId' is set
714706
if (projectId == null) {
@@ -720,8 +712,13 @@ private okhttp3.Call jobKeysDeleteValidateBeforeCall(String projectId, String id
720712
throw new ApiException("Missing the required parameter 'id' when calling jobKeysDelete(Async)");
721713
}
722714

715+
// verify the required parameter 'jobKeysDeleteParameters' is set
716+
if (jobKeysDeleteParameters == null) {
717+
throw new ApiException("Missing the required parameter 'jobKeysDeleteParameters' when calling jobKeysDelete(Async)");
718+
}
719+
723720

724-
okhttp3.Call localVarCall = jobKeysDeleteCall(projectId, id, xPhraseAppOTP, branch, translationKeyIds, _callback);
721+
okhttp3.Call localVarCall = jobKeysDeleteCall(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP, _callback);
725722
return localVarCall;
726723

727724
}
@@ -731,9 +728,8 @@ private okhttp3.Call jobKeysDeleteValidateBeforeCall(String projectId, String id
731728
* Remove multiple keys from existing job.
732729
* @param projectId Project ID (required)
733730
* @param id ID (required)
731+
* @param jobKeysDeleteParameters (required)
734732
* @param xPhraseAppOTP Two-Factor-Authentication token (optional) (optional)
735-
* @param branch specify the branch to use (optional)
736-
* @param translationKeyIds ids of keys that should be removed from the job (optional)
737733
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
738734
* @http.response.details
739735
<table summary="Response Details" border="1">
@@ -744,18 +740,17 @@ private okhttp3.Call jobKeysDeleteValidateBeforeCall(String projectId, String id
744740
<tr><td> 429 </td><td> Rate Limiting </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
745741
</table>
746742
*/
747-
public void jobKeysDelete(String projectId, String id, String xPhraseAppOTP, String branch, List<String> translationKeyIds) throws ApiException {
748-
jobKeysDeleteWithHttpInfo(projectId, id, xPhraseAppOTP, branch, translationKeyIds);
743+
public void jobKeysDelete(String projectId, String id, JobKeysDeleteParameters jobKeysDeleteParameters, String xPhraseAppOTP) throws ApiException {
744+
jobKeysDeleteWithHttpInfo(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP);
749745
}
750746

751747
/**
752748
* Remove keys from job
753749
* Remove multiple keys from existing job.
754750
* @param projectId Project ID (required)
755751
* @param id ID (required)
752+
* @param jobKeysDeleteParameters (required)
756753
* @param xPhraseAppOTP Two-Factor-Authentication token (optional) (optional)
757-
* @param branch specify the branch to use (optional)
758-
* @param translationKeyIds ids of keys that should be removed from the job (optional)
759754
* @return ApiResponse&lt;Void&gt;
760755
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
761756
* @http.response.details
@@ -767,8 +762,8 @@ public void jobKeysDelete(String projectId, String id, String xPhraseAppOTP, Str
767762
<tr><td> 429 </td><td> Rate Limiting </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
768763
</table>
769764
*/
770-
public ApiResponse<Void> jobKeysDeleteWithHttpInfo(String projectId, String id, String xPhraseAppOTP, String branch, List<String> translationKeyIds) throws ApiException {
771-
okhttp3.Call localVarCall = jobKeysDeleteValidateBeforeCall(projectId, id, xPhraseAppOTP, branch, translationKeyIds, null);
765+
public ApiResponse<Void> jobKeysDeleteWithHttpInfo(String projectId, String id, JobKeysDeleteParameters jobKeysDeleteParameters, String xPhraseAppOTP) throws ApiException {
766+
okhttp3.Call localVarCall = jobKeysDeleteValidateBeforeCall(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP, null);
772767
return localVarApiClient.execute(localVarCall);
773768
}
774769

@@ -777,9 +772,8 @@ public ApiResponse<Void> jobKeysDeleteWithHttpInfo(String projectId, String id,
777772
* Remove multiple keys from existing job.
778773
* @param projectId Project ID (required)
779774
* @param id ID (required)
775+
* @param jobKeysDeleteParameters (required)
780776
* @param xPhraseAppOTP Two-Factor-Authentication token (optional) (optional)
781-
* @param branch specify the branch to use (optional)
782-
* @param translationKeyIds ids of keys that should be removed from the job (optional)
783777
* @param _callback The callback to be executed when the API call finishes
784778
* @return The request call
785779
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -792,9 +786,9 @@ public ApiResponse<Void> jobKeysDeleteWithHttpInfo(String projectId, String id,
792786
<tr><td> 429 </td><td> Rate Limiting </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
793787
</table>
794788
*/
795-
public okhttp3.Call jobKeysDeleteAsync(String projectId, String id, String xPhraseAppOTP, String branch, List<String> translationKeyIds, final ApiCallback<Void> _callback) throws ApiException {
789+
public okhttp3.Call jobKeysDeleteAsync(String projectId, String id, JobKeysDeleteParameters jobKeysDeleteParameters, String xPhraseAppOTP, final ApiCallback<Void> _callback) throws ApiException {
796790

797-
okhttp3.Call localVarCall = jobKeysDeleteValidateBeforeCall(projectId, id, xPhraseAppOTP, branch, translationKeyIds, _callback);
791+
okhttp3.Call localVarCall = jobKeysDeleteValidateBeforeCall(projectId, id, jobKeysDeleteParameters, xPhraseAppOTP, _callback);
798792
localVarApiClient.executeAsync(localVarCall, _callback);
799793
return localVarCall;
800794
}

0 commit comments

Comments
 (0)