Skip to content

Commit 4df26f8

Browse files
author
Phrase
committed
1 parent 9961f12 commit 4df26f8

File tree

12 files changed

+680
-0
lines changed

12 files changed

+680
-0
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ src/apis/GlossaryTermTranslationsApi.ts
2020
src/apis/GlossaryTermsApi.ts
2121
src/apis/ICUApi.ts
2222
src/apis/InvitationsApi.ts
23+
src/apis/JobAnnotationsApi.ts
2324
src/apis/JobCommentsApi.ts
2425
src/apis/JobLocalesApi.ts
2526
src/apis/JobTemplateLocalesApi.ts
@@ -115,6 +116,9 @@ src/models/InvitationCreateParameters.ts
115116
src/models/InvitationUpdateParameters.ts
116117
src/models/InvitationUpdateSettingsParameters.ts
117118
src/models/Job.ts
119+
src/models/JobAnnotation.ts
120+
src/models/JobAnnotationShort.ts
121+
src/models/JobAnnotationUpdateParameters.ts
118122
src/models/JobComment.ts
119123
src/models/JobCommentCreateParameters.ts
120124
src/models/JobCommentUpdateParameters.ts

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ Class | Method | HTTP request | Description
274274
*InvitationsApi* | **invitationUpdate** | **PATCH** /accounts/{account_id}/invitations/{id} | Update an invitation
275275
*InvitationsApi* | **invitationUpdateSettings** | **PATCH** /projects/{project_id}/invitations/{id} | Update a member\'s invitation access
276276
*InvitationsApi* | **invitationsList** | **GET** /accounts/{account_id}/invitations | List invitations
277+
*JobAnnotationsApi* | **jobAnnotationDelete** | **DELETE** /projects/{project_id}/jobs/{job_id}/annotations/{id} | Delete a job annotation
278+
*JobAnnotationsApi* | **jobAnnotationUpdate** | **PATCH** /projects/{project_id}/jobs/{job_id}/annotations/{id} | Create/Update a job annotation
279+
*JobAnnotationsApi* | **jobAnnotationsList** | **GET** /projects/{project_id}/jobs/{job_id}/annotations | List job annotations
280+
*JobAnnotationsApi* | **jobLocaleAnnotationDelete** | **DELETE** /projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations/{id} | Delete a job locale annotation
281+
*JobAnnotationsApi* | **jobLocaleAnnotationUpdate** | **PATCH** /projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations/{id} | Create/Update a job locale annotation
282+
*JobAnnotationsApi* | **jobLocaleAnnotationsList** | **GET** /projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations | List job locale annotations
277283
*JobCommentsApi* | **jobCommentCreate** | **POST** /projects/{project_id}/jobs/{job_id}/comments | Create a job comment
278284
*JobCommentsApi* | **jobCommentDelete** | **DELETE** /projects/{project_id}/jobs/{job_id}/comments/{id} | Delete a job comment
279285
*JobCommentsApi* | **jobCommentShow** | **GET** /projects/{project_id}/jobs/{job_id}/comments/{id} | Get a single job comment

src/apis/JobAnnotationsApi.ts

Lines changed: 419 additions & 0 deletions
Large diffs are not rendered by default.

src/apis/JobLocalesApi.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export interface JobLocaleShowRequest {
7272
id: string;
7373
xPhraseAppOTP?: string;
7474
branch?: string;
75+
includeAnnotations?: boolean;
7576
}
7677

7778
export interface JobLocaleUpdateRequest {
@@ -96,6 +97,7 @@ export interface JobLocalesListRequest {
9697
page?: number;
9798
perPage?: number;
9899
branch?: string;
100+
includeAnnotations?: boolean;
99101
}
100102

101103
/**
@@ -355,6 +357,10 @@ export class JobLocalesApi extends runtime.BaseAPI {
355357
queryParameters['branch'] = requestParameters.branch;
356358
}
357359

360+
if (requestParameters.includeAnnotations !== undefined) {
361+
queryParameters['include_annotations'] = requestParameters.includeAnnotations;
362+
}
363+
358364
const headerParameters: runtime.HTTPHeaders = {};
359365

360366
if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) {
@@ -526,6 +532,10 @@ export class JobLocalesApi extends runtime.BaseAPI {
526532
queryParameters['branch'] = requestParameters.branch;
527533
}
528534

535+
if (requestParameters.includeAnnotations !== undefined) {
536+
queryParameters['include_annotations'] = requestParameters.includeAnnotations;
537+
}
538+
529539
const headerParameters: runtime.HTTPHeaders = {};
530540

531541
if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) {

src/apis/JobsApi.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export interface JobShowRequest {
9696
id: string;
9797
xPhraseAppOTP?: string;
9898
branch?: string;
99+
includeAnnotations?: boolean;
99100
}
100101

101102
export interface JobStartRequest {
@@ -534,6 +535,10 @@ export class JobsApi extends runtime.BaseAPI {
534535
queryParameters['branch'] = requestParameters.branch;
535536
}
536537

538+
if (requestParameters.includeAnnotations !== undefined) {
539+
queryParameters['include_annotations'] = requestParameters.includeAnnotations;
540+
}
541+
537542
const headerParameters: runtime.HTTPHeaders = {};
538543

539544
if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) {

src/apis/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export * from './GlossaryTermTranslationsApi';
1515
export * from './GlossaryTermsApi';
1616
export * from './ICUApi';
1717
export * from './InvitationsApi';
18+
export * from './JobAnnotationsApi';
1819
export * from './JobCommentsApi';
1920
export * from './JobLocalesApi';
2021
export * from './JobTemplateLocalesApi';

src/models/JobAnnotation.ts

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Phrase Strings API Reference
5+
*
6+
* The version of the OpenAPI document: 2.0.0
7+
* Contact: support@phrase.com
8+
*
9+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10+
* https://openapi-generator.tech
11+
* Do not edit the class manually.
12+
*/
13+
14+
import { exists, mapValues } from '../runtime';
15+
/**
16+
*
17+
* @export
18+
* @interface JobAnnotation
19+
*/
20+
export interface JobAnnotation {
21+
/**
22+
*
23+
* @type {string}
24+
* @memberof JobAnnotation
25+
*/
26+
name: string;
27+
/**
28+
*
29+
* @type {string}
30+
* @memberof JobAnnotation
31+
*/
32+
value: string;
33+
/**
34+
*
35+
* @type {Date}
36+
* @memberof JobAnnotation
37+
*/
38+
createdAt?: Date;
39+
/**
40+
*
41+
* @type {Date}
42+
* @memberof JobAnnotation
43+
*/
44+
updatedAt?: Date;
45+
}
46+
47+
export function JobAnnotationFromJSON(json: any): JobAnnotation {
48+
return JobAnnotationFromJSONTyped(json, false);
49+
}
50+
51+
export function JobAnnotationFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobAnnotation {
52+
if ((json === undefined) || (json === null)) {
53+
return json;
54+
}
55+
return {
56+
57+
'name': json['name'],
58+
'value': json['value'],
59+
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
60+
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
61+
};
62+
}
63+
64+
export function JobAnnotationToJSON(value?: JobAnnotation | null): any {
65+
if (value === undefined) {
66+
return undefined;
67+
}
68+
if (value === null) {
69+
return null;
70+
}
71+
return {
72+
73+
'name': value.name,
74+
'value': value.value,
75+
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
76+
'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
77+
};
78+
}
79+
80+

src/models/JobAnnotationShort.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Phrase Strings API Reference
5+
*
6+
* The version of the OpenAPI document: 2.0.0
7+
* Contact: support@phrase.com
8+
*
9+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10+
* https://openapi-generator.tech
11+
* Do not edit the class manually.
12+
*/
13+
14+
import { exists, mapValues } from '../runtime';
15+
/**
16+
*
17+
* @export
18+
* @interface JobAnnotationShort
19+
*/
20+
export interface JobAnnotationShort {
21+
/**
22+
*
23+
* @type {string}
24+
* @memberof JobAnnotationShort
25+
*/
26+
name: string;
27+
/**
28+
*
29+
* @type {string}
30+
* @memberof JobAnnotationShort
31+
*/
32+
value: string;
33+
}
34+
35+
export function JobAnnotationShortFromJSON(json: any): JobAnnotationShort {
36+
return JobAnnotationShortFromJSONTyped(json, false);
37+
}
38+
39+
export function JobAnnotationShortFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobAnnotationShort {
40+
if ((json === undefined) || (json === null)) {
41+
return json;
42+
}
43+
return {
44+
45+
'name': json['name'],
46+
'value': json['value'],
47+
};
48+
}
49+
50+
export function JobAnnotationShortToJSON(value?: JobAnnotationShort | null): any {
51+
if (value === undefined) {
52+
return undefined;
53+
}
54+
if (value === null) {
55+
return null;
56+
}
57+
return {
58+
59+
'name': value.name,
60+
'value': value.value,
61+
};
62+
}
63+
64+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Phrase Strings API Reference
5+
*
6+
* The version of the OpenAPI document: 2.0.0
7+
* Contact: support@phrase.com
8+
*
9+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10+
* https://openapi-generator.tech
11+
* Do not edit the class manually.
12+
*/
13+
14+
import { exists, mapValues } from '../runtime';
15+
/**
16+
*
17+
* @export
18+
* @interface JobAnnotationUpdateParameters
19+
*/
20+
export interface JobAnnotationUpdateParameters {
21+
/**
22+
* Annotation value
23+
* @type {string}
24+
* @memberof JobAnnotationUpdateParameters
25+
*/
26+
value?: string;
27+
/**
28+
* Branch name of the job
29+
* @type {string}
30+
* @memberof JobAnnotationUpdateParameters
31+
*/
32+
branch?: string;
33+
}
34+
35+
export function JobAnnotationUpdateParametersFromJSON(json: any): JobAnnotationUpdateParameters {
36+
return JobAnnotationUpdateParametersFromJSONTyped(json, false);
37+
}
38+
39+
export function JobAnnotationUpdateParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobAnnotationUpdateParameters {
40+
if ((json === undefined) || (json === null)) {
41+
return json;
42+
}
43+
return {
44+
45+
'value': !exists(json, 'value') ? undefined : json['value'],
46+
'branch': !exists(json, 'branch') ? undefined : json['branch'],
47+
};
48+
}
49+
50+
export function JobAnnotationUpdateParametersToJSON(value?: JobAnnotationUpdateParameters | null): any {
51+
if (value === undefined) {
52+
return undefined;
53+
}
54+
if (value === null) {
55+
return null;
56+
}
57+
return {
58+
59+
'value': value.value,
60+
'branch': value.branch,
61+
};
62+
}
63+
64+

src/models/JobDetails.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import {
1717
BranchNameFromJSON,
1818
BranchNameFromJSONTyped,
1919
BranchNameToJSON,
20+
JobAnnotationShort,
21+
JobAnnotationShortFromJSON,
22+
JobAnnotationShortFromJSONTyped,
23+
JobAnnotationShortToJSON,
2024
KeyPreview,
2125
KeyPreviewFromJSON,
2226
KeyPreviewFromJSONTyped,
@@ -137,6 +141,12 @@ export interface JobDetails {
137141
* @memberof JobDetails
138142
*/
139143
keys?: Array<KeyPreview>;
144+
/**
145+
*
146+
* @type {Array<JobAnnotationShort>}
147+
* @memberof JobDetails
148+
*/
149+
annotations?: Array<JobAnnotationShort>;
140150
}
141151

142152
export function JobDetailsFromJSON(json: any): JobDetails {
@@ -165,6 +175,7 @@ export function JobDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean)
165175
'sourceLocale': !exists(json, 'source_locale') ? undefined : LocalePreviewFromJSON(json['source_locale']),
166176
'locales': !exists(json, 'locales') ? undefined : ((json['locales'] as Array<any>).map(LocalePreviewFromJSON)),
167177
'keys': !exists(json, 'keys') ? undefined : ((json['keys'] as Array<any>).map(KeyPreviewFromJSON)),
178+
'annotations': !exists(json, 'annotations') ? undefined : ((json['annotations'] as Array<any>).map(JobAnnotationShortFromJSON)),
168179
};
169180
}
170181

@@ -193,6 +204,7 @@ export function JobDetailsToJSON(value?: JobDetails | null): any {
193204
'source_locale': LocalePreviewToJSON(value.sourceLocale),
194205
'locales': value.locales === undefined ? undefined : ((value.locales as Array<any>).map(LocalePreviewToJSON)),
195206
'keys': value.keys === undefined ? undefined : ((value.keys as Array<any>).map(KeyPreviewToJSON)),
207+
'annotations': value.annotations === undefined ? undefined : ((value.annotations as Array<any>).map(JobAnnotationShortToJSON)),
196208
};
197209
}
198210

0 commit comments

Comments
 (0)