Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
263 lines
5.6 KiB
TypeScript
263 lines
5.6 KiB
TypeScript
import type { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus';
|
|
import type { IApiEndpointMetadata } from '@rocket.chat/apps-engine/definition/api';
|
|
import type { IExternalComponent } from '@rocket.chat/apps-engine/definition/externalComponent';
|
|
import type { IPermission } from '@rocket.chat/apps-engine/definition/permissions/IPermission';
|
|
import type { ISetting } from '@rocket.chat/apps-engine/definition/settings';
|
|
import type { IUIActionButton } from '@rocket.chat/apps-engine/definition/ui';
|
|
import type {
|
|
AppCategory,
|
|
AppScreenshot,
|
|
App,
|
|
FeaturedAppsSection,
|
|
ILogItem,
|
|
AppRequestFilter,
|
|
AppRequest,
|
|
} from '@rocket.chat/core-typings';
|
|
import type * as UiKit from '@rocket.chat/ui-kit';
|
|
|
|
import type { AppLogsExportProps } from './appLogsExportProps';
|
|
import type { AppLogsProps } from './appLogsProps';
|
|
import type { PaginatedResult } from '../helpers/PaginatedResult';
|
|
|
|
export * from './appLogsExportProps';
|
|
export * from './appLogsProps';
|
|
|
|
export type AppsEndpoints = {
|
|
'/apps/count': {
|
|
GET: () => { totalMarketplaceEnabled: number; totalPrivateEnabled: number; maxMarketplaceApps: number; maxPrivateApps: number };
|
|
};
|
|
|
|
'/apps/externalComponents': {
|
|
GET: () => { externalComponents: IExternalComponent[] };
|
|
};
|
|
|
|
'/apps/incompatibleModal': {
|
|
GET: (params: { appId: string; appVersion: string; action: string }) => { url: string };
|
|
};
|
|
|
|
'/apps/:id': {
|
|
GET:
|
|
| ((params: { marketplace?: 'true' | 'false'; version?: string; appVersion?: string; update?: 'true' | 'false' }) => {
|
|
app: App;
|
|
})
|
|
| (() => {
|
|
app: App;
|
|
});
|
|
DELETE: () => {
|
|
app: App;
|
|
success: boolean;
|
|
};
|
|
POST: (params: { marketplace: boolean; version: string; permissionsGranted?: IPermission[]; appId: string; url?: string }) => {
|
|
app: App;
|
|
};
|
|
};
|
|
|
|
'/apps/actionButtons': {
|
|
GET: () => IUIActionButton[];
|
|
};
|
|
|
|
'/apps/languages': {
|
|
GET: () => {
|
|
apps: {
|
|
id: string;
|
|
languages: { [language: string]: { [key: string]: string } };
|
|
}[];
|
|
};
|
|
};
|
|
|
|
'/apps/logs': {
|
|
GET: (params: AppLogsProps) => PaginatedResult<{
|
|
logs: ILogItem[];
|
|
}>;
|
|
};
|
|
|
|
'/apps/public/:appId/get-sidebar-icon': {
|
|
GET: (params: { icon: string }) => unknown;
|
|
};
|
|
|
|
'/apps/:id/settings': {
|
|
GET: () => {
|
|
settings: ISetting[];
|
|
};
|
|
POST: (params: { settings: ISetting[] }) => { updated: ISetting[]; success: boolean };
|
|
};
|
|
|
|
'/apps/:id/settings/:settingId': {
|
|
GET: () => {
|
|
setting: ISetting;
|
|
};
|
|
POST: (params: { setting: ISetting }) => { success: boolean };
|
|
};
|
|
|
|
'/apps/:id/screenshots': {
|
|
GET: () => {
|
|
screenshots: AppScreenshot[];
|
|
};
|
|
};
|
|
|
|
'/apps/:id/languages': {
|
|
GET: () => {
|
|
languages: { [language: string]: { [key: string]: string } };
|
|
};
|
|
};
|
|
|
|
'/apps/:id/logs': {
|
|
GET: (params: Omit<AppLogsProps, 'appId'>) => PaginatedResult<{
|
|
logs: ILogItem[];
|
|
}>;
|
|
};
|
|
|
|
'/apps/:id/logs/distinctValues': {
|
|
GET: () => { success: boolean; instanceIds: string[]; methods: string[] };
|
|
};
|
|
|
|
'/apps/:id/export-logs': {
|
|
GET: (params: AppLogsExportProps) => Buffer;
|
|
};
|
|
|
|
'/apps/:id/apis': {
|
|
GET: () => {
|
|
apis: IApiEndpointMetadata[];
|
|
};
|
|
};
|
|
|
|
'/apps/bundles/:id/apps': {
|
|
GET: () => {
|
|
apps: App[];
|
|
};
|
|
};
|
|
|
|
'/apps/:id/sync': {
|
|
POST: () => {
|
|
app: App;
|
|
};
|
|
};
|
|
|
|
'/apps/:id/status': {
|
|
GET: () => {
|
|
status: string;
|
|
clusterStatus: App['clusterStatus'];
|
|
};
|
|
POST: (params: { status: AppStatus }) => {
|
|
status: AppStatus;
|
|
};
|
|
};
|
|
|
|
'/apps/:id/versions': {
|
|
GET: () => {
|
|
apps: App[];
|
|
};
|
|
};
|
|
|
|
'/apps/:id/icon': {
|
|
GET: () => {
|
|
statusCode: 200;
|
|
headers: {
|
|
'Content-Length': number;
|
|
'Content-Type': string;
|
|
};
|
|
body: Buffer;
|
|
};
|
|
};
|
|
|
|
'/apps/featured-apps': {
|
|
GET: () => {
|
|
sections: FeaturedAppsSection[];
|
|
};
|
|
};
|
|
|
|
'/apps/marketplace': {
|
|
GET: (params: {
|
|
purchaseType?: 'buy' | 'subscription';
|
|
version?: string;
|
|
appId?: string;
|
|
details?: 'true' | 'false';
|
|
isAdminUser?: string;
|
|
}) => App[];
|
|
};
|
|
|
|
'/apps/categories': {
|
|
GET: () => AppCategory[];
|
|
};
|
|
|
|
'/apps/buildExternalUrl': {
|
|
GET: (params: { purchaseType?: 'buy' | 'subscription'; appId?: string; details?: 'true' | 'false' }) => {
|
|
url: string;
|
|
};
|
|
};
|
|
|
|
'/apps/installed': {
|
|
GET: (params: { includeClusterStatus?: 'true' | 'false' }) => { success: true; apps: App[] } | { success: false; error: string };
|
|
};
|
|
|
|
'/apps/buildExternalAppRequest': {
|
|
GET: (params: { appId?: string }) => {
|
|
url: string;
|
|
};
|
|
};
|
|
|
|
'/apps/app-request': {
|
|
GET: (params: { appId: string; q?: AppRequestFilter; sort?: string; limit?: number; offset?: number }) => {
|
|
data: AppRequest[] | null;
|
|
meta: {
|
|
limit: 25 | 50 | 100;
|
|
offset: number;
|
|
sort: string;
|
|
filter: string;
|
|
total: number;
|
|
};
|
|
};
|
|
};
|
|
|
|
'/apps/app-request/stats': {
|
|
GET: () => {
|
|
data: {
|
|
totalSeen: number;
|
|
totalUnseen: number;
|
|
};
|
|
};
|
|
};
|
|
|
|
'/apps/app-request/markAsSeen': {
|
|
POST: (params: { unseenRequests: Array<string> }) => { succes: boolean };
|
|
};
|
|
|
|
'/apps/notify-admins': {
|
|
POST: (params: { appId: string; appName: string; appVersion: string; message: string }) => void;
|
|
};
|
|
|
|
'/apps/externalComponentEvent': {
|
|
POST: (params: { externalComponent: string; event: 'IPostExternalComponentOpened' | 'IPostExternalComponentClosed' }) => {
|
|
result: any;
|
|
};
|
|
};
|
|
|
|
'/apps': {
|
|
POST: {
|
|
(
|
|
params:
|
|
| {
|
|
appId: string;
|
|
marketplace: boolean;
|
|
version: string;
|
|
permissionsGranted?: IPermission[];
|
|
url?: string;
|
|
}
|
|
| { url: string },
|
|
):
|
|
| {
|
|
app: App;
|
|
}
|
|
| {
|
|
buff: {
|
|
data: ArrayLike<number>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
'/apps/ui.interaction/:id': {
|
|
POST: (params: UiKit.UserInteraction) => UiKit.ServerInteraction | Record<string, never>;
|
|
};
|
|
};
|