53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
import * as data from '../data/index.js';
|
|
import * as plugins from '../loint-reception.plugins.js';
|
|
|
|
// Get all global apps
|
|
export interface IReq_GetGlobalApps
|
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
IReq_GetGlobalApps
|
|
> {
|
|
method: 'getGlobalApps';
|
|
request: {
|
|
jwt: string;
|
|
};
|
|
response: {
|
|
apps: data.IGlobalApp[];
|
|
};
|
|
}
|
|
|
|
// Get app connections for an organization
|
|
export interface IReq_GetAppConnections
|
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
IReq_GetAppConnections
|
|
> {
|
|
method: 'getAppConnections';
|
|
request: {
|
|
jwt: string;
|
|
organizationId: string;
|
|
};
|
|
response: {
|
|
connections: data.IAppConnection[];
|
|
};
|
|
}
|
|
|
|
// Connect/disconnect an app for an organization
|
|
export interface IReq_ToggleAppConnection
|
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
IReq_ToggleAppConnection
|
|
> {
|
|
method: 'toggleAppConnection';
|
|
request: {
|
|
jwt: string;
|
|
organizationId: string;
|
|
appId: string;
|
|
action: 'connect' | 'disconnect';
|
|
};
|
|
response: {
|
|
success: boolean;
|
|
connection?: data.IAppConnection;
|
|
};
|
|
}
|