attlaz-client 1.19.3 → 1.19.4

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,9 +2,10 @@ import { State } from '../State.js';
2
2
  import { StateAware } from '../StateAware.js';
3
3
  export declare class PlatformLanguage implements StateAware {
4
4
  id: string;
5
+ key: string;
5
6
  name: string;
6
7
  description: string;
7
8
  state: State;
8
9
  constructor(id: string, name: string);
9
- static parse(rawLanguage: any): PlatformLanguage;
10
+ static parse(rawLanguage: Record<string, unknown>): PlatformLanguage;
10
11
  }
@@ -1,6 +1,7 @@
1
1
  import { State } from '../State.js';
2
2
  export class PlatformLanguage {
3
3
  id;
4
+ key;
4
5
  name;
5
6
  description = '';
6
7
  state = State.Active;
@@ -10,6 +11,7 @@ export class PlatformLanguage {
10
11
  }
11
12
  static parse(rawLanguage) {
12
13
  const language = new PlatformLanguage(rawLanguage.id, rawLanguage.name);
14
+ language.key = rawLanguage.key;
13
15
  language.description = rawLanguage.description;
14
16
  language.state = State.fromString(rawLanguage.state);
15
17
  return language;
@@ -1,6 +1,6 @@
1
- import { Endpoint } from './Endpoint.js';
2
1
  import { PlatformLanguage } from '../Model/Project/PlatformLanguage.js';
3
2
  import { CollectionResult } from '../Model/Result/CollectionResult.js';
3
+ import { Endpoint } from './Endpoint.js';
4
4
  export declare class PlatformLanguageEndpoint extends Endpoint {
5
- getAll(): Promise<CollectionResult<PlatformLanguage>>;
5
+ getAll(workspaceId: string): Promise<CollectionResult<PlatformLanguage>>;
6
6
  }
@@ -1,8 +1,7 @@
1
- import { Endpoint } from './Endpoint.js';
2
1
  import { PlatformLanguage } from '../Model/Project/PlatformLanguage.js';
2
+ import { Endpoint } from './Endpoint.js';
3
3
  export class PlatformLanguageEndpoint extends Endpoint {
4
- async getAll() {
5
- const result = await this.requestCollection('/platformlanguages', PlatformLanguage.parse);
6
- return result;
4
+ async getAll(workspaceId) {
5
+ return await this.requestCollection('/workspaces/' + workspaceId + '/platforms/languages', PlatformLanguage.parse);
7
6
  }
8
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.19.3",
3
+ "version": "1.19.4",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",