Skip to content

Commit b381562

Browse files
github-actions[bot]fynnos
authored andcommitted
Update OpenAPI spec and client
1 parent ae4ede9 commit b381562

File tree

5 files changed

+104
-12
lines changed

5 files changed

+104
-12
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
import type { SdocSentencePair } from "./SdocSentencePair";
6+
export type AnnoscalingConfirmSuggest = {
7+
/**
8+
* Project to apply suggestions
9+
*/
10+
project_id: number;
11+
/**
12+
* Code to apply on accepted spans
13+
*/
14+
code_id: number;
15+
/**
16+
* Code to apply on rejected spans
17+
*/
18+
reject_code_id: number;
19+
/**
20+
* Suggested annotations to accept
21+
*/
22+
accept: Array<SdocSentencePair>;
23+
/**
24+
* Suggested annotations to reject
25+
*/
26+
reject: Array<SdocSentencePair>;
27+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
export type AnnoscalingResult = {
6+
/**
7+
* ID of the source document
8+
*/
9+
sdoc_id: number;
10+
/**
11+
* ID of the sentence within the document
12+
*/
13+
sentence_id: number;
14+
/**
15+
* Sentence text
16+
*/
17+
text: string;
18+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
export type AnnoscalingSuggest = {
6+
/**
7+
* Project to retrieve suggestions
8+
*/
9+
project_id: number;
10+
/**
11+
* Code to provide suggestions for
12+
*/
13+
code_id: number;
14+
/**
15+
* Code to use as opposing code
16+
*/
17+
reject_cide_id: number;
18+
/**
19+
* Number of suggestions to provide
20+
*/
21+
top_k: number;
22+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
export type SdocSentencePair = {
6+
sdoc_id: number;
7+
sentence: number;
8+
};

frontend/src/api/openapi/services/AnnoscalingService.ts

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,50 @@
22
/* istanbul ignore file */
33
/* tslint:disable */
44
/* eslint-disable */
5+
import type { AnnoscalingConfirmSuggest } from "../models/AnnoscalingConfirmSuggest";
6+
import type { AnnoscalingResult } from "../models/AnnoscalingResult";
7+
import type { AnnoscalingSuggest } from "../models/AnnoscalingSuggest";
58
import type { CancelablePromise } from "../core/CancelablePromise";
69
import { OpenAPI } from "../core/OpenAPI";
710
import { request as __request } from "../core/request";
811
export class AnnoscalingService {
912
/**
1013
* Suggest annotations
1114
* Suggest annotations
12-
* @returns string Successful Response
15+
* @returns AnnoscalingResult Successful Response
1316
* @throws ApiError
1417
*/
1518
public static suggest({
16-
projectId,
17-
codeId,
18-
topK,
19+
requestBody,
1920
}: {
20-
projectId: number;
21-
codeId: number;
22-
topK: number;
23-
}): CancelablePromise<Array<string>> {
21+
requestBody: AnnoscalingSuggest;
22+
}): CancelablePromise<Array<AnnoscalingResult>> {
2423
return __request(OpenAPI, {
2524
method: "POST",
2625
url: "/annoscaling/suggest",
27-
query: {
28-
project_id: projectId,
29-
code_id: codeId,
30-
top_k: topK,
26+
body: requestBody,
27+
mediaType: "application/json",
28+
errors: {
29+
422: `Validation Error`,
3130
},
31+
});
32+
}
33+
/**
34+
* Suggest annotations
35+
* Suggest annotations
36+
* @returns any Successful Response
37+
* @throws ApiError
38+
*/
39+
public static confirmSuggestions({
40+
requestBody,
41+
}: {
42+
requestBody: AnnoscalingConfirmSuggest;
43+
}): CancelablePromise<any> {
44+
return __request(OpenAPI, {
45+
method: "POST",
46+
url: "/annoscaling/confirm_suggestions",
47+
body: requestBody,
48+
mediaType: "application/json",
3249
errors: {
3350
422: `Validation Error`,
3451
},

0 commit comments

Comments
 (0)