attlaz-client 1.9.68 → 1.9.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Client.d.ts CHANGED
@@ -15,7 +15,7 @@ import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint';
15
15
  import { StorageEndpoint } from './Service/StorageEndpoint';
16
16
  import { QueueEndpoint } from './Service/QueueEndpoint';
17
17
  import { NotificationsEndpoint } from './Service/NotificationsEndpoint';
18
- import { ProjectDeployEndpoint } from './Service/ProjectDeployEndpoint';
18
+ import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint';
19
19
  import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint';
20
20
  import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint';
21
21
  import { ChannelEndpoint } from './Service/ChannelEndpoint';
@@ -50,7 +50,7 @@ export declare class Client {
50
50
  getAdapterEndpoint(): AdapterEndpoint;
51
51
  getProjectEndpoint(): ProjectEndpoint;
52
52
  getProjectEnvironmentEndpoint(): ProjectEnvironmentEndpoint;
53
- getProjectDeployEndpoint(): ProjectDeployEndpoint;
53
+ getCodeDeployEndpoint(): CodeDeployEndpoint;
54
54
  getChannelEndpoint(): ChannelEndpoint;
55
55
  getConfigEndpoint(): ConfigEndpoint;
56
56
  getNotificationsEndpoint(): NotificationsEndpoint;
package/dist/Client.js CHANGED
@@ -17,7 +17,7 @@ const WorkspaceMemberEndpoint_1 = require("./Service/WorkspaceMemberEndpoint");
17
17
  const StorageEndpoint_1 = require("./Service/StorageEndpoint");
18
18
  const QueueEndpoint_1 = require("./Service/QueueEndpoint");
19
19
  const NotificationsEndpoint_1 = require("./Service/NotificationsEndpoint");
20
- const ProjectDeployEndpoint_1 = require("./Service/ProjectDeployEndpoint");
20
+ const CodeDeployEndpoint_1 = require("./Service/CodeDeployEndpoint");
21
21
  const SourcesAccountEndpoint_1 = require("./Service/SourcesAccountEndpoint");
22
22
  const OAuthClientOptions_1 = require("./Http/OAuthClientOptions");
23
23
  const PlatformLanguageEndpoint_1 = require("./Service/PlatformLanguageEndpoint");
@@ -42,7 +42,7 @@ class Client {
42
42
  AdapterEndpoint: AdapterEndpoint_1.AdapterEndpoint,
43
43
  ProjectEndpoint: ProjectEndpoint_1.ProjectEndpoint,
44
44
  ProjectEnvironmentEndpoint: ProjectEnvironmentEndpoint_1.ProjectEnvironmentEndpoint,
45
- ProjectDeployEndpoint: ProjectDeployEndpoint_1.ProjectDeployEndpoint,
45
+ CodeDeployEndpoint: CodeDeployEndpoint_1.CodeDeployEndpoint,
46
46
  QueueEndpoint: QueueEndpoint_1.QueueEndpoint,
47
47
  ChannelEndpoint: ChannelEndpoint_1.ChannelEndpoint,
48
48
  ConfigEndpoint: ConfigEndpoint_1.ConfigEndpoint,
@@ -134,8 +134,8 @@ class Client {
134
134
  getProjectEnvironmentEndpoint() {
135
135
  return this.getEndpoint('project-environment', this.Store.ProjectEnvironmentEndpoint);
136
136
  }
137
- getProjectDeployEndpoint() {
138
- return this.getEndpoint('project-deploy', this.Store.ProjectDeployEndpoint);
137
+ getCodeDeployEndpoint() {
138
+ return this.getEndpoint('code-deploy', this.Store.CodeDeployEndpoint);
139
139
  }
140
140
  getChannelEndpoint() {
141
141
  return this.getEndpoint('channel', this.Store.ChannelEndpoint);
@@ -7,6 +7,7 @@ export declare class CodeSource implements StateAware {
7
7
  branch: string;
8
8
  platformId: string;
9
9
  buildStrategyId: string;
10
+ runStrategyId: string;
10
11
  description: string;
11
12
  state: State;
12
13
  static parse(rawCodeSource: any): CodeSource;
@@ -14,6 +14,7 @@ class CodeSource {
14
14
  codeSource.branch = rawCodeSource.branch;
15
15
  codeSource.platformId = rawCodeSource.platform;
16
16
  codeSource.buildStrategyId = rawCodeSource.build_strategy;
17
+ codeSource.runStrategyId = rawCodeSource.run_strategy;
17
18
  codeSource.description = rawCodeSource.description;
18
19
  codeSource.state = State_1.State.fromString(rawCodeSource.state);
19
20
  return codeSource;
@@ -1,14 +1,15 @@
1
- import { ProjectDeployStatus } from './ProjectDeployStatus';
1
+ import { CodeDeployStatus } from './CodeDeployStatus';
2
2
  import { ProjectDeployCommit } from './ProjectDeployCommit';
3
- export declare class ProjectDeploy {
3
+ export declare class CodeDeploy {
4
4
  id: string;
5
+ codeSourceId: string;
5
6
  platformId: string;
6
7
  buildStrategyId: string;
7
8
  userId: string;
8
9
  requested: Date;
9
10
  started: Date | null;
10
11
  finished: Date | null;
11
- status: ProjectDeployStatus;
12
+ status: CodeDeployStatus;
12
13
  bytes: number | null;
13
14
  commits: ProjectDeployCommit[];
14
15
  path: string | null;
@@ -16,5 +17,5 @@ export declare class ProjectDeploy {
16
17
  errors: {
17
18
  message: string;
18
19
  }[] | null;
19
- static parse(rawProjectDeploy: any): ProjectDeploy;
20
+ static parse(rawCodeDeploy: any): CodeDeploy;
20
21
  }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeDeploy = void 0;
4
+ const CodeDeployStatus_1 = require("./CodeDeployStatus");
5
+ const ProjectDeployCommit_1 = require("./ProjectDeployCommit");
6
+ const Utils_1 = require("../../Utils");
7
+ class CodeDeploy {
8
+ constructor() {
9
+ this.started = null;
10
+ this.finished = null;
11
+ this.status = CodeDeployStatus_1.CodeDeployStatus.Unknown;
12
+ this.bytes = null;
13
+ this.commits = [];
14
+ this.path = null;
15
+ this.commitHash = null;
16
+ this.errors = null;
17
+ }
18
+ static parse(rawCodeDeploy) {
19
+ const projectDeploy = new CodeDeploy();
20
+ projectDeploy.id = rawCodeDeploy.id.toString();
21
+ projectDeploy.codeSourceId = rawCodeDeploy.code_source;
22
+ projectDeploy.platformId = rawCodeDeploy.platform;
23
+ projectDeploy.buildStrategyId = rawCodeDeploy.build_strategy;
24
+ projectDeploy.userId = rawCodeDeploy.user;
25
+ projectDeploy.requested = Utils_1.Utils.parseRawDate(rawCodeDeploy.requested);
26
+ projectDeploy.started = rawCodeDeploy.started === null ? null : Utils_1.Utils.parseRawDate(rawCodeDeploy.started);
27
+ projectDeploy.finished = rawCodeDeploy.finished === null ? null : Utils_1.Utils.parseRawDate(rawCodeDeploy.finished);
28
+ projectDeploy.status = CodeDeployStatus_1.CodeDeployStatus.fromString(rawCodeDeploy.status);
29
+ projectDeploy.bytes = rawCodeDeploy.bytes === null ? null : parseInt(rawCodeDeploy.bytes);
30
+ projectDeploy.path = rawCodeDeploy.path;
31
+ projectDeploy.commitHash = rawCodeDeploy.commit_hash;
32
+ const rawProjectDeployCommits = rawCodeDeploy.commits;
33
+ for (let rawProjectDeployCommit of rawProjectDeployCommits) {
34
+ let projectDeployCommit = new ProjectDeployCommit_1.ProjectDeployCommit();
35
+ projectDeployCommit.hash = rawProjectDeployCommit.commit_hash;
36
+ projectDeployCommit.date = Utils_1.Utils.parseRawDate(rawProjectDeployCommit.commit_date);
37
+ projectDeployCommit.message = rawProjectDeployCommit.commit_message;
38
+ projectDeployCommit.authorName = rawProjectDeployCommit.commit_author_name;
39
+ projectDeployCommit.authorEmail = rawProjectDeployCommit.commit_author_email;
40
+ projectDeploy.commits.push(projectDeployCommit);
41
+ }
42
+ projectDeploy.errors = rawCodeDeploy.errors;
43
+ return projectDeploy;
44
+ }
45
+ }
46
+ exports.CodeDeploy = CodeDeploy;
@@ -1,4 +1,4 @@
1
- export declare enum ProjectDeployStatus {
1
+ export declare enum CodeDeployStatus {
2
2
  Unknown = "unknown",
3
3
  Pending = "pending",
4
4
  Canceled = "canceled",
@@ -7,6 +7,6 @@ export declare enum ProjectDeployStatus {
7
7
  Stopped = "stopped",
8
8
  Complete = "complete"
9
9
  }
10
- export declare namespace ProjectDeployStatus {
11
- function fromString(input: string): ProjectDeployStatus;
10
+ export declare namespace CodeDeployStatus {
11
+ function fromString(input: string): CodeDeployStatus;
12
12
  }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeDeployStatus = void 0;
4
+ const Utils_1 = require("../../Utils");
5
+ var CodeDeployStatus;
6
+ (function (CodeDeployStatus) {
7
+ CodeDeployStatus["Unknown"] = "unknown";
8
+ CodeDeployStatus["Pending"] = "pending";
9
+ CodeDeployStatus["Canceled"] = "canceled";
10
+ CodeDeployStatus["Running"] = "running";
11
+ CodeDeployStatus["Failed"] = "failed";
12
+ CodeDeployStatus["Stopped"] = "stopped";
13
+ CodeDeployStatus["Complete"] = "complete";
14
+ })(CodeDeployStatus || (exports.CodeDeployStatus = CodeDeployStatus = {}));
15
+ (function (CodeDeployStatus) {
16
+ function fromString(input) {
17
+ const result = Utils_1.Utils.parseEnum(input, CodeDeployStatus);
18
+ if (result === null) {
19
+ throw new Error('Unable to parse CodeDeployStatus from string: Unknown CodeDeployStatus "' + input + '"');
20
+ }
21
+ return result;
22
+ }
23
+ CodeDeployStatus.fromString = fromString;
24
+ })(CodeDeployStatus || (exports.CodeDeployStatus = CodeDeployStatus = {}));
@@ -0,0 +1,9 @@
1
+ import { Endpoint } from './Endpoint';
2
+ import { CodeDeploy } from '../Model/Project/CodeDeploy';
3
+ import { CollectionResult } from '../Model/Result/CollectionResult';
4
+ export declare class CodeDeployEndpoint extends Endpoint {
5
+ getById(deployId: string): Promise<CodeDeploy | null>;
6
+ getLatestDeploy(codeSourceId: string): Promise<CodeDeploy | null>;
7
+ getByCodeSource(codeSourceId: string): Promise<CollectionResult<CodeDeploy>>;
8
+ requestDeploy(codeSourceId: string): Promise<CodeDeploy>;
9
+ }
@@ -1,60 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectDeployEndpoint = void 0;
3
+ exports.CodeDeployEndpoint = void 0;
4
4
  const Endpoint_1 = require("./Endpoint");
5
- const ProjectDeploy_1 = require("../Model/Project/ProjectDeploy");
6
- class ProjectDeployEndpoint extends Endpoint_1.Endpoint {
5
+ const CodeDeploy_1 = require("../Model/Project/CodeDeploy");
6
+ class CodeDeployEndpoint extends Endpoint_1.Endpoint {
7
7
  async getById(deployId) {
8
8
  try {
9
- const rawProjectDeploy = await this.requestObject('/deploys/' + deployId, null, ProjectDeploy_1.ProjectDeploy.parse);
10
- return rawProjectDeploy.getData();
9
+ const rawDeploy = await this.requestObject('/deploys/' + deployId, null, CodeDeploy_1.CodeDeploy.parse);
10
+ return rawDeploy.getData();
11
11
  }
12
12
  catch (error) {
13
13
  if (this.httpClient.isDebugEnabled()) {
14
- console.error('Failed to load project deploy by id', error);
14
+ console.error('Failed to load deploy by id', error);
15
15
  }
16
16
  throw error;
17
17
  }
18
18
  }
19
19
  async getLatestDeploy(codeSourceId) {
20
20
  try {
21
- const rawProjectDeploy = await this.requestObject('/codesources/' + codeSourceId + '/latestdeploy', null, ProjectDeploy_1.ProjectDeploy.parse);
22
- return rawProjectDeploy.getData();
21
+ const rawDeploy = await this.requestObject('/codesources/' + codeSourceId + '/latestdeploy', null, CodeDeploy_1.CodeDeploy.parse);
22
+ return rawDeploy.getData();
23
23
  }
24
24
  catch (error) {
25
25
  if (this.httpClient.isDebugEnabled()) {
26
- console.error('Failed to load project deploy by id', error);
26
+ console.error('Failed to load latest deploy by code source', error);
27
27
  }
28
28
  throw error;
29
29
  }
30
30
  }
31
31
  async getByCodeSource(codeSourceId) {
32
32
  try {
33
- const rawProjectDeploys = await this.requestCollection('/codesources/' + codeSourceId + '/deploys', ProjectDeploy_1.ProjectDeploy.parse);
34
- return rawProjectDeploys;
33
+ const rawDeploys = await this.requestCollection('/codesources/' + codeSourceId + '/deploys', CodeDeploy_1.CodeDeploy.parse);
34
+ return rawDeploys;
35
35
  }
36
36
  catch (error) {
37
37
  if (this.httpClient.isDebugEnabled()) {
38
- console.error('Failed to load project deploys', error);
38
+ console.error('Failed to load deploys by code source', error);
39
39
  }
40
40
  throw error;
41
41
  }
42
42
  }
43
43
  async requestDeploy(codeSourceId) {
44
44
  try {
45
- const result = await this.requestObject('/codesources/' + codeSourceId + '/deploys', null, ProjectDeploy_1.ProjectDeploy.parse, 'POST');
45
+ const result = await this.requestObject('/codesources/' + codeSourceId + '/deploys', null, CodeDeploy_1.CodeDeploy.parse, 'POST');
46
46
  const requestedDeploy = result.getData();
47
47
  if (requestedDeploy === null) {
48
- throw new Error('ProjectDeploy not requested');
48
+ throw new Error('Deploy not requested');
49
49
  }
50
50
  return requestedDeploy;
51
51
  }
52
52
  catch (error) {
53
53
  if (this.httpClient.isDebugEnabled()) {
54
- console.error('Failed to request project deploy', error);
54
+ console.error('Failed to request deploy', error);
55
55
  }
56
56
  throw error;
57
57
  }
58
58
  }
59
59
  }
60
- exports.ProjectDeployEndpoint = ProjectDeployEndpoint;
60
+ exports.CodeDeployEndpoint = CodeDeployEndpoint;
package/dist/index.d.ts CHANGED
@@ -40,9 +40,9 @@ export { ChannelHistory } from './Model/Messaging/ChannelHistory';
40
40
  /** Project **/
41
41
  export { PlatformLanguage } from './Model/Project/PlatformLanguage';
42
42
  export { Project } from './Model/Project/Project';
43
- export { ProjectDeploy } from './Model/Project/ProjectDeploy';
43
+ export { CodeDeploy } from './Model/Project/CodeDeploy';
44
44
  export { ProjectDeployCommit } from './Model/Project/ProjectDeployCommit';
45
- export { ProjectDeployStatus } from './Model/Project/ProjectDeployStatus';
45
+ export { CodeDeployStatus } from './Model/Project/CodeDeployStatus';
46
46
  export { ProjectEnvironment } from './Model/Project/ProjectEnvironment';
47
47
  /** Queue **/
48
48
  export { QueueStatus } from './Model/Queue/QueueStatus';
@@ -112,7 +112,7 @@ export { LogEndpoint } from './Service/LogEndpoint';
112
112
  export { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint';
113
113
  export { NotificationsEndpoint } from './Service/NotificationsEndpoint';
114
114
  export { PlatformEndpoint } from './Service/PlatformEndpoint';
115
- export { ProjectDeployEndpoint } from './Service/ProjectDeployEndpoint';
115
+ export { CodeDeployEndpoint } from './Service/CodeDeployEndpoint';
116
116
  export { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint';
117
117
  export { QueueEndpoint } from './Service/QueueEndpoint';
118
118
  export { SearchEndpoint } from './Service/SearchEndpoint';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiTriggerData = exports.ApiTrigger = exports.SearchResult = exports.StorageItemInformation = exports.StorageItem = exports.StorageType = exports.StorageInformation = exports.ResultError = exports.ObjectResult = exports.DataResult = exports.CollectionResult = exports.QueueStatus = exports.ProjectEnvironment = exports.ProjectDeployStatus = exports.ProjectDeployCommit = exports.ProjectDeploy = exports.Project = exports.PlatformLanguage = exports.ChannelHistory = exports.Subscriber = exports.WebhookChannelData = exports.SmsChannelData = exports.SlackChannelData = exports.PushChannelData = exports.EmailChannelData = exports.ChannelType = exports.ChannelData = exports.Channel = exports.CursorPagination = exports.LogStreamInformation = exports.LogStreamId = exports.LogStream = exports.LogStatus = exports.LogQuery = exports.LogLevel = exports.Log = exports.HealthTestType = exports.HealthAlertStatus = exports.HealthAlert = exports.EventType = exports.ClientError = exports.AdapterConnection = exports.AdapterConfiguration = exports.Adapter = exports.OAuthClientToken = exports.OAuthClientOptions = exports.OAuthClient = exports.HttpClientResponse = exports.HttpClientRequest = exports.HttpClient = void 0;
4
- exports.QueueEndpoint = exports.ProjectEnvironmentEndpoint = exports.ProjectDeployEndpoint = exports.PlatformEndpoint = exports.NotificationsEndpoint = exports.WorkspaceMemberEndpoint = exports.LogEndpoint = exports.PlatformLanguageEndpoint = exports.ConfigEndpoint = exports.ProjectEndpoint = exports.ChannelEndpoint = exports.AdapterEndpoint = exports.Endpoint = exports.User = exports.FlowSummary = exports.FlowRunStats = exports.FlowRunSummary = exports.FlowRunStatus = exports.FlowRunResponse = exports.FlowRunHistory = exports.FlowRun = exports.Flow = exports.State = exports.Notification = exports.DataValue = exports.Config = exports.WorkspaceMemberRole = exports.WorkspaceMemberInviteState = exports.WorkspaceMemberInvite2 = exports.WorkspaceMemberInvite = exports.WorkspaceMember = exports.Workspace = exports.SourcesAccountRepositoryBranch = exports.SourcesAccountRepository = exports.CodeSourceAccount = exports.CodeSource = exports.WorkerState = exports.WorkerInstanceState = exports.WorkerInstance = exports.WorkerConfig = exports.Worker = exports.PlatformImage = exports.Platform = exports.WebhookTriggerData = exports.WebhookTrigger = exports.TriggerType = exports.TriggerData = exports.Trigger = exports.ScheduleTriggerData = exports.ScheduleTrigger = void 0;
3
+ exports.ApiTriggerData = exports.ApiTrigger = exports.SearchResult = exports.StorageItemInformation = exports.StorageItem = exports.StorageType = exports.StorageInformation = exports.ResultError = exports.ObjectResult = exports.DataResult = exports.CollectionResult = exports.QueueStatus = exports.ProjectEnvironment = exports.CodeDeployStatus = exports.ProjectDeployCommit = exports.CodeDeploy = exports.Project = exports.PlatformLanguage = exports.ChannelHistory = exports.Subscriber = exports.WebhookChannelData = exports.SmsChannelData = exports.SlackChannelData = exports.PushChannelData = exports.EmailChannelData = exports.ChannelType = exports.ChannelData = exports.Channel = exports.CursorPagination = exports.LogStreamInformation = exports.LogStreamId = exports.LogStream = exports.LogStatus = exports.LogQuery = exports.LogLevel = exports.Log = exports.HealthTestType = exports.HealthAlertStatus = exports.HealthAlert = exports.EventType = exports.ClientError = exports.AdapterConnection = exports.AdapterConfiguration = exports.Adapter = exports.OAuthClientToken = exports.OAuthClientOptions = exports.OAuthClient = exports.HttpClientResponse = exports.HttpClientRequest = exports.HttpClient = void 0;
4
+ exports.QueueEndpoint = exports.ProjectEnvironmentEndpoint = exports.CodeDeployEndpoint = exports.PlatformEndpoint = exports.NotificationsEndpoint = exports.WorkspaceMemberEndpoint = exports.LogEndpoint = exports.PlatformLanguageEndpoint = exports.ConfigEndpoint = exports.ProjectEndpoint = exports.ChannelEndpoint = exports.AdapterEndpoint = exports.Endpoint = exports.User = exports.FlowSummary = exports.FlowRunStats = exports.FlowRunSummary = exports.FlowRunStatus = exports.FlowRunResponse = exports.FlowRunHistory = exports.FlowRun = exports.Flow = exports.State = exports.Notification = exports.DataValue = exports.Config = exports.WorkspaceMemberRole = exports.WorkspaceMemberInviteState = exports.WorkspaceMemberInvite2 = exports.WorkspaceMemberInvite = exports.WorkspaceMember = exports.Workspace = exports.SourcesAccountRepositoryBranch = exports.SourcesAccountRepository = exports.CodeSourceAccount = exports.CodeSource = exports.WorkerState = exports.WorkerInstanceState = exports.WorkerInstance = exports.WorkerConfig = exports.Worker = exports.PlatformImage = exports.Platform = exports.WebhookTriggerData = exports.WebhookTrigger = exports.TriggerType = exports.TriggerData = exports.Trigger = exports.ScheduleTriggerData = exports.ScheduleTrigger = void 0;
5
5
  exports.Utils = exports.Client = exports.HealthAlertEndpoint = exports.WorkerEndpoint = exports.WorkerConfigEndpoint = exports.UserEndpoint = exports.TriggerEndpoint = exports.WorkspaceEndpoint = exports.FlowRunStatsEndpoint = exports.FlowRunRequestEndpoint = exports.FlowRunEndpoint = exports.FlowEndpoint = exports.SubscriberEndpoint = exports.StorageEndpoint = exports.SourcesAccountEndpoint = exports.SearchEndpoint = void 0;
6
6
  /**
7
7
  * Http
@@ -79,12 +79,12 @@ var PlatformLanguage_1 = require("./Model/Project/PlatformLanguage");
79
79
  Object.defineProperty(exports, "PlatformLanguage", { enumerable: true, get: function () { return PlatformLanguage_1.PlatformLanguage; } });
80
80
  var Project_1 = require("./Model/Project/Project");
81
81
  Object.defineProperty(exports, "Project", { enumerable: true, get: function () { return Project_1.Project; } });
82
- var ProjectDeploy_1 = require("./Model/Project/ProjectDeploy");
83
- Object.defineProperty(exports, "ProjectDeploy", { enumerable: true, get: function () { return ProjectDeploy_1.ProjectDeploy; } });
82
+ var CodeDeploy_1 = require("./Model/Project/CodeDeploy");
83
+ Object.defineProperty(exports, "CodeDeploy", { enumerable: true, get: function () { return CodeDeploy_1.CodeDeploy; } });
84
84
  var ProjectDeployCommit_1 = require("./Model/Project/ProjectDeployCommit");
85
85
  Object.defineProperty(exports, "ProjectDeployCommit", { enumerable: true, get: function () { return ProjectDeployCommit_1.ProjectDeployCommit; } });
86
- var ProjectDeployStatus_1 = require("./Model/Project/ProjectDeployStatus");
87
- Object.defineProperty(exports, "ProjectDeployStatus", { enumerable: true, get: function () { return ProjectDeployStatus_1.ProjectDeployStatus; } });
86
+ var CodeDeployStatus_1 = require("./Model/Project/CodeDeployStatus");
87
+ Object.defineProperty(exports, "CodeDeployStatus", { enumerable: true, get: function () { return CodeDeployStatus_1.CodeDeployStatus; } });
88
88
  var ProjectEnvironment_1 = require("./Model/Project/ProjectEnvironment");
89
89
  Object.defineProperty(exports, "ProjectEnvironment", { enumerable: true, get: function () { return ProjectEnvironment_1.ProjectEnvironment; } });
90
90
  /** Queue **/
@@ -215,8 +215,8 @@ var NotificationsEndpoint_1 = require("./Service/NotificationsEndpoint");
215
215
  Object.defineProperty(exports, "NotificationsEndpoint", { enumerable: true, get: function () { return NotificationsEndpoint_1.NotificationsEndpoint; } });
216
216
  var PlatformEndpoint_1 = require("./Service/PlatformEndpoint");
217
217
  Object.defineProperty(exports, "PlatformEndpoint", { enumerable: true, get: function () { return PlatformEndpoint_1.PlatformEndpoint; } });
218
- var ProjectDeployEndpoint_1 = require("./Service/ProjectDeployEndpoint");
219
- Object.defineProperty(exports, "ProjectDeployEndpoint", { enumerable: true, get: function () { return ProjectDeployEndpoint_1.ProjectDeployEndpoint; } });
218
+ var CodeDeployEndpoint_1 = require("./Service/CodeDeployEndpoint");
219
+ Object.defineProperty(exports, "CodeDeployEndpoint", { enumerable: true, get: function () { return CodeDeployEndpoint_1.CodeDeployEndpoint; } });
220
220
  var ProjectEnvironmentEndpoint_1 = require("./Service/ProjectEnvironmentEndpoint");
221
221
  Object.defineProperty(exports, "ProjectEnvironmentEndpoint", { enumerable: true, get: function () { return ProjectEnvironmentEndpoint_1.ProjectEnvironmentEndpoint; } });
222
222
  var QueueEndpoint_1 = require("./Service/QueueEndpoint");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.68",
3
+ "version": "1.9.70",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectDeploy = void 0;
4
- const ProjectDeployStatus_1 = require("./ProjectDeployStatus");
5
- const ProjectDeployCommit_1 = require("./ProjectDeployCommit");
6
- const Utils_1 = require("../../Utils");
7
- class ProjectDeploy {
8
- constructor() {
9
- this.started = null;
10
- this.finished = null;
11
- this.status = ProjectDeployStatus_1.ProjectDeployStatus.Unknown;
12
- this.bytes = null;
13
- this.commits = [];
14
- this.path = null;
15
- this.commitHash = null;
16
- this.errors = null;
17
- }
18
- static parse(rawProjectDeploy) {
19
- const projectDeploy = new ProjectDeploy();
20
- projectDeploy.id = rawProjectDeploy.id.toString();
21
- projectDeploy.platformId = rawProjectDeploy.platform;
22
- projectDeploy.buildStrategyId = rawProjectDeploy.build_strategy;
23
- projectDeploy.userId = rawProjectDeploy.user;
24
- projectDeploy.requested = Utils_1.Utils.parseRawDate(rawProjectDeploy.requested);
25
- projectDeploy.started = rawProjectDeploy.started === null ? null : Utils_1.Utils.parseRawDate(rawProjectDeploy.started);
26
- projectDeploy.finished = rawProjectDeploy.finished === null ? null : Utils_1.Utils.parseRawDate(rawProjectDeploy.finished);
27
- projectDeploy.status = ProjectDeployStatus_1.ProjectDeployStatus.fromString(rawProjectDeploy.status);
28
- projectDeploy.bytes = rawProjectDeploy.bytes === null ? null : parseInt(rawProjectDeploy.bytes);
29
- projectDeploy.path = rawProjectDeploy.path;
30
- projectDeploy.commitHash = rawProjectDeploy.commit_hash;
31
- const rawProjectDeployCommits = rawProjectDeploy.commits;
32
- for (let rawProjectDeployCommit of rawProjectDeployCommits) {
33
- let projectDeployCommit = new ProjectDeployCommit_1.ProjectDeployCommit();
34
- projectDeployCommit.hash = rawProjectDeployCommit.commit_hash;
35
- projectDeployCommit.date = Utils_1.Utils.parseRawDate(rawProjectDeployCommit.commit_date);
36
- projectDeployCommit.message = rawProjectDeployCommit.commit_message;
37
- projectDeployCommit.authorName = rawProjectDeployCommit.commit_author_name;
38
- projectDeployCommit.authorEmail = rawProjectDeployCommit.commit_author_email;
39
- projectDeploy.commits.push(projectDeployCommit);
40
- }
41
- projectDeploy.errors = rawProjectDeploy.errors;
42
- return projectDeploy;
43
- }
44
- }
45
- exports.ProjectDeploy = ProjectDeploy;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectDeployStatus = void 0;
4
- const Utils_1 = require("../../Utils");
5
- var ProjectDeployStatus;
6
- (function (ProjectDeployStatus) {
7
- ProjectDeployStatus["Unknown"] = "unknown";
8
- ProjectDeployStatus["Pending"] = "pending";
9
- ProjectDeployStatus["Canceled"] = "canceled";
10
- ProjectDeployStatus["Running"] = "running";
11
- ProjectDeployStatus["Failed"] = "failed";
12
- ProjectDeployStatus["Stopped"] = "stopped";
13
- ProjectDeployStatus["Complete"] = "complete";
14
- })(ProjectDeployStatus || (exports.ProjectDeployStatus = ProjectDeployStatus = {}));
15
- (function (ProjectDeployStatus) {
16
- function fromString(input) {
17
- const result = Utils_1.Utils.parseEnum(input, ProjectDeployStatus);
18
- if (result === null) {
19
- throw new Error('Unable to parse ProjectDeployStatus from string: Unknown ProjectDeployStatus "' + input + '"');
20
- }
21
- return result;
22
- }
23
- ProjectDeployStatus.fromString = fromString;
24
- })(ProjectDeployStatus || (exports.ProjectDeployStatus = ProjectDeployStatus = {}));
@@ -1,9 +0,0 @@
1
- import { Endpoint } from './Endpoint';
2
- import { ProjectDeploy } from '../Model/Project/ProjectDeploy';
3
- import { CollectionResult } from '../Model/Result/CollectionResult';
4
- export declare class ProjectDeployEndpoint extends Endpoint {
5
- getById(deployId: string): Promise<ProjectDeploy | null>;
6
- getLatestDeploy(codeSourceId: string): Promise<ProjectDeploy | null>;
7
- getByCodeSource(codeSourceId: string): Promise<CollectionResult<ProjectDeploy>>;
8
- requestDeploy(codeSourceId: string): Promise<ProjectDeploy>;
9
- }