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 { SettingType } from "@rocket.chat/apps-engine/definition/settings"; import { GroupEndpoint } from "./GroupEndpoint"; import { GroupsEndpoint } from "./GroupsEndpoint"; import { UserEndpoint } from "./UserEndpoint"; import { UsersEndpoint } from "./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), ], }); configuration.settings.provideSetting({ id: "rc-user-id", type: SettingType.STRING, packageValue: "", required: true, public: false, i18nLabel: "Rocket.Chat User ID", }); configuration.settings.provideSetting({ id: "rc-token", type: SettingType.STRING, packageValue: "", required: true, public: false, i18nLabel: "Rocket.Chat Token", }); } // public async onSettingUpdated( // setting: ISetting, // configurationModify: IConfigurationModify, // read: IRead, // http: IHttp // ): Promise { // this.con // } }