attlaz-client 1.9.37 → 1.9.38

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.
@@ -0,0 +1,9 @@
1
+ import { StateAware } from '../StateAware';
2
+ import { State } from '../State';
3
+ export declare class CodeDeployStrategy implements StateAware {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ state: State;
8
+ static parse(raw: any): CodeDeployStrategy;
9
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeDeployStrategy = void 0;
4
+ const State_1 = require("../State");
5
+ class CodeDeployStrategy {
6
+ constructor() {
7
+ this.state = State_1.State.Active;
8
+ }
9
+ static parse(raw) {
10
+ let codeDeployStrategy = new CodeDeployStrategy();
11
+ codeDeployStrategy.id = raw.id;
12
+ codeDeployStrategy.name = raw.name;
13
+ codeDeployStrategy.description = raw.description;
14
+ codeDeployStrategy.state = State_1.State.fromString(raw.state);
15
+ return codeDeployStrategy;
16
+ }
17
+ }
18
+ exports.CodeDeployStrategy = CodeDeployStrategy;
@@ -0,0 +1,6 @@
1
+ import { Endpoint } from './Endpoint';
2
+ import { CollectionResult } from '../Model/Result/CollectionResult';
3
+ import { CodeDeployStrategy } from '../Model/Deployment/CodeDeployStrategy';
4
+ export declare class CodeSourceDeployStrategyEndpoint extends Endpoint {
5
+ getAll(workspaceId: string): Promise<CollectionResult<CodeDeployStrategy>>;
6
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeSourceDeployStrategyEndpoint = void 0;
4
+ const Endpoint_1 = require("./Endpoint");
5
+ const CodeDeployStrategy_1 = require("../Model/Deployment/CodeDeployStrategy");
6
+ class CodeSourceDeployStrategyEndpoint extends Endpoint_1.Endpoint {
7
+ async getAll(workspaceId) {
8
+ let cmd = '/workspaces/' + workspaceId + '/codedeploystrategies';
9
+ const result = await this.requestCollection(cmd, null, CodeDeployStrategy_1.CodeDeployStrategy.parse);
10
+ return result;
11
+ return result;
12
+ }
13
+ }
14
+ exports.CodeSourceDeployStrategyEndpoint = CodeSourceDeployStrategyEndpoint;
@@ -3,6 +3,6 @@ import { Platform } from '../Model/Worker/Platform';
3
3
  import { PlatformImage } from '../Model/Worker/PlatformImage';
4
4
  import { CollectionResult } from '../Model/Result/CollectionResult';
5
5
  export declare class PlatformEndpoint extends Endpoint {
6
- getAll(): Promise<CollectionResult<Platform>>;
7
- getPlatformImages(platformId: string): Promise<CollectionResult<PlatformImage>>;
6
+ getAll(workspaceId: string): Promise<CollectionResult<Platform>>;
7
+ getPlatformImages(workspaceId: string, platformId: string): Promise<CollectionResult<PlatformImage>>;
8
8
  }
@@ -5,13 +5,13 @@ const Endpoint_1 = require("./Endpoint");
5
5
  const Platform_1 = require("../Model/Worker/Platform");
6
6
  const PlatformImage_1 = require("../Model/Worker/PlatformImage");
7
7
  class PlatformEndpoint extends Endpoint_1.Endpoint {
8
- async getAll() {
9
- let cmd = '/platforms';
8
+ async getAll(workspaceId) {
9
+ let cmd = '/workspaces/' + workspaceId + '/platforms';
10
10
  const result = await this.requestCollection(cmd, null, Platform_1.Platform.parse);
11
11
  return result;
12
12
  }
13
- async getPlatformImages(platformId) {
14
- let cmd = '/platforms/' + platformId + '/images';
13
+ async getPlatformImages(workspaceId, platformId) {
14
+ let cmd = '/workspaces/' + workspaceId + '/platforms/' + platformId + '/images';
15
15
  const result = await this.requestCollection(cmd, null, PlatformImage_1.PlatformImage.parse);
16
16
  return result;
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.37",
3
+ "version": "1.9.38",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",