diff --git a/src/axios.ts b/src/axios.ts index 71a64f9..da709e7 100644 --- a/src/axios.ts +++ b/src/axios.ts @@ -74,6 +74,7 @@ export interface MultinetAxiosInstance extends AxiosInstance { renameSession(workspace: string, sessionId: number, type: 'network' | 'table', name: string): AxiosPromise; getSession(workspace: string, sessionId: number, type: 'network' | 'table'): AxiosPromise; generateAltText(verbosity: string, level: number, explain: string, data: object, title?: string): AxiosPromise; + networkBuildRequests(workspace: string): AxiosPromise; } export function multinetAxiosInstance(config: AxiosRequestConfig): MultinetAxiosInstance { @@ -287,5 +288,9 @@ export function multinetAxiosInstance(config: AxiosRequestConfig): MultinetAxios return this.post(`alttxt/`, formData); }; + Proto.networkBuildRequests = function(workspace: string): AxiosPromise { + return this.get(`workspaces/${workspace}/network_build_requests/`); + } + return axiosInstance as MultinetAxiosInstance; } diff --git a/src/index.ts b/src/index.ts index b287003..7c7ad87 100644 --- a/src/index.ts +++ b/src/index.ts @@ -288,6 +288,11 @@ class MultinetAPI { public async generateAltText(verbosity: string, level: number, explain: string, data: object, title?: string): Promise { return (await this.axios.generateAltText(verbosity, level, explain, data, title)).data; } + + public async networkBuildRequests(workspace: string): Promise { + return (await this.axios.networkBuildRequests(workspace)).data; + } + } export function multinetApi(baseURL: string): MultinetAPI {