attlaz-client 1.41.0 → 1.42.0

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
@@ -21,6 +21,7 @@ import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
21
21
  import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
22
22
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
23
23
  import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
24
+ import { QueueSpecificationEndpoint } from './Service/QueueSpecificationEndpoint.js';
24
25
  import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
25
26
  import { SearchEndpoint } from './Service/SearchEndpoint.js';
26
27
  import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
@@ -82,6 +83,7 @@ export declare class Client {
82
83
  getUserActionEndpoint(): UserActionEndpoint;
83
84
  getAccessTokenEndpoint(): AccessTokenEndpoint;
84
85
  getCollectionsEndpoint(): CollectionsEndpoint;
86
+ getQueueSpecificationEndpointEndpoint(): QueueSpecificationEndpoint;
85
87
  getFirewallEndpoint(): FirewallEndpoint;
86
88
  private getEndpoint;
87
89
  getVersion(): string;
package/dist/Client.js CHANGED
@@ -22,6 +22,7 @@ import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
22
22
  import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
23
23
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
24
24
  import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
25
+ import { QueueSpecificationEndpoint } from './Service/QueueSpecificationEndpoint.js';
25
26
  import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
26
27
  import { SearchEndpoint } from './Service/SearchEndpoint.js';
27
28
  import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
@@ -68,6 +69,7 @@ export class Client {
68
69
  WorkspaceEndpoint,
69
70
  WorkspaceMemberEndpoint,
70
71
  CollectionsEndpoint,
72
+ QueueSpecificationEndpoint,
71
73
  };
72
74
  apiEndpoint = 'https://api.attlaz.com';
73
75
  parseConfig(config) {
@@ -217,6 +219,9 @@ export class Client {
217
219
  getCollectionsEndpoint() {
218
220
  return this.getEndpoint('collections', this.Store.CollectionsEndpoint);
219
221
  }
222
+ getQueueSpecificationEndpointEndpoint() {
223
+ return this.getEndpoint('queue_specification', this.Store.QueueSpecificationEndpoint);
224
+ }
220
225
  // TODO: this should be in a separate API?
221
226
  getFirewallEndpoint() {
222
227
  return this.getEndpoint('firewall', this.Store.FirewallEndpoint);
@@ -170,9 +170,6 @@ export class OAuthClient {
170
170
  if (this.isNodeEnvironment()) {
171
171
  headers['User-Agent'] = 'Attlaz Http/' + VERSION;
172
172
  }
173
- if (this.version !== null) {
174
- headers['Attlaz-API-Version'] = this.version;
175
- }
176
173
  this.defaultHeaders = headers;
177
174
  }
178
175
  addDefaultHeader(header, value) {
@@ -209,6 +206,9 @@ export class OAuthClient {
209
206
  const url = this.getApiEndpointUrl(action);
210
207
  let requestData = new HttpClientRequest(url, method);
211
208
  requestData.headers = this.getDefaultHeaders();
209
+ if (this.version !== null) {
210
+ requestData.setHeader('Attlaz-API-Version', this.version);
211
+ }
212
212
  if ((method === 'POST' || method === 'DELETE' || method === 'PUT') && parameters !== null && parameters !== undefined) {
213
213
  if (typeof parameters === 'object') {
214
214
  requestData.body = JsonSerializable.stringify(parameters);
@@ -1,5 +1,5 @@
1
- import { StateAware } from '../StateAware.js';
2
1
  import { State } from '../State.js';
2
+ import { StateAware } from '../StateAware.js';
3
3
  export declare class CodeSourceBuildStrategy implements StateAware {
4
4
  id: string;
5
5
  name: string;
@@ -0,0 +1,10 @@
1
+ import { State } from '../State.js';
2
+ export declare class QueueSpecification {
3
+ id: string;
4
+ name: string;
5
+ environment: string;
6
+ type: string;
7
+ consumerCount: number;
8
+ state: State;
9
+ static parse(raw: any): QueueSpecification;
10
+ }
@@ -0,0 +1,20 @@
1
+ import { State } from '../State.js';
2
+ export class QueueSpecification {
3
+ id;
4
+ name;
5
+ environment;
6
+ type = 'flow_run';
7
+ // TODO: is this the required consumer count? we should be able to configure this with minimum, maximum, etc (auto scaling)
8
+ consumerCount;
9
+ state = State.Active;
10
+ static parse(raw) {
11
+ const queueSpecification = new QueueSpecification();
12
+ queueSpecification.id = raw.id;
13
+ queueSpecification.name = raw.name;
14
+ queueSpecification.environment = raw.environment;
15
+ queueSpecification.type = raw.type;
16
+ // codeDeployStrategy.languageId = raw.language;
17
+ queueSpecification.state = State.fromString(raw.state);
18
+ return queueSpecification;
19
+ }
20
+ }
@@ -0,0 +1,5 @@
1
+ import { QueueSpecification } from '../Model/Infrastructure/QueueSpecification.js';
2
+ import { Endpoint } from './Endpoint.js';
3
+ export declare class QueueSpecificationEndpoint extends Endpoint {
4
+ getById(queueSpecificationId: string): Promise<QueueSpecification | null>;
5
+ }
@@ -0,0 +1,9 @@
1
+ import { QueueSpecification } from '../Model/Infrastructure/QueueSpecification.js';
2
+ import { Endpoint } from './Endpoint.js';
3
+ export class QueueSpecificationEndpoint extends Endpoint {
4
+ async getById(queueSpecificationId) {
5
+ const cmd = '/infrastructure/queue-specification/' + queueSpecificationId;
6
+ const result = await this.requestObject(cmd, null, QueueSpecification.parse);
7
+ return result.getData();
8
+ }
9
+ }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.40.2";
1
+ export declare const VERSION = "1.42.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.40.2";
1
+ export const VERSION = "1.42.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.41.0",
3
+ "version": "1.42.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -48,23 +48,23 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^30.0.0",
51
- "@types/node": "^24.10.0",
51
+ "@types/node": "^24.10.9",
52
52
  "@typescript-eslint/eslint-plugin": "^8.1.0",
53
53
  "@typescript-eslint/parser": "^8.1.0",
54
54
  "dotenv": "^17.2.3",
55
- "eslint": "^9.39.1",
56
- "eslint-config-attlaz-base": "^1.4.0",
55
+ "eslint": "^9.39.2",
56
+ "eslint-config-attlaz-base": "^1.5.1",
57
57
  "eslint-import-resolver-typescript": "^4.4.4",
58
58
  "eslint-plugin-import": "^2.32.0",
59
59
  "eslint-plugin-jsdoc": "^51.4.1",
60
60
  "eslint-plugin-prefer-arrow": "^1.2.3",
61
61
  "eslint-plugin-promise": "^7.2.1",
62
62
  "jest": "^30.2.0",
63
- "rimraf": "^6.1.0",
63
+ "rimraf": "^6.1.2",
64
64
  "rollup-plugin-commonjs": "^10.1.0",
65
65
  "rollup-plugin-node-resolve": "^5.2.0",
66
66
  "rollup-plugin-typescript": "^1.0.1",
67
- "ts-jest": "^29.4.5",
67
+ "ts-jest": "^29.4.6",
68
68
  "typescript": "^5.9.3"
69
69
  },
70
70
  "directories": {