Skip to content

Commit a9a5d0b

Browse files
author
Phrase
committed
1 parent 717bfab commit a9a5d0b

246 files changed

Lines changed: 933 additions & 237 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.

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ docs/JobTemplatesApi.md
128128
docs/JobUpdateParameters.md
129129
docs/JobsApi.md
130130
docs/KeyCreateParameters.md
131+
docs/KeyFormatAnnotationsApi.md
132+
docs/KeyFormatAnnotationsList200ResponseInner.md
131133
docs/KeyLink.md
132134
docs/KeyLinksBatchDestroyParameters.md
133135
docs/KeyLinksCreateParameters.md
@@ -340,6 +342,7 @@ src/main/java/com/phrase/client/api/JobLocalesApi.java
340342
src/main/java/com/phrase/client/api/JobTemplateLocalesApi.java
341343
src/main/java/com/phrase/client/api/JobTemplatesApi.java
342344
src/main/java/com/phrase/client/api/JobsApi.java
345+
src/main/java/com/phrase/client/api/KeyFormatAnnotationsApi.java
343346
src/main/java/com/phrase/client/api/KeysApi.java
344347
src/main/java/com/phrase/client/api/KeysFigmaAttachmentsApi.java
345348
src/main/java/com/phrase/client/api/LinkedKeysApi.java
@@ -476,6 +479,7 @@ src/main/java/com/phrase/client/model/JobTemplatePreview.java
476479
src/main/java/com/phrase/client/model/JobTemplateUpdateParameters.java
477480
src/main/java/com/phrase/client/model/JobUpdateParameters.java
478481
src/main/java/com/phrase/client/model/KeyCreateParameters.java
482+
src/main/java/com/phrase/client/model/KeyFormatAnnotationsList200ResponseInner.java
479483
src/main/java/com/phrase/client/model/KeyLink.java
480484
src/main/java/com/phrase/client/model/KeyLinksBatchDestroyParameters.java
481485
src/main/java/com/phrase/client/model/KeyLinksCreateParameters.java
@@ -633,6 +637,7 @@ src/test/java/com/phrase/client/api/JobLocalesApiTest.java
633637
src/test/java/com/phrase/client/api/JobTemplateLocalesApiTest.java
634638
src/test/java/com/phrase/client/api/JobTemplatesApiTest.java
635639
src/test/java/com/phrase/client/api/JobsApiTest.java
640+
src/test/java/com/phrase/client/api/KeyFormatAnnotationsApiTest.java
636641
src/test/java/com/phrase/client/api/KeysFigmaAttachmentsApiTest.java
637642
src/test/java/com/phrase/client/api/LinkedKeysApiTest.java
638643
src/test/java/com/phrase/client/api/LocaleDownloadsApiTest.java
@@ -761,6 +766,7 @@ src/test/java/com/phrase/client/model/JobTemplateUpdateParametersTest.java
761766
src/test/java/com/phrase/client/model/JobTest.java
762767
src/test/java/com/phrase/client/model/JobUpdateParametersTest.java
763768
src/test/java/com/phrase/client/model/KeyCreateParametersTest.java
769+
src/test/java/com/phrase/client/model/KeyFormatAnnotationsList200ResponseInnerTest.java
764770
src/test/java/com/phrase/client/model/KeyLinkTest.java
765771
src/test/java/com/phrase/client/model/KeyLinksBatchDestroyParametersTest.java
766772
src/test/java/com/phrase/client/model/KeyLinksCreateParametersTest.java

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Class | Method | HTTP request | Description
239239
*JobsApi* | [**jobUpdate**](docs/JobsApi.md#jobUpdate) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
240240
*JobsApi* | [**jobsByAccount**](docs/JobsApi.md#jobsByAccount) | **GET** /accounts/{account_id}/jobs | List account jobs
241241
*JobsApi* | [**jobsList**](docs/JobsApi.md#jobsList) | **GET** /projects/{project_id}/jobs | List jobs
242+
*KeyFormatAnnotationsApi* | [**keyFormatAnnotationsList**](docs/KeyFormatAnnotationsApi.md#keyFormatAnnotationsList) | **GET** /projects/{project_id}/keys/{id}/format_annotations | List format annotations for a key
242243
*KeysApi* | [**keyCreate**](docs/KeysApi.md#keyCreate) | **POST** /projects/{project_id}/keys | Create a key
243244
*KeysApi* | [**keyDelete**](docs/KeysApi.md#keyDelete) | **DELETE** /projects/{project_id}/keys/{id} | Delete a key
244245
*KeysApi* | [**keyShow**](docs/KeysApi.md#keyShow) | **GET** /projects/{project_id}/keys/{id} | Get a single key
@@ -500,6 +501,7 @@ Class | Method | HTTP request | Description
500501
- [JobTemplateUpdateParameters](docs/JobTemplateUpdateParameters.md)
501502
- [JobUpdateParameters](docs/JobUpdateParameters.md)
502503
- [KeyCreateParameters](docs/KeyCreateParameters.md)
504+
- [KeyFormatAnnotationsList200ResponseInner](docs/KeyFormatAnnotationsList200ResponseInner.md)
503505
- [KeyLink](docs/KeyLink.md)
504506
- [KeyLinksBatchDestroyParameters](docs/KeyLinksBatchDestroyParameters.md)
505507
- [KeyLinksCreateParameters](docs/KeyLinksCreateParameters.md)

api/openapi.yaml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ tags:
131131
- name: Job Template Locales
132132
- name: Job Templates
133133
- name: Jobs
134+
- name: Key Format Annotations
134135
- name: Keys
135136
- name: Linked Keys
136137
- name: Locales
@@ -35048,6 +35049,122 @@ paths:
3504835049
-u USERNAME_OR_ACCESS_TOKEN \
3504935050
-X DELETE
3505035051
x-accepts: application/json
35052+
/projects/{project_id}/keys/{id}/format_annotations:
35053+
get:
35054+
description: |
35055+
Returns the format annotations stored on a translation key. Format annotations capture
35056+
file-format data recorded when the key was imported — for example, an ARB placeholder
35057+
block or an XLIFF note.
35058+
35059+
Results are limited to 1,000 entries.
35060+
operationId: key_format_annotations/list
35061+
parameters:
35062+
- description: Two-Factor-Authentication token (optional)
35063+
explode: false
35064+
in: header
35065+
name: X-PhraseApp-OTP
35066+
required: false
35067+
schema:
35068+
type: string
35069+
style: simple
35070+
- description: Project ID
35071+
explode: false
35072+
in: path
35073+
name: project_id
35074+
required: true
35075+
schema:
35076+
type: string
35077+
style: simple
35078+
- description: ID
35079+
explode: false
35080+
in: path
35081+
name: id
35082+
required: true
35083+
schema:
35084+
type: string
35085+
style: simple
35086+
- description: Branch to use
35087+
example: my-feature-branch
35088+
explode: true
35089+
in: query
35090+
name: branch
35091+
required: false
35092+
schema:
35093+
type: string
35094+
style: form
35095+
responses:
35096+
"200":
35097+
content:
35098+
application/json:
35099+
example:
35100+
- file_format: xliff_2
35101+
original_representation: <note category="meaning">header</note>
35102+
schema:
35103+
items:
35104+
$ref: '#/components/schemas/key_format_annotations_list_200_response_inner'
35105+
type: array
35106+
description: OK
35107+
headers:
35108+
X-Rate-Limit-Limit:
35109+
$ref: '#/components/headers/X-Rate-Limit-Limit'
35110+
X-Rate-Limit-Remaining:
35111+
$ref: '#/components/headers/X-Rate-Limit-Remaining'
35112+
X-Rate-Limit-Reset:
35113+
$ref: '#/components/headers/X-Rate-Limit-Reset'
35114+
"400":
35115+
description: "Bad request. The request could not be parsed or a parameter\
35116+
\ failed validation. Verify the request body, the content type, and the\
35117+
\ parameter types, then retry."
35118+
headers:
35119+
X-Rate-Limit-Limit:
35120+
$ref: '#/components/headers/X-Rate-Limit-Limit'
35121+
X-Rate-Limit-Remaining:
35122+
$ref: '#/components/headers/X-Rate-Limit-Remaining'
35123+
X-Rate-Limit-Reset:
35124+
$ref: '#/components/headers/X-Rate-Limit-Reset'
35125+
"401":
35126+
description: "Unauthorized. Authentication failed because the access token\
35127+
\ is missing, expired, or invalid. Supply a valid access token and retry."
35128+
"403":
35129+
description: "Forbidden. The credentials are valid but not permitted for\
35130+
\ this request: the access token may lack the required scope, the user\
35131+
\ may lack permission on the resource, or the account plan may not include\
35132+
\ the feature. Use a token with the required scope on an account and user\
35133+
\ that hold the necessary permissions."
35134+
headers:
35135+
X-Rate-Limit-Limit:
35136+
$ref: '#/components/headers/X-Rate-Limit-Limit'
35137+
X-Rate-Limit-Remaining:
35138+
$ref: '#/components/headers/X-Rate-Limit-Remaining'
35139+
X-Rate-Limit-Reset:
35140+
$ref: '#/components/headers/X-Rate-Limit-Reset'
35141+
"404":
35142+
description: "Not found. The requested resource does not exist or is not\
35143+
\ visible to the authenticated user. Verify the identifiers in the request\
35144+
\ path and that the token has access to them, then retry."
35145+
headers:
35146+
X-Rate-Limit-Limit:
35147+
$ref: '#/components/headers/X-Rate-Limit-Limit'
35148+
X-Rate-Limit-Remaining:
35149+
$ref: '#/components/headers/X-Rate-Limit-Remaining'
35150+
X-Rate-Limit-Reset:
35151+
$ref: '#/components/headers/X-Rate-Limit-Reset'
35152+
"429":
35153+
description: Too many requests. The rate limit has been exceeded. Wait until
35154+
the time indicated by the `X-Rate-Limit-Reset` response header before
35155+
retrying.
35156+
headers:
35157+
X-Rate-Limit-Limit:
35158+
$ref: '#/components/headers/X-Rate-Limit-Limit'
35159+
X-Rate-Limit-Remaining:
35160+
$ref: '#/components/headers/X-Rate-Limit-Remaining'
35161+
X-Rate-Limit-Reset:
35162+
$ref: '#/components/headers/X-Rate-Limit-Reset'
35163+
summary: List format annotations for a key
35164+
tags:
35165+
- Key Format Annotations
35166+
x-cli-version: "2.5"
35167+
x-accepts: application/json
3505135168
/accounts/{account_id}/automations:
3505235169
get:
3505335170
description: |
@@ -43878,6 +43995,22 @@ components:
4387843995
- child_key_ids
4387943996
title: key_links/batch_destroy/parameters
4388043997
type: object
43998+
key_format_annotations_list_200_response_inner:
43999+
example:
44000+
original_representation: <note category="meaning">header</note>
44001+
file_format: xliff_2
44002+
properties:
44003+
file_format:
44004+
description: |
44005+
The file format that produced this annotation.
44006+
example: xliff_2
44007+
type: string
44008+
original_representation:
44009+
description: |
44010+
The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.
44011+
example: <note category="meaning">header</note>
44012+
type: string
44013+
type: object
4388144014
automations_create_parameters:
4388244015
properties:
4388344016
name:
@@ -44226,6 +44359,7 @@ x-tagGroups:
4422644359
- Projects
4422744360
- Locales
4422844361
- Keys
44362+
- Key Format Annotations
4422944363
- Translations
4423044364
- Uploads
4423144365
- Tags

docs/KeyFormatAnnotationsApi.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# KeyFormatAnnotationsApi
2+
3+
All URIs are relative to *https://api.phrase.com/v2*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**keyFormatAnnotationsList**](KeyFormatAnnotationsApi.md#keyFormatAnnotationsList) | **GET** /projects/{project_id}/keys/{id}/format_annotations | List format annotations for a key
8+
9+
10+
<a name="keyFormatAnnotationsList"></a>
11+
# **keyFormatAnnotationsList**
12+
> List&lt;KeyFormatAnnotationsList200ResponseInner&gt; keyFormatAnnotationsList(projectId, id, xPhraseAppOTP, branch)
13+
14+
List format annotations for a key
15+
16+
Returns the format annotations stored on a translation key. Format annotations capture file-format data recorded when the key was imported — for example, an ARB placeholder block or an XLIFF note. Results are limited to 1,000 entries.
17+
18+
### Example
19+
```java
20+
// Import classes:
21+
import com.phrase.client.ApiClient;
22+
import com.phrase.client.ApiException;
23+
import com.phrase.client.Configuration;
24+
import com.phrase.client.auth.*;
25+
import com.phrase.client.models.*;
26+
import com.phrase.client.api.KeyFormatAnnotationsApi;
27+
28+
public class Example {
29+
public static void main(String[] args) {
30+
ApiClient defaultClient = Configuration.getDefaultApiClient();
31+
defaultClient.setBasePath("https://api.phrase.com/v2");
32+
33+
// Configure HTTP basic authorization: Basic
34+
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
35+
Basic.setUsername("YOUR USERNAME");
36+
Basic.setPassword("YOUR PASSWORD");
37+
38+
// Configure API key authorization: Token
39+
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
40+
Token.setApiKey("YOUR API KEY");
41+
Token.setApiKeyPrefix("token");
42+
43+
KeyFormatAnnotationsApi apiInstance = new KeyFormatAnnotationsApi(defaultClient);
44+
String projectId = "projectId_example"; // String | Project ID
45+
String id = "id_example"; // String | ID
46+
String xPhraseAppOTP = "xPhraseAppOTP_example"; // String | Two-Factor-Authentication token (optional)
47+
String branch = "my-feature-branch"; // String | Branch to use
48+
try {
49+
List<KeyFormatAnnotationsList200ResponseInner> result = apiInstance.keyFormatAnnotationsList(projectId, id, xPhraseAppOTP, branch);
50+
System.out.println(result);
51+
} catch (ApiException e) {
52+
System.err.println("Exception when calling KeyFormatAnnotationsApi#keyFormatAnnotationsList");
53+
System.err.println("Status code: " + e.getCode());
54+
System.err.println("Reason: " + e.getResponseBody());
55+
System.err.println("Response headers: " + e.getResponseHeaders());
56+
e.printStackTrace();
57+
}
58+
}
59+
}
60+
```
61+
62+
### Parameters
63+
64+
Name | Type | Description | Notes
65+
------------- | ------------- | ------------- | -------------
66+
**projectId** | **String**| Project ID |
67+
**id** | **String**| ID |
68+
**xPhraseAppOTP** | **String**| Two-Factor-Authentication token (optional) | [optional]
69+
**branch** | **String**| Branch to use | [optional]
70+
71+
### Return type
72+
73+
[**List&lt;KeyFormatAnnotationsList200ResponseInner&gt;**](KeyFormatAnnotationsList200ResponseInner.md)
74+
75+
### Authorization
76+
77+
[Basic](../README.md#Basic), [Token](../README.md#Token)
78+
79+
### HTTP request headers
80+
81+
- **Content-Type**: Not defined
82+
- **Accept**: application/json
83+
84+
### HTTP response details
85+
| Status code | Description | Response headers |
86+
|-------------|-------------|------------------|
87+
**200** | OK | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
88+
**400** | Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
89+
**401** | Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. | - |
90+
**403** | Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
91+
**404** | Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
92+
**429** | Too many requests. The rate limit has been exceeded. Wait until the time indicated by the &#x60;X-Rate-Limit-Reset&#x60; response header before retrying. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
93+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# KeyFormatAnnotationsList200ResponseInner
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**fileFormat** | **String** | The file format that produced this annotation. | [optional]
10+
**originalRepresentation** | **String** | The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content. | [optional]
11+
12+
13+

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 = "2026-07-23T11:55:53.504549897Z[Etc/UTC]")
18+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-07-23T12:09:08.710327955Z[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 = "2026-07-23T11:55:53.504549897Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-07-23T12:09:08.710327955Z[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 = "2026-07-23T11:55:53.504549897Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-07-23T12:09:08.710327955Z[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 = "2026-07-23T11:55:53.504549897Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-07-23T12:09:08.710327955Z[Etc/UTC]")
1616
public class StringUtil {
1717
/**
1818
* Check if the given array contains the given value (with case-insensitive comparison).

0 commit comments

Comments
 (0)