diff --git a/app/definitions/rest/v1/e2e.ts b/app/definitions/rest/v1/e2e.ts new file mode 100644 index 000000000..4e41ef562 --- /dev/null +++ b/app/definitions/rest/v1/e2e.ts @@ -0,0 +1,5 @@ +export type E2eEndpoints = { + 'e2e.setUserPublicAndPrivateKeys': { + POST: (params: { public_key: string; private_key: string }) => void; + }; +}; diff --git a/app/definitions/rest/v1/index.ts b/app/definitions/rest/v1/index.ts index ae5f29262..83bb410d0 100644 --- a/app/definitions/rest/v1/index.ts +++ b/app/definitions/rest/v1/index.ts @@ -14,6 +14,7 @@ import { OauthCustomConfiguration } from './settings'; import { UserEndpoints } from './user'; import { UsersEndpoints } from './users'; import { TeamsEndpoints } from './teams'; +import { E2eEndpoints } from './e2e'; export type Endpoints = ChannelsEndpoints & ChatEndpoints & @@ -30,4 +31,5 @@ export type Endpoints = ChannelsEndpoints & OauthCustomConfiguration & UserEndpoints & UsersEndpoints & - TeamsEndpoints; + TeamsEndpoints & + E2eEndpoints; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 81558c204..0ccf22034 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -34,10 +34,8 @@ export const createChannel = ({ return sdk.post(type ? 'groups.create' : 'channels.create', params); }; -export const e2eSetUserPublicAndPrivateKeys = (public_key: string, private_key: string): any => +export const e2eSetUserPublicAndPrivateKeys = (public_key: string, private_key: string) => // RC 2.2.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post('e2e.setUserPublicAndPrivateKeys', { public_key, private_key }); export const e2eRequestSubscriptionKeys = (): any =>