Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Note that this type definition it's not complete.
- import BimServerApiPromise from 'BimServerApiPromise';
- declare module 'BimServerClient' {
- type TranslateFN = (string) => string;
- type InterfaceMapping = {
- ServiceInterface: "org.bimserver.ServiceInterface",
- NewServicesInterface: "org.bimserver.NewServicesInterface",
- AuthInterface: "org.bimserver.AuthInterface",
- OAuthInterface: "org.bimserver.OAuthInterface",
- SettingsInterface: "org.bimserver.SettingsInterface",
- AdminInterface: "org.bimserver.AdminInterface",
- PluginInterface: "org.bimserver.PluginInterface",
- MetaInterface: "org.bimserver.MetaInterface",
- LowLevelInterface: "org.bimserver.LowLevelInterface",
- NotificationRegistryInterface: "org.bimserver.NotificationRegistryInterface",
- };
- type Notifier = {
- setInfo: (string) => void,
- setSuccess: (string) => void,
- setError: (string) => void,
- resetStatus: () => void,
- resetStatusQuick: () => void,
- clear: () => void;
- };
- export default class BimServerClient {
- translateOverride: TranslateFN;
- token: string;
- baseUrl: string;
- interfaceMapping: InterfaceMapping;
- address: string;
- nofifier: Notifier;
- websocketCalls: Map<any, any>;
- constructor(baseUrl: string, notifier?: Notifier, translate?: TranslateFN);
- init(): BimServerApiPromise;
- addSubtypesToSchema(schema: any): void;
- getAllSubTypes(schema: any, typeName: string, callback: (x: string) => void);
- log(message: string, message2: string): void;
- translate(key: string): string;
- login(username: string, password: string, callback, errorCallback, options): void;
- }
- }
Add Comment
Please, Sign In to add comment