attlaz-client 1.9.10 → 1.9.11

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.
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProjectDeploy = void 0;
4
4
  const ProjectDeployStatus_1 = require("./ProjectDeployStatus");
5
5
  const ProjectDeployCommit_1 = require("./ProjectDeployCommit");
6
- const Utils_1 = require("../../Utils");
7
6
  class ProjectDeploy {
8
7
  constructor() {
9
8
  this.status = ProjectDeployStatus_1.ProjectDeployStatus.Unknown;
@@ -14,25 +13,23 @@ class ProjectDeploy {
14
13
  const projectDeploy = new ProjectDeploy();
15
14
  projectDeploy.id = rawProjectDeploy.id.toString();
16
15
  projectDeploy.platformId = rawProjectDeploy.platformId;
17
- projectDeploy.buildStrategyId = rawProjectDeploy.buildStrategyId;
18
- projectDeploy.userId = rawProjectDeploy.userId;
16
+ projectDeploy.buildStrategyId = rawProjectDeploy.build_strategy;
17
+ projectDeploy.userId = rawProjectDeploy.user;
19
18
  projectDeploy.requested = new Date(rawProjectDeploy.requested);
20
19
  projectDeploy.started = new Date(rawProjectDeploy.started);
21
20
  projectDeploy.finished = new Date(rawProjectDeploy.finished);
22
21
  projectDeploy.status = ProjectDeployStatus_1.ProjectDeployStatus.fromString(rawProjectDeploy.status);
23
- if (!Utils_1.Utils.isNullOrUndefined(rawProjectDeploy.bytes)) {
24
- projectDeploy.bytes = parseInt(rawProjectDeploy.bytes);
25
- }
22
+ projectDeploy.bytes = parseInt(rawProjectDeploy.bytes);
26
23
  projectDeploy.path = rawProjectDeploy.path;
27
24
  projectDeploy.commitHash = rawProjectDeploy.commit_hash;
28
25
  const rawProjectDeployCommits = rawProjectDeploy.commits;
29
26
  for (let rawProjectDeployCommit of rawProjectDeployCommits) {
30
27
  let projectDeployCommit = new ProjectDeployCommit_1.ProjectDeployCommit();
31
- projectDeployCommit.commit_hash = rawProjectDeployCommit.commit_hash;
32
- projectDeployCommit.commit_date = new Date(rawProjectDeployCommit.commit_date);
33
- projectDeployCommit.commit_message = rawProjectDeployCommit.commit_message;
34
- projectDeployCommit.commit_author_name = rawProjectDeployCommit.commit_author_name;
35
- projectDeployCommit.commit_author_email = rawProjectDeployCommit.commit_author_email;
28
+ projectDeployCommit.hash = rawProjectDeployCommit.commit_hash;
29
+ projectDeployCommit.date = new Date(rawProjectDeployCommit.commit_date);
30
+ projectDeployCommit.message = rawProjectDeployCommit.commit_message;
31
+ projectDeployCommit.authorName = rawProjectDeployCommit.commit_author_name;
32
+ projectDeployCommit.authorMail = rawProjectDeployCommit.commit_author_email;
36
33
  projectDeploy.commits.push(projectDeployCommit);
37
34
  }
38
35
  projectDeploy.errors = rawProjectDeploy.errors;
@@ -1,7 +1,7 @@
1
1
  export declare class ProjectDeployCommit {
2
- commit_hash: string;
3
- commit_date: Date;
4
- commit_message: string;
5
- commit_author_name: string;
6
- commit_author_email: string;
2
+ hash: string;
3
+ date: Date;
4
+ message: string;
5
+ authorName: string;
6
+ authorMail: string;
7
7
  }
@@ -14,21 +14,11 @@ class ProjectEnvironment {
14
14
  const projectEnvironment = new ProjectEnvironment();
15
15
  projectEnvironment.id = rawProjectEnvironment.id.toString();
16
16
  projectEnvironment.key = rawProjectEnvironment.key;
17
- if (rawProjectEnvironment.project !== undefined) {
18
- projectEnvironment.projectId = rawProjectEnvironment.project;
19
- }
20
- else {
21
- projectEnvironment.projectId = rawProjectEnvironment.projectId;
22
- }
17
+ projectEnvironment.projectId = rawProjectEnvironment.project;
23
18
  projectEnvironment.name = rawProjectEnvironment.name;
24
- projectEnvironment.codeSourceId = rawProjectEnvironment.codeSourceId;
25
- if (rawProjectEnvironment.parent !== undefined) {
26
- projectEnvironment.parentId = rawProjectEnvironment.parent;
27
- }
28
- else {
29
- projectEnvironment.parentId = rawProjectEnvironment.parentId;
30
- }
31
- projectEnvironment.isLocal = Utils_1.Utils.isTrue(rawProjectEnvironment.isLocal);
19
+ projectEnvironment.codeSourceId = rawProjectEnvironment.code_source;
20
+ projectEnvironment.parentId = rawProjectEnvironment.parent;
21
+ projectEnvironment.isLocal = Utils_1.Utils.isTrue(rawProjectEnvironment.is_local);
32
22
  projectEnvironment.state = State_1.State.fromString(rawProjectEnvironment.state);
33
23
  return projectEnvironment;
34
24
  }
@@ -11,12 +11,12 @@ class UserAuthProvider {
11
11
  static parse(raw) {
12
12
  const userAuthProvider = new UserAuthProvider();
13
13
  userAuthProvider.id = raw.id;
14
- userAuthProvider.userId = raw.userId;
14
+ userAuthProvider.userId = raw.user;
15
15
  userAuthProvider.provider = raw.provider;
16
- userAuthProvider.providerUserId = raw.providerUserId;
17
- userAuthProvider.providerUserEmail = raw.providerUserEmail;
16
+ userAuthProvider.providerUserId = raw.provider_user;
17
+ userAuthProvider.providerUserEmail = raw.provider_user_email;
18
18
  if (raw.lastUsed !== null && raw.lastUsed !== undefined) {
19
- userAuthProvider.lastUsed = Utils_1.Utils.parseRawDate(raw.lastUsed);
19
+ userAuthProvider.lastUsed = Utils_1.Utils.parseRawDate(raw.last_used);
20
20
  }
21
21
  userAuthProvider.state = State_1.State.fromString(raw.state);
22
22
  return userAuthProvider;
@@ -11,10 +11,10 @@ class Platform {
11
11
  const platform = new Platform();
12
12
  platform.id = raw.id;
13
13
  platform.name = raw.name;
14
- platform.languageId = raw.languageId;
14
+ platform.languageId = raw.language;
15
15
  platform.released = Utils_1.Utils.parseRawDate(raw.released);
16
- platform.endOfSupport = Utils_1.Utils.parseRawDate(raw.endOfSupport);
17
- platform.endOfLife = Utils_1.Utils.parseRawDate(raw.endOfLife);
16
+ platform.endOfSupport = Utils_1.Utils.parseRawDate(raw.end_of_support);
17
+ platform.endOfLife = Utils_1.Utils.parseRawDate(raw.end_of_life);
18
18
  platform.state = State_1.State.fromString(raw.state);
19
19
  return platform;
20
20
  }
@@ -10,11 +10,11 @@ class PlatformImage {
10
10
  static parse(raw) {
11
11
  const platformImage = new PlatformImage();
12
12
  platformImage.id = raw.id;
13
- platformImage.platformId = raw.platformId;
13
+ platformImage.platformId = raw.platform;
14
14
  platformImage.image = raw.image;
15
15
  platformImage.version = raw.version;
16
- platformImage.languageVersion = raw.languageVersion;
17
- platformImage.buildDate = Utils_1.Utils.parseRawDate(raw.buildDate);
16
+ platformImage.languageVersion = raw.language_version;
17
+ platformImage.buildDate = Utils_1.Utils.parseRawDate(raw.build_date);
18
18
  platformImage.state = State_1.State.fromString(raw.state);
19
19
  return platformImage;
20
20
  }
@@ -7,7 +7,7 @@ const WorkerInstanceState_1 = require("./WorkerInstanceState");
7
7
  class Worker {
8
8
  static parse(raw) {
9
9
  const worker = new Worker();
10
- worker.projectEnvironment = raw.projectEnvironment;
10
+ worker.projectEnvironment = raw.project_environment;
11
11
  worker.state = WorkerState_1.WorkerState.fromString(raw.state);
12
12
  worker.version = raw.version;
13
13
  worker.scale = raw.scale;
@@ -18,7 +18,7 @@ class Worker {
18
18
  instance.state = WorkerInstanceState_1.WorkerInstanceState.fromString(rawInstance.state);
19
19
  worker.instances.push(instance);
20
20
  }
21
- worker.memoryLimit = raw.memoryLimit;
21
+ worker.memoryLimit = raw.memory_limit;
22
22
  return worker;
23
23
  }
24
24
  }
@@ -9,9 +9,9 @@ export declare class WorkerConfig {
9
9
  static KEY_API_ENDPOINT: string;
10
10
  static KEY_API_CLIENT_ID: string;
11
11
  static KEY_API_CLIENT_SECRET: string;
12
- projectEnvironment: string;
12
+ projectEnvironmentId: string;
13
13
  key: string;
14
14
  value: DataValueValue | null;
15
- constructor(project_environment: string, key: string, value: DataValueValue | null);
15
+ constructor(projectEnvironmentId: string, key: string, value: DataValueValue | null);
16
16
  static parse(raw: any): WorkerConfig;
17
17
  }
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkerConfig = void 0;
4
4
  class WorkerConfig {
5
- constructor(project_environment, key, value) {
6
- this.projectEnvironment = project_environment;
5
+ constructor(projectEnvironmentId, key, value) {
6
+ this.projectEnvironmentId = projectEnvironmentId;
7
7
  this.key = key;
8
8
  this.value = value;
9
9
  }
10
10
  static parse(raw) {
11
- return new WorkerConfig(raw.projectEnvironment, raw.key, raw.value);
11
+ return new WorkerConfig(raw.project_environment, raw.key, raw.value);
12
12
  }
13
13
  }
14
14
  exports.WorkerConfig = WorkerConfig;
@@ -19,7 +19,7 @@ class WorkerConfigEndpoint extends Endpoint_1.Endpoint {
19
19
  }
20
20
  async save(workerConfig) {
21
21
  try {
22
- let url = '/projectenvironments/' + workerConfig.projectEnvironment + '/workerconfiguration';
22
+ let url = '/projectenvironments/' + workerConfig.projectEnvironmentId + '/workerconfiguration';
23
23
  const result = await this.requestObject(url, workerConfig, WorkerConfig_1.WorkerConfig.parse, 'POST');
24
24
  const createdWorkerConfig = result.getData();
25
25
  if (createdWorkerConfig === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.10",
3
+ "version": "1.9.11",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",