private/apigen/example: Fix client TS generated file
We introduced some changes in 882c9d64e4
and one reviewer spot an issue which was fixed, but I forgot to
regenerate the files and the generated Typescript client got stale.
This commit regenerate the example code, so the generated code is align
with the current generator version.
Change-Id: Idc023adc9c6e230578f9e77e492126355b006203
This commit is contained in:
parent
febd2091df
commit
74757ffc1d
@ -80,7 +80,7 @@ export class DocumentsHttpApiV0 {
|
|||||||
return response.json().then((body) => body as DocsGetResponse);
|
return response.json().then((body) => body as DocsGetResponse);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getOne(path: string): Promise<Document> {
|
public async getOne(path: string): Promise<Document> {
|
||||||
@ -90,7 +90,7 @@ export class DocumentsHttpApiV0 {
|
|||||||
return response.json().then((body) => body as Document);
|
return response.json().then((body) => body as Document);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getTag(path: string, tagName: string): Promise<string[]> {
|
public async getTag(path: string, tagName: string): Promise<string[]> {
|
||||||
@ -100,7 +100,7 @@ export class DocumentsHttpApiV0 {
|
|||||||
return response.json().then((body) => body as string[]);
|
return response.json().then((body) => body as string[]);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getVersions(path: string): Promise<Version[]> {
|
public async getVersions(path: string): Promise<Version[]> {
|
||||||
@ -110,7 +110,7 @@ export class DocumentsHttpApiV0 {
|
|||||||
return response.json().then((body) => body as Version[]);
|
return response.json().then((body) => body as Version[]);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateContent(request: DocsUpdateContentRequest, path: string, id: UUID, date: Time): Promise<DocsUpdateContentResponse> {
|
public async updateContent(request: DocsUpdateContentRequest, path: string, id: UUID, date: Time): Promise<DocsUpdateContentResponse> {
|
||||||
@ -123,7 +123,7 @@ export class DocumentsHttpApiV0 {
|
|||||||
return response.json().then((body) => body as DocsUpdateContentResponse);
|
return response.json().then((body) => body as DocsUpdateContentResponse);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ export class UsersHttpApiV0 {
|
|||||||
return response.json().then((body) => body as UsersGetResponse);
|
return response.json().then((body) => body as UsersGetResponse);
|
||||||
}
|
}
|
||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new APIError(response.status, err.error);
|
throw new APIError(err.error,response.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async create(request: UsersCreateRequest): Promise<void> {
|
public async create(request: UsersCreateRequest): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user