35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import {
|
|
IAppAccessors,
|
|
IConfigurationExtend,
|
|
ILogger,
|
|
} from "@rocket.chat/apps-engine/definition/accessors";
|
|
import {
|
|
ApiSecurity,
|
|
ApiVisibility,
|
|
} from "@rocket.chat/apps-engine/definition/api";
|
|
import { App } from "@rocket.chat/apps-engine/definition/App";
|
|
import { IAppInfo } from "@rocket.chat/apps-engine/definition/metadata";
|
|
import { GroupEndpoint } from "./src/endpoints/GroupEndpoint";
|
|
import { GroupsEndpoint } from "./src/endpoints/GroupsEndpoint";
|
|
|
|
import { UserEndpoint } from "./src/endpoints/UserEndpoint";
|
|
import { UsersEndpoint } from "./src/endpoints/UsersEndpoint";
|
|
|
|
export class ScimApp extends App {
|
|
constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
|
|
super(info, logger, accessors);
|
|
}
|
|
|
|
public async extendConfiguration(configuration: IConfigurationExtend) {
|
|
configuration.api.provideApi({
|
|
visibility: ApiVisibility.PUBLIC,
|
|
security: ApiSecurity.UNSECURE,
|
|
endpoints: [
|
|
new UsersEndpoint(this),
|
|
new UserEndpoint(this),
|
|
new GroupsEndpoint(this),
|
|
new GroupEndpoint(this),
|
|
],
|
|
});
|
|
}
|
|
}
|