Guest User

Untitled

a guest
Oct 28th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. // Note that this type definition it's not complete.
  2.  
  3. import BimServerApiPromise from 'BimServerApiPromise';
  4.  
  5. declare module 'BimServerClient' {
  6. type TranslateFN = (string) => string;
  7.  
  8. type InterfaceMapping = {
  9. ServiceInterface: "org.bimserver.ServiceInterface",
  10. NewServicesInterface: "org.bimserver.NewServicesInterface",
  11. AuthInterface: "org.bimserver.AuthInterface",
  12. OAuthInterface: "org.bimserver.OAuthInterface",
  13. SettingsInterface: "org.bimserver.SettingsInterface",
  14. AdminInterface: "org.bimserver.AdminInterface",
  15. PluginInterface: "org.bimserver.PluginInterface",
  16. MetaInterface: "org.bimserver.MetaInterface",
  17. LowLevelInterface: "org.bimserver.LowLevelInterface",
  18. NotificationRegistryInterface: "org.bimserver.NotificationRegistryInterface",
  19. };
  20.  
  21. type Notifier = {
  22. setInfo: (string) => void,
  23. setSuccess: (string) => void,
  24. setError: (string) => void,
  25. resetStatus: () => void,
  26. resetStatusQuick: () => void,
  27. clear: () => void;
  28. };
  29.  
  30. export default class BimServerClient {
  31. translateOverride: TranslateFN;
  32. token: string;
  33. baseUrl: string;
  34. interfaceMapping: InterfaceMapping;
  35. address: string;
  36. nofifier: Notifier;
  37.  
  38. websocketCalls: Map<any, any>;
  39.  
  40. constructor(baseUrl: string, notifier?: Notifier, translate?: TranslateFN);
  41. init(): BimServerApiPromise;
  42. addSubtypesToSchema(schema: any): void;
  43. getAllSubTypes(schema: any, typeName: string, callback: (x: string) => void);
  44. log(message: string, message2: string): void;
  45. translate(key: string): string;
  46. login(username: string, password: string, callback, errorCallback, options): void;
  47.  
  48.  
  49. }
  50. }
Add Comment
Please, Sign In to add comment