Unverified Commit ee336a84 authored by Reinaldo Neto's avatar Reinaldo Neto Committed by GitHub
Browse files

Chore: Migrate REST API - getDirectory to Typescript (#3898)

parent 2cc4b9c1
import { IServerRoom } from '../../IRoom';
import { PaginatedResult } from '../helpers/PaginatedResult';
export type DirectoryEndpoint = {
directory: {
GET: (params: {
query: { [key: string]: string };
count: number;
offset: number;
sort: { [key: string]: number };
}) => PaginatedResult<{ result: IServerRoom[] }>;
};
};
......@@ -17,6 +17,7 @@ import { E2eEndpoints } from './e2e';
import { SubscriptionsEndpoints } from './subscriptions';
import { VideoConferenceEndpoints } from './videoConference';
import { CommandsEndpoints } from './commands';
import { DirectoryEndpoint } from './directory';
export type Endpoints = ChannelsEndpoints &
ChatEndpoints &
......@@ -36,4 +37,5 @@ export type Endpoints = ChannelsEndpoints &
E2eEndpoints &
SubscriptionsEndpoints &
VideoConferenceEndpoints &
CommandsEndpoints;
CommandsEndpoints &
DirectoryEndpoint;
......@@ -713,10 +713,18 @@ export const executeCommandPreview = (
tmid
});
export const getDirectory = ({ query, count, offset, sort }: { query: any; count: number; offset: number; sort: any }): any =>
export const getDirectory = ({
query,
count,
offset,
sort
}: {
query: { [key: string]: string };
count: number;
offset: number;
sort: { [key: string]: number };
}) =>
// RC 1.0
// TODO: missing definitions from server
// @ts-ignore
sdk.get('directory', {
query,
count,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment