Chore: Migrate REST API - getDirectory to Typescript (#3898)
This commit is contained in:
parent
2cc4b9c1ba
commit
ee336a84a3
|
@ -0,0 +1,13 @@
|
||||||
|
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 { SubscriptionsEndpoints } from './subscriptions';
|
||||||
import { VideoConferenceEndpoints } from './videoConference';
|
import { VideoConferenceEndpoints } from './videoConference';
|
||||||
import { CommandsEndpoints } from './commands';
|
import { CommandsEndpoints } from './commands';
|
||||||
|
import { DirectoryEndpoint } from './directory';
|
||||||
|
|
||||||
export type Endpoints = ChannelsEndpoints &
|
export type Endpoints = ChannelsEndpoints &
|
||||||
ChatEndpoints &
|
ChatEndpoints &
|
||||||
|
@ -36,4 +37,5 @@ export type Endpoints = ChannelsEndpoints &
|
||||||
E2eEndpoints &
|
E2eEndpoints &
|
||||||
SubscriptionsEndpoints &
|
SubscriptionsEndpoints &
|
||||||
VideoConferenceEndpoints &
|
VideoConferenceEndpoints &
|
||||||
CommandsEndpoints;
|
CommandsEndpoints &
|
||||||
|
DirectoryEndpoint;
|
||||||
|
|
|
@ -713,10 +713,18 @@ export const executeCommandPreview = (
|
||||||
tmid
|
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
|
// RC 1.0
|
||||||
// TODO: missing definitions from server
|
|
||||||
// @ts-ignore
|
|
||||||
sdk.get('directory', {
|
sdk.get('directory', {
|
||||||
query,
|
query,
|
||||||
count,
|
count,
|
||||||
|
|
Loading…
Reference in New Issue