Advertisement
Guest User

Untitled

a guest
Dec 28th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. declare module moonbeam {
  2.  
  3. export interface IApiResponse<T> {
  4. success: boolean;
  5. data?: T;
  6. error?: IApiError;
  7. }
  8.  
  9. export interface IApiError {
  10. code: number;
  11. message: string;
  12. stackTrace?: string[];
  13. }
  14.  
  15. export interface INavBlock {
  16. name: string,
  17. navSections: INavSection[]
  18. }
  19.  
  20. export interface INavSection {
  21. sectionName?: string;
  22. navs: ISidebarRoute[];
  23. }
  24.  
  25. export interface INav {
  26. location: string;
  27. title: string;
  28. icon: string;
  29. isSelected: boolean;
  30. }
  31.  
  32. export interface ISidebarRoute {
  33. statePrefix: string;
  34. state: string;
  35. title: string;
  36. icon?: string;
  37. params?: any;
  38. subStates?: Array<ISidebarRoute>;
  39. }
  40.  
  41. export interface IDataSelectorStateParams extends angular.ui.IStateParamsService {
  42. folderId?: string;
  43. domainId?: string;
  44. appId?: string;
  45. journeyId?: string;
  46. discoveryAuditId?: string;
  47. runId?: string;
  48. suiteId?: string;
  49. testId?: string;
  50. }
  51.  
  52. export interface IPageScope extends angular.IScope {
  53. pageTitle: IPageTitle;
  54. breadcrumbs: IBreadcrumb[];
  55. sidebarNav: INav[];
  56. }
  57.  
  58. export interface IPageTitle {
  59. title: string;
  60. icon?: string;
  61. }
  62.  
  63. export interface IBreadcrumb {
  64. title: string;
  65. url: string;
  66. }
  67.  
  68. export interface ICredentials {
  69. username: string;
  70. password: string;
  71. }
  72.  
  73. export interface ITokenInformation {
  74. accessToken: string;
  75. userId: number;
  76. expires: number;
  77. credentialsExpired?: boolean;
  78. }
  79.  
  80. export interface IUserBase {
  81. email: string;
  82. username: string;
  83. timezone: string;
  84. permissions: number;
  85. lastName: string;
  86. firstName: string;
  87. id: number;
  88. }
  89.  
  90. export interface IUser {
  91. accountId: number;
  92. lastLogin: Date;
  93. email: string;
  94. username: string;
  95. timezone: string;
  96. permissions: string;
  97. lastName: string;
  98. firstName: string;
  99. id: number;
  100. updated: Date;
  101. created: Date;
  102. }
  103.  
  104. export class Account {
  105. id: number;
  106. accountType: number;
  107. name: string;
  108. usersUsed: number;
  109. maxUsers: number;
  110. webJourneysUsed: number;
  111. maxWebJourneys: number;
  112. auditsUsed: number;
  113. maxAudits: number;
  114. strongPasswordPolicy: boolean;
  115. maxApps: number;
  116. }
  117.  
  118. export interface IRoute {
  119. url: string;
  120. state: string;
  121. title: string;
  122. icon?: string;
  123. controller: string;
  124. templateUrl?: string;
  125. template?: string;
  126. parent?: string;
  127. children?: IRoute[];
  128. controllerAs?: string;
  129. abstract?: boolean;
  130. other?: any;
  131. params?: any;
  132. }
  133.  
  134. export interface IAbstractRoute {
  135. url?: string;
  136. state: string;
  137. title: string;
  138. icon?: string;
  139. controller?: string;
  140. templateUrl?: string;
  141. template?: string;
  142. children?: IRoute[];
  143. controllerAs?: string;
  144. abstract?: boolean;
  145. }
  146.  
  147. export interface IViewRoute {
  148. url: string;
  149. state: string;
  150. parent?: string;
  151. title: string;
  152. views: any;
  153. icon?: string;
  154. params?: any;
  155. }
  156.  
  157. export interface IDate {
  158. now: () => number;
  159. }
  160.  
  161. export interface IValueLabel<TValue, TLabel> {
  162. value: TValue,
  163. label: TLabel
  164. }
  165.  
  166. export interface IKeyValue<TKey, TValue> {
  167. key: TKey,
  168. value: TValue
  169. }
  170.  
  171. export interface IDiscoveryAuditDashboardScope extends IPageScope {
  172. dashboardTabs: IDiscoveryAuditDashboardTab[];
  173. dashboardSubtabs: IDiscoveryAuditDashboardTab[];
  174. folder: any;
  175. domain: IDomain;
  176. discoveryAudit: IAudit;
  177. }
  178.  
  179. export interface IJourneyReportTopBarController {
  180. testName: string;
  181. date: string;
  182. currentStateService: ICurrentStateService;
  183. runNow?(): void;
  184. editJourney(): void;
  185. }
  186.  
  187. export interface ISearchResult {
  188. folders: ISearchFolder[];
  189. domains: ISearchAppDomain[];
  190. apps: ISearchAppDomain[];
  191. audits: ISearchJourney[];
  192. webJourneys: ISearchJourney[];
  193. appJourneys: ISearchAppJourney[];
  194. }
  195.  
  196. export interface ISearchFolder {
  197. id: number;
  198. name: string;
  199. }
  200.  
  201. export interface ISearchAppDomain {
  202. id: number;
  203. name: string;
  204. folderId: number;
  205. folderName: string;
  206. }
  207.  
  208. export interface ISearchJourney {
  209. id: number;
  210. name: string;
  211. folderId: number;
  212. folderName: string;
  213. domainName: string;
  214. domainId: number;
  215. runId: number;
  216. }
  217.  
  218. export interface ISearchAppJourney {
  219. id: number;
  220. name: string;
  221. folderId: number;
  222. folderName: string;
  223. appName: string;
  224. appId: number;
  225. testName: string;
  226. testId: number;
  227. runId: number;
  228. }
  229.  
  230. export interface IModalForm {
  231. modalButtons: Array<ButtonSet>;
  232. hideModal(): void;
  233. }
  234.  
  235. export interface IModalInfo {
  236. title: string
  237. controller: string
  238. templateUrl: string
  239. prepareData?: (data) => any
  240. }
  241. }
  242.  
  243. declare namespace angular.local.storage {
  244. interface ILocalStorageServiceProvider {
  245. setDefaultToCookie(enable: boolean): ILocalStorageServiceProvider
  246. }
  247. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement