You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

types.d.ts 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. declare namespace T {
  21. export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
  22. // Type ordered alphabetically to prevent merge conflicts
  23. export interface AlmApplication extends IdentityProvider {
  24. installationUrl: string;
  25. }
  26. export interface AlmOrganization extends OrganizationBase {
  27. almUrl: string;
  28. key: string;
  29. personal: boolean;
  30. privateRepos: number;
  31. publicRepos: number;
  32. }
  33. export interface AlmRepository {
  34. label: string;
  35. installationKey: string;
  36. linkedProjectKey?: string;
  37. linkedProjectName?: string;
  38. private?: boolean;
  39. }
  40. export interface AlmUnboundApplication {
  41. installationId: string;
  42. key: string;
  43. name: string;
  44. }
  45. export interface Analysis {
  46. buildString?: string;
  47. date: string;
  48. events: AnalysisEvent[];
  49. key: string;
  50. manualNewCodePeriodBaseline?: boolean;
  51. projectVersion?: string;
  52. }
  53. export interface AnalysisEvent {
  54. category: string;
  55. description?: string;
  56. key: string;
  57. name: string;
  58. qualityGate?: {
  59. failing: Array<{ branch: string; key: string; name: string }>;
  60. status: string;
  61. stillFailing: boolean;
  62. };
  63. definitionChange?: {
  64. projects: Array<{
  65. branch?: string;
  66. changeType: string;
  67. key: string;
  68. name: string;
  69. newBranch?: string;
  70. oldBranch?: string;
  71. }>;
  72. };
  73. }
  74. export interface AppState {
  75. adminPages?: Extension[];
  76. authenticationError?: boolean;
  77. authorizationError?: boolean;
  78. branchesEnabled?: boolean;
  79. canAdmin?: boolean;
  80. defaultOrganization: string;
  81. edition: EditionKey;
  82. globalPages?: Extension[];
  83. organizationsEnabled?: boolean;
  84. productionDatabase: boolean;
  85. qualifiers: string[];
  86. settings: { [key: string]: string };
  87. standalone?: boolean;
  88. version: string;
  89. }
  90. export interface Branch {
  91. analysisDate?: string;
  92. isMain: boolean;
  93. name: string;
  94. status?: { qualityGateStatus: string };
  95. }
  96. export type BranchLike = Branch | PullRequest;
  97. export type BranchParameters = { branch?: string } | { pullRequest?: string };
  98. export type BranchType = 'LONG' | 'SHORT';
  99. export interface Breadcrumb {
  100. key: string;
  101. name: string;
  102. qualifier: string;
  103. }
  104. export interface Component extends LightComponent {
  105. alm?: { key: string; url: string };
  106. analysisDate?: string;
  107. breadcrumbs: Breadcrumb[];
  108. configuration?: ComponentConfiguration;
  109. description?: string;
  110. extensions?: Extension[];
  111. isFavorite?: boolean;
  112. leakPeriodDate?: string;
  113. name: string;
  114. path?: string;
  115. refKey?: string;
  116. qualityProfiles?: ComponentQualityProfile[];
  117. qualityGate?: { isDefault?: boolean; key: string; name: string };
  118. tags?: string[];
  119. version?: string;
  120. visibility?: Visibility;
  121. }
  122. interface ComponentConfiguration {
  123. canApplyPermissionTemplate?: boolean;
  124. canUpdateProjectVisibilityToPrivate?: boolean;
  125. extensions?: Extension[];
  126. showBackgroundTasks?: boolean;
  127. showHistory?: boolean;
  128. showLinks?: boolean;
  129. showManualMeasures?: boolean;
  130. showQualityGates?: boolean;
  131. showQualityProfiles?: boolean;
  132. showPermissions?: boolean;
  133. showSettings?: boolean;
  134. showUpdateKey?: boolean;
  135. }
  136. export interface ComponentQualityProfile {
  137. deleted?: boolean;
  138. key: string;
  139. language: string;
  140. name: string;
  141. }
  142. interface ComponentMeasureIntern {
  143. branch?: string;
  144. description?: string;
  145. isFavorite?: boolean;
  146. isRecentlyBrowsed?: boolean;
  147. key: string;
  148. match?: string;
  149. name: string;
  150. organization?: string;
  151. path?: string;
  152. project?: string;
  153. qualifier: string;
  154. refKey?: string;
  155. }
  156. export interface ComponentMeasure extends ComponentMeasureIntern {
  157. measures?: Measure[];
  158. }
  159. export interface ComponentMeasureEnhanced extends ComponentMeasureIntern {
  160. value?: string;
  161. leak?: string;
  162. measures: MeasureEnhanced[];
  163. }
  164. export interface Condition {
  165. error: string;
  166. id: number;
  167. metric: string;
  168. op?: string;
  169. }
  170. export interface CoveredFile {
  171. key: string;
  172. longName: string;
  173. coveredLines: number;
  174. }
  175. export interface Coupon {
  176. billing?: {
  177. address?: string;
  178. country?: string;
  179. email?: string;
  180. name?: string;
  181. use?: string;
  182. };
  183. maxNcloc: number;
  184. planActiveUntil: string;
  185. }
  186. export interface CurrentUser {
  187. isLoggedIn: boolean;
  188. permissions?: { global: string[] };
  189. showOnboardingTutorial?: boolean;
  190. }
  191. export interface CurrentUserSetting {
  192. key: CurrentUserSettingNames;
  193. value: string;
  194. }
  195. type CurrentUserSettingNames = 'notifications.optOut' | 'notifications.readDate';
  196. export interface CustomMeasure {
  197. createdAt?: string;
  198. description?: string;
  199. id: string;
  200. metric: {
  201. key: string;
  202. name: string;
  203. domain?: string;
  204. type: string;
  205. };
  206. projectKey: string;
  207. pending?: boolean;
  208. user: {
  209. active?: boolean;
  210. email?: string;
  211. login: string;
  212. name: string;
  213. };
  214. value: string;
  215. updatedAt?: string;
  216. }
  217. export interface Duplication {
  218. blocks: DuplicationBlock[];
  219. }
  220. export interface DuplicationBlock {
  221. _ref: string;
  222. from: number;
  223. size: number;
  224. }
  225. export interface DuplicatedFile {
  226. key: string;
  227. name: string;
  228. project: string;
  229. projectName: string;
  230. subProject?: string;
  231. subProjectName?: string;
  232. }
  233. export type EditionKey = 'community' | 'developer' | 'enterprise' | 'datacenter';
  234. export interface Extension {
  235. key: string;
  236. name: string;
  237. }
  238. export interface FacetValue<T = string> {
  239. count: number;
  240. val: T;
  241. }
  242. export interface FlowLocation {
  243. component: string;
  244. componentName?: string;
  245. msg?: string;
  246. textRange: TextRange;
  247. }
  248. export interface Group {
  249. default?: boolean;
  250. description?: string;
  251. id: number;
  252. membersCount: number;
  253. name: string;
  254. }
  255. export type HomePage =
  256. | { type: 'APPLICATION'; branch: string | undefined; component: string }
  257. | { type: 'ISSUES' }
  258. | { type: 'MY_ISSUES' }
  259. | { type: 'MY_PROJECTS' }
  260. | { type: 'ORGANIZATION'; organization: string }
  261. | { type: 'PORTFOLIO'; component: string }
  262. | { type: 'PORTFOLIOS' }
  263. | { type: 'PROJECT'; branch: string | undefined; component: string }
  264. | { type: 'PROJECTS' };
  265. export type HomePageType =
  266. | 'APPLICATION'
  267. | 'ISSUES'
  268. | 'MY_ISSUES'
  269. | 'MY_PROJECTS'
  270. | 'ORGANIZATION'
  271. | 'PORTFOLIO'
  272. | 'PORTFOLIOS'
  273. | 'PROJECT'
  274. | 'PROJECTS';
  275. export interface IdentityProvider {
  276. backgroundColor: string;
  277. helpMessage?: string;
  278. iconPath: string;
  279. key: string;
  280. name: string;
  281. }
  282. export interface SecurityHotspot {
  283. activeRules: number;
  284. category?: string;
  285. cwe?: string;
  286. distribution?: Array<SecurityHotspot>;
  287. openSecurityHotspots: number;
  288. toReviewSecurityHotspots: number;
  289. totalRules: number;
  290. vulnerabilities: number;
  291. vulnerabilityRating?: number;
  292. wontFixSecurityHotspots: number;
  293. }
  294. export interface Issue {
  295. actions: string[];
  296. assignee?: string;
  297. assigneeActive?: string;
  298. assigneeAvatar?: string;
  299. assigneeLogin?: string;
  300. assigneeName?: string;
  301. author?: string;
  302. branch?: string;
  303. comments?: IssueComment[];
  304. component: string;
  305. componentLongName: string;
  306. componentQualifier: string;
  307. componentUuid: string;
  308. creationDate: string;
  309. effort?: string;
  310. externalRuleEngine?: string;
  311. fromExternalRule?: boolean;
  312. key: string;
  313. flows: FlowLocation[][];
  314. fromHotspot: boolean;
  315. line?: number;
  316. message: string;
  317. organization: string;
  318. project: string;
  319. projectName: string;
  320. projectOrganization: string;
  321. projectKey: string;
  322. pullRequest?: string;
  323. resolution?: string;
  324. rule: string;
  325. ruleName: string;
  326. secondaryLocations: FlowLocation[];
  327. severity: string;
  328. status: string;
  329. subProject?: string;
  330. subProjectName?: string;
  331. subProjectUuid?: string;
  332. tags?: string[];
  333. textRange?: TextRange;
  334. transitions: string[];
  335. type: IssueType;
  336. }
  337. export interface IssueComment {
  338. author?: string;
  339. authorActive?: boolean;
  340. authorAvatar?: string;
  341. authorLogin?: string;
  342. authorName?: string;
  343. createdAt: string;
  344. htmlText: string;
  345. key: string;
  346. markdown: string;
  347. updatable: boolean;
  348. }
  349. export type IssueType = 'BUG' | 'VULNERABILITY' | 'CODE_SMELL' | 'SECURITY_HOTSPOT';
  350. export interface Language {
  351. key: string;
  352. name: string;
  353. }
  354. export interface Languages {
  355. [key: string]: Language;
  356. }
  357. export interface LightComponent {
  358. key: string;
  359. organization: string;
  360. qualifier: string;
  361. }
  362. export interface LinearIssueLocation {
  363. from: number;
  364. index?: number;
  365. line: number;
  366. startLine?: number;
  367. to: number;
  368. }
  369. export interface LoggedInUser extends CurrentUser {
  370. avatar?: string;
  371. email?: string;
  372. externalIdentity?: string;
  373. externalProvider?: string;
  374. groups: string[];
  375. homepage?: HomePage;
  376. isLoggedIn: true;
  377. local?: boolean;
  378. login: string;
  379. name: string;
  380. personalOrganization?: string;
  381. scmAccounts: string[];
  382. settings?: CurrentUserSetting[];
  383. }
  384. export interface LongLivingBranch extends Branch {
  385. isMain: false;
  386. type: 'LONG';
  387. }
  388. export interface MainBranch extends Branch {
  389. isMain: true;
  390. }
  391. export interface Measure extends MeasureIntern {
  392. metric: string;
  393. }
  394. export interface MeasureEnhanced extends MeasureIntern {
  395. metric: Metric;
  396. leak?: string;
  397. }
  398. interface MeasureIntern {
  399. bestValue?: boolean;
  400. periods?: PeriodMeasure[];
  401. value?: string;
  402. }
  403. export interface Metric {
  404. bestValue?: string;
  405. custom?: boolean;
  406. decimalScale?: number;
  407. description?: string;
  408. direction?: number;
  409. domain?: string;
  410. hidden?: boolean;
  411. higherValuesAreBetter?: boolean;
  412. id: string;
  413. key: string;
  414. name: string;
  415. qualitative?: boolean;
  416. type: string;
  417. worstValue?: string;
  418. }
  419. export interface MyProject {
  420. description?: string;
  421. key: string;
  422. lastAnalysisDate?: string;
  423. links: Array<{
  424. name: string;
  425. type: string;
  426. href: string;
  427. }>;
  428. name: string;
  429. qualityGate?: string;
  430. }
  431. export interface Notification {
  432. channel: string;
  433. organization?: string;
  434. project?: string;
  435. projectName?: string;
  436. type: string;
  437. }
  438. export interface OrganizationActions {
  439. admin?: boolean;
  440. delete?: boolean;
  441. provision?: boolean;
  442. executeAnalysis?: boolean;
  443. }
  444. export interface Organization extends OrganizationBase {
  445. actions?: OrganizationActions;
  446. alm?: { key: string; membersSync: boolean; url: string };
  447. adminPages?: Extension[];
  448. canUpdateProjectsVisibilityToPrivate?: boolean;
  449. guarded?: boolean;
  450. isDefault?: boolean;
  451. key: string;
  452. pages?: Extension[];
  453. projectVisibility?: Visibility;
  454. subscription?: OrganizationSubscription;
  455. }
  456. export interface OrganizationBase {
  457. avatar?: string;
  458. description?: string;
  459. key?: string;
  460. name: string;
  461. url?: string;
  462. }
  463. export interface OrganizationMember {
  464. login: string;
  465. name: string;
  466. avatar?: string;
  467. groupCount?: number;
  468. }
  469. export type OrganizationSubscription = 'FREE' | 'PAID' | 'SONARQUBE';
  470. export interface Paging {
  471. pageIndex: number;
  472. pageSize: number;
  473. total: number;
  474. }
  475. export interface Period {
  476. date: string;
  477. index: number;
  478. mode: PeriodMode;
  479. modeParam?: string;
  480. parameter?: string;
  481. }
  482. export interface PeriodMeasure {
  483. bestValue?: boolean;
  484. index: number;
  485. value: string;
  486. }
  487. export type PeriodMode =
  488. | 'days'
  489. | 'date'
  490. | 'version'
  491. | 'previous_analysis'
  492. | 'previous_version'
  493. | 'manual_baseline';
  494. export interface Permission {
  495. description: string;
  496. key: string;
  497. name: string;
  498. }
  499. export interface PermissionDefinition {
  500. key: string;
  501. name: string;
  502. description: string;
  503. }
  504. export type PermissionDefinitions = Array<PermissionDefinition | PermissionDefinitionGroup>;
  505. export interface PermissionDefinitionGroup {
  506. category: string;
  507. permissions: PermissionDefinition[];
  508. }
  509. export interface PermissionGroup {
  510. description?: string;
  511. id?: string;
  512. name: string;
  513. permissions: string[];
  514. }
  515. export interface PermissionUser {
  516. avatar?: string;
  517. email?: string;
  518. login: string;
  519. name: string;
  520. permissions: string[];
  521. }
  522. export interface PermissionTemplate {
  523. defaultFor: string[];
  524. id: string;
  525. name: string;
  526. description?: string;
  527. projectKeyPattern?: string;
  528. createdAt: string;
  529. updatedAt?: string;
  530. permissions: Array<{
  531. key: string;
  532. usersCount: number;
  533. groupsCount: number;
  534. withProjectCreator?: boolean;
  535. }>;
  536. }
  537. export interface ProjectLink {
  538. id: string;
  539. name?: string;
  540. type: string;
  541. url: string;
  542. }
  543. export interface PullRequest {
  544. analysisDate?: string;
  545. base: string;
  546. branch: string;
  547. key: string;
  548. isOrphan?: true;
  549. status?: { qualityGateStatus: string };
  550. title: string;
  551. url?: string;
  552. }
  553. export interface QualityGate {
  554. actions?: {
  555. associateProjects?: boolean;
  556. copy?: boolean;
  557. delete?: boolean;
  558. manageConditions?: boolean;
  559. rename?: boolean;
  560. setAsDefault?: boolean;
  561. };
  562. conditions?: Condition[];
  563. id: number;
  564. isBuiltIn?: boolean;
  565. isDefault?: boolean;
  566. name: string;
  567. }
  568. export interface QualityGateProjectStatusCondition {
  569. status: 'ERROR' | 'OK';
  570. metricKey: string;
  571. comparator: string;
  572. periodIndex: number;
  573. errorThreshold: string;
  574. actualValue: string;
  575. }
  576. export interface QualityGateProjectStatus {
  577. projectStatus: {
  578. conditions?: QualityGateProjectStatusCondition[];
  579. ignoredConditions: boolean;
  580. status: string;
  581. };
  582. }
  583. export interface QualityGateStatusCondition {
  584. actual?: string;
  585. error?: string;
  586. level: string;
  587. metric: string;
  588. op: string;
  589. period?: number;
  590. warning?: string;
  591. }
  592. export interface QualityGateStatusConditionEnhanced extends QualityGateStatusCondition {
  593. measure: T.MeasureEnhanced;
  594. }
  595. export interface Rule {
  596. isTemplate?: boolean;
  597. key: string;
  598. lang?: string;
  599. langName?: string;
  600. name: string;
  601. params?: RuleParameter[];
  602. severity: string;
  603. status: string;
  604. sysTags?: string[];
  605. tags?: string[];
  606. type: RuleType;
  607. }
  608. export interface RuleActivation {
  609. createdAt: string;
  610. inherit: RuleInheritance;
  611. params: { key: string; value: string }[];
  612. qProfile: string;
  613. severity: string;
  614. }
  615. export interface RuleDetails extends Rule {
  616. createdAt: string;
  617. debtOverloaded?: boolean;
  618. debtRemFnCoeff?: string;
  619. debtRemFnOffset?: string;
  620. debtRemFnType?: string;
  621. defaultDebtRemFnOffset?: string;
  622. defaultDebtRemFnType?: string;
  623. defaultRemFnBaseEffort?: string;
  624. defaultRemFnType?: string;
  625. effortToFixDescription?: string;
  626. htmlDesc?: string;
  627. htmlNote?: string;
  628. internalKey?: string;
  629. isExternal?: boolean;
  630. mdDesc?: string;
  631. mdNote?: string;
  632. remFnBaseEffort?: string;
  633. remFnOverloaded?: boolean;
  634. remFnType?: string;
  635. repo: string;
  636. scope?: RuleScope;
  637. templateKey?: string;
  638. }
  639. export type RuleInheritance = 'NONE' | 'INHERITED' | 'OVERRIDES';
  640. export interface RuleParameter {
  641. defaultValue?: string;
  642. htmlDesc?: string;
  643. key: string;
  644. type: string;
  645. }
  646. export type RuleScope = 'MAIN' | 'TEST' | 'ALL';
  647. export type RuleType = 'BUG' | 'VULNERABILITY' | 'CODE_SMELL' | 'SECURITY_HOTSPOT' | 'UNKNOWN';
  648. export type Setting = SettingValue & { definition: SettingDefinition };
  649. export type SettingType =
  650. | 'STRING'
  651. | 'TEXT'
  652. | 'PASSWORD'
  653. | 'BOOLEAN'
  654. | 'FLOAT'
  655. | 'INTEGER'
  656. | 'LICENSE'
  657. | 'LONG'
  658. | 'SINGLE_SELECT_LIST'
  659. | 'PROPERTY_SET';
  660. export interface SettingDefinition {
  661. description?: string;
  662. key: string;
  663. name?: string;
  664. options: string[];
  665. type?: SettingType;
  666. }
  667. export interface SettingFieldDefinition extends SettingDefinition {
  668. description: string;
  669. name: string;
  670. }
  671. export interface SettingCategoryDefinition extends SettingDefinition {
  672. category: string;
  673. defaultValue?: string;
  674. deprecatedKey?: string;
  675. fields: SettingFieldDefinition[];
  676. multiValues?: boolean;
  677. subCategory: string;
  678. }
  679. export interface SettingValue {
  680. fieldValues?: Array<{ [key: string]: string }>;
  681. inherited?: boolean;
  682. key: string;
  683. parentFieldValues?: Array<{ [key: string]: string }>;
  684. parentValue?: string;
  685. parentValues?: string[];
  686. value?: string;
  687. values?: string[];
  688. }
  689. export interface ShortLivingBranch extends Branch {
  690. isMain: false;
  691. isOrphan?: true;
  692. mergeBranch: string;
  693. type: 'SHORT';
  694. }
  695. export interface SourceLine {
  696. code?: string;
  697. conditions?: number;
  698. coverageStatus?: SourceLineCoverageStatus;
  699. coveredConditions?: number;
  700. duplicated?: boolean;
  701. isNew?: boolean;
  702. line: number;
  703. lineHits?: number;
  704. scmAuthor?: string;
  705. scmDate?: string;
  706. scmRevision?: string;
  707. }
  708. export type SourceLineCoverageStatus = 'uncovered' | 'partially-covered' | 'covered';
  709. export interface SourceViewerFile {
  710. canMarkAsFavorite?: boolean;
  711. fav?: boolean;
  712. key: string;
  713. leakPeriodDate?: string;
  714. measures: {
  715. coverage?: string;
  716. duplicationDensity?: string;
  717. issues?: string;
  718. lines?: string;
  719. tests?: string;
  720. };
  721. path: string;
  722. project: string;
  723. projectName: string;
  724. q: string;
  725. subProject?: string;
  726. subProjectName?: string;
  727. uuid: string;
  728. }
  729. export interface SubscriptionPlan {
  730. maxNcloc: number;
  731. price: number;
  732. }
  733. export interface SuggestionLink {
  734. link: string;
  735. scope?: 'sonarcloud';
  736. text: string;
  737. }
  738. export interface Task {
  739. analysisId?: string;
  740. branch?: string;
  741. branchType?: string;
  742. componentKey?: string;
  743. componentName?: string;
  744. componentQualifier?: string;
  745. errorMessage?: string;
  746. errorStacktrace?: string;
  747. errorType?: string;
  748. executedAt?: string;
  749. executionTimeMs?: number;
  750. hasErrorStacktrace?: boolean;
  751. hasScannerContext?: boolean;
  752. id: string;
  753. logs?: boolean;
  754. organization: string;
  755. pullRequest?: string;
  756. pullRequestTitle?: string;
  757. scannerContext?: string;
  758. startedAt?: string;
  759. status: string;
  760. submittedAt: string;
  761. submitterLogin?: string;
  762. type: string;
  763. warningCount?: number;
  764. warnings?: string[];
  765. }
  766. export interface TestCase {
  767. coveredLines: number;
  768. durationInMs: number;
  769. fileId: string;
  770. fileKey: string;
  771. fileName: string;
  772. id: string;
  773. message?: string;
  774. name: string;
  775. stacktrace?: string;
  776. status: string;
  777. }
  778. export interface TextRange {
  779. startLine: number;
  780. startOffset: number;
  781. endLine: number;
  782. endOffset: number;
  783. }
  784. export interface User {
  785. active: boolean;
  786. avatar?: string;
  787. email?: string;
  788. externalIdentity?: string;
  789. externalProvider?: string;
  790. groups?: string[];
  791. lastConnectionDate?: string;
  792. local: boolean;
  793. login: string;
  794. name: string;
  795. scmAccounts?: string[];
  796. tokensCount?: number;
  797. }
  798. export interface UserToken {
  799. name: string;
  800. createdAt: string;
  801. lastConnectionDate?: string;
  802. }
  803. export interface NewUserToken extends UserToken {
  804. login: string;
  805. token: string;
  806. }
  807. export type Visibility = 'public' | 'private';
  808. export interface Webhook {
  809. key: string;
  810. latestDelivery?: WebhookDelivery;
  811. name: string;
  812. url: string;
  813. }
  814. export interface WebhookDelivery {
  815. at: string;
  816. durationMs: number;
  817. httpStatus?: number;
  818. id: string;
  819. success: boolean;
  820. }
  821. export namespace WebApi {
  822. export interface Action {
  823. key: string;
  824. changelog: Changelog[];
  825. description: string;
  826. deprecatedSince?: string;
  827. hasResponseExample: boolean;
  828. internal: boolean;
  829. params?: Param[];
  830. post: boolean;
  831. since?: string;
  832. }
  833. export interface Changelog {
  834. description: string;
  835. version: string;
  836. }
  837. export interface Domain {
  838. actions: Action[];
  839. deprecatedSince?: string;
  840. description: string;
  841. internal?: boolean;
  842. path: string;
  843. since?: string;
  844. }
  845. export interface Example {
  846. example: string;
  847. format: string;
  848. }
  849. export interface Param {
  850. defaultValue?: string;
  851. deprecatedKey?: string;
  852. deprecatedKeySince?: string;
  853. deprecatedSince?: string;
  854. description: string;
  855. exampleValue?: string;
  856. internal: boolean;
  857. key: string;
  858. maximumLength?: number;
  859. maximumValue?: number;
  860. maxValuesAllowed?: number;
  861. minimumLength?: number;
  862. minimumValue?: number;
  863. possibleValues?: string[];
  864. required: boolean;
  865. since?: string;
  866. }
  867. }
  868. }