attlaz-client 1.8.29 → 1.8.30

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.
@@ -2,6 +2,7 @@ import { Endpoint } from './Endpoint';
2
2
  import { ProjectDeploy } from '../Model/Project/ProjectDeploy';
3
3
  export declare class ProjectDeployEndpoint extends Endpoint {
4
4
  getById(deployId: string): Promise<ProjectDeploy | null>;
5
+ getLatestDeploy(codeSourceId: string): Promise<ProjectDeploy | null>;
5
6
  getByCodeSource(codeSourceId: string): Promise<ProjectDeploy[]>;
6
7
  requestDeploy(codeSourceId: string): Promise<any>;
7
8
  }
@@ -24,6 +24,24 @@ class ProjectDeployEndpoint extends Endpoint_1.Endpoint {
24
24
  throw error;
25
25
  }
26
26
  }
27
+ async getLatestDeploy(codeSourceId) {
28
+ try {
29
+ const rawProjectDeploy = await this.httpClient.request('/codesources/' + codeSourceId + '/latestdeploy');
30
+ if (Utils_1.Utils.isNullOrUndefined(rawProjectDeploy)) {
31
+ return null;
32
+ }
33
+ return ProjectDeploy_1.ProjectDeploy.parse(rawProjectDeploy);
34
+ }
35
+ catch (error) {
36
+ if (error.code === HttpClient_1.HttpClient.HTTP_NOTFOUND) {
37
+ return null;
38
+ }
39
+ if (this.httpClient.isDebugEnabled()) {
40
+ console.error('Failed to load project deploy by id', error);
41
+ }
42
+ throw error;
43
+ }
44
+ }
27
45
  async getByCodeSource(codeSourceId) {
28
46
  try {
29
47
  const rawProjectDeploys = await this.httpClient.request('/codesources/' + codeSourceId + '/deploys');
@@ -5,7 +5,7 @@ import { CodeSource } from '../Model/Deployment/CodeSource';
5
5
  export declare class SourcesAccountEndpoint extends Endpoint {
6
6
  getAllCodeSourceAccounts(): Promise<CodeSourceAccount[]>;
7
7
  getCodeSourceAccountById(id: string): Promise<CodeSourceAccount | null>;
8
- getCodeSourceById(id: string): Promise<CodeSource | null>;
8
+ getCodeSourceById(codeSourceId: string): Promise<CodeSource | null>;
9
9
  getRepositories(codeSourceAccountId: string): Promise<SourcesAccountRepository[]>;
10
10
  getRepositoryBranches(codeSourceAccountId: string, repositoryKey: string): Promise<string[]>;
11
11
  }
@@ -39,9 +39,9 @@ class SourcesAccountEndpoint extends Endpoint_1.Endpoint {
39
39
  // }
40
40
  // return sourcesAccounts;
41
41
  }
42
- async getCodeSourceById(id) {
42
+ async getCodeSourceById(codeSourceId) {
43
43
  try {
44
- const rawCodeSource = await this.httpClient.request('codesources/' + id);
44
+ const rawCodeSource = await this.httpClient.request('/codesources/' + codeSourceId);
45
45
  if (rawCodeSource === null) {
46
46
  return null;
47
47
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.8.29";
1
+ export declare const VERSION = "1.8.30";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "1.8.29";
4
+ exports.VERSION = "1.8.30";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.8.29",
3
+ "version": "1.8.30",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",