File tree Expand file tree Collapse file tree 6 files changed +34
-11
lines changed
Expand file tree Collapse file tree 6 files changed +34
-11
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ import {
77 UploadProjectResponse ,
88 ProjectSettings ,
99 FetchPlatformVersionResponse ,
10+ WarnLogsResponse ,
1011} from '../types/Project' ;
1112import { Build , FetchProjectBuildsResponse } from '../types/Build' ;
1213import {
1314 ComponentStructureResponse ,
1415 ProjectComponentsMetadata ,
1516} from '../types/ComponentStructure' ;
1617import { Deploy , ProjectDeployResponse } from '../types/Deploy' ;
17- import { ProjectLog } from '../types/ProjectLog' ;
1818import {
1919 MigrateAppResponse ,
2020 CloneAppResponse ,
@@ -272,10 +272,6 @@ export function cancelStagedBuild(
272272 } ) ;
273273}
274274
275- type WarnLogsResponse = {
276- logs : Array < ProjectLog > ;
277- } ;
278-
279275export function fetchBuildWarnLogs (
280276 accountId : number ,
281277 projectName : string ,
Original file line number Diff line number Diff line change @@ -6,18 +6,19 @@ import {
66} from '../enums/build' ;
77import { ActivitySource } from './Activity' ;
88import { DeployStatusTaskLocator } from './Deploy' ;
9- import { OptionalError } from './Error ' ;
9+ import { ProjectStandardError } from './Project ' ;
1010
1111export type SubbuildStatus = {
1212 buildName : string ;
1313 buildType : ValueOf < typeof SUBBUILD_TYPES > ;
1414 errorMessage : string ;
1515 finishedAt : string ;
1616 rootPath : string ;
17- standardError ?: OptionalError ;
17+ standardError : ProjectStandardError | null ;
1818 startedAt : string ;
1919 status : ValueOf < typeof BUILD_STATUS > ;
2020 id : string ;
21+ visible : boolean ;
2122} ;
2223
2324export type Build = {
@@ -35,6 +36,7 @@ export type Build = {
3536 status : ValueOf < typeof BUILD_STATUS > ;
3637 subbuildStatuses : Array < SubbuildStatus > ;
3738 uploadMessage : string ;
39+ autoDeployId : number ;
3840} ;
3941
4042export type FetchProjectBuildsResponse = {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { ValueOf } from './Utils';
22import { ACTIVITY_SOURCE } from '../enums/project' ;
33import { DEPLOY_ACTION , DEPLOY_STATUS } from '../enums/deploy' ;
44import { COMPONENT_TYPES , SUBCOMPONENT_TYPES } from '../enums/build' ;
5- import { OptionalError } from './Error ' ;
5+ import { ProjectStandardError } from './Project ' ;
66
77export type DeployStatus = ValueOf < typeof DEPLOY_STATUS > ;
88
@@ -14,10 +14,11 @@ export type SubdeployStatus = {
1414 | ValueOf < typeof SUBCOMPONENT_TYPES > ;
1515 errorMessage : string ;
1616 finishedAt : string ;
17- standardError ?: OptionalError ;
17+ standardError : ProjectStandardError | null ;
1818 startedAt : string ;
1919 status : DeployStatus ;
2020 id : string ;
21+ visible : boolean ;
2122} ;
2223
2324export type Deploy = {
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export interface HubSpotHttpErrorContext extends FileSystemErrorContext {
3636 projectName ?: string ;
3737}
3838
39+ // TODO: Remove in next major release
3940export type OptionalError = BaseError | null | undefined ;
4041
4142export type ErrorContext = {
Original file line number Diff line number Diff line change 11import { ValueOf } from './Utils' ;
2- import { OptionalError } from './Error' ;
2+ import { ProjectStandardError } from './Project' ;
3+
34export const MIGRATION_STATUS = {
45 BUILDING : 'BUILDING' ,
56 FAILURE : 'FAILURE' ,
@@ -21,6 +22,6 @@ export type CloneAppResponse = {
2122export type PollAppResponse = {
2223 id : number ;
2324 project ?: { id : number ; name : string ; buildId : number ; deployId : number } ;
24- error ?: OptionalError ;
25+ error : ProjectStandardError | null ;
2526 status : ValueOf < typeof MIGRATION_STATUS > ;
2627} ;
Original file line number Diff line number Diff line change 11import { Build } from './Build' ;
22import { GithubSourceData } from './Github' ;
3+ import { ProjectLog } from './ProjectLog' ;
34
45export type Project = {
56 createdAt : number ;
@@ -45,3 +46,24 @@ export type FetchPlatformVersionResponse = {
4546 defaultPlatformVersion : string ;
4647 activePlatformVersions : Array < string > ;
4748} ;
49+
50+ export type ProjectStandardError = {
51+ status : string ;
52+ id ?: string ;
53+ category : string ;
54+ subCategory ?: string ;
55+ message ?: string ;
56+ errors ?: Array < {
57+ message : string ;
58+ in ?: string ;
59+ code ?: string ;
60+ subcateogy ?: string ;
61+ context : object ;
62+ } > ;
63+ context : object ;
64+ links : { [ key : string ] : string } ;
65+ } ;
66+
67+ export type WarnLogsResponse = {
68+ logs : Array < ProjectLog > ;
69+ } ;
You can’t perform that action at this time.
0 commit comments