@attlaz/client 1.125.0 → 1.127.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.
@@ -17,9 +17,16 @@ export declare class CrawlJob {
17
17
  * it never looked for most products, so its silence about them proves nothing.
18
18
  */
19
19
  isPartial: boolean;
20
- /** Progress (populated by list endpoints): total pages and how many have been processed. */
20
+ /**
21
+ * Progress (populated by list endpoints): total pages and how many reached a terminal state.
22
+ *
23
+ * `failed` is part of `processed`, not separate from it — a finished crawl has
24
+ * `processed === total` whether or not pages failed, so `failed > 0` is the only thing that
25
+ * distinguishes a crawl that lost pages from a clean one.
26
+ */
21
27
  total: number;
22
28
  processed: number;
29
+ failed: number;
23
30
  constructor(id: string, vendorId: string);
24
31
  static parse(raw: ApiRecord): CrawlJob;
25
32
  }
@@ -15,9 +15,16 @@ export class CrawlJob {
15
15
  * it never looked for most products, so its silence about them proves nothing.
16
16
  */
17
17
  isPartial = false;
18
- /** Progress (populated by list endpoints): total pages and how many have been processed. */
18
+ /**
19
+ * Progress (populated by list endpoints): total pages and how many reached a terminal state.
20
+ *
21
+ * `failed` is part of `processed`, not separate from it — a finished crawl has
22
+ * `processed === total` whether or not pages failed, so `failed > 0` is the only thing that
23
+ * distinguishes a crawl that lost pages from a clean one.
24
+ */
19
25
  total = 0;
20
26
  processed = 0;
27
+ failed = 0;
21
28
  constructor(id, vendorId) {
22
29
  this.id = id;
23
30
  this.vendorId = vendorId;
@@ -35,6 +42,7 @@ export class CrawlJob {
35
42
  job.isPartial = raw.is_partial === true;
36
43
  job.total = Number(raw.total ?? 0);
37
44
  job.processed = Number(raw.processed ?? 0);
45
+ job.failed = Number(raw.failed ?? 0);
38
46
  return job;
39
47
  }
40
48
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether we could see a thing, not whether it is well — verdicts live in `health_alert`.
3
+ * Conflating `missing` (we asked, it is not there) with `unreachable` (we could not ask) reported
4
+ * a live queue as deleted whenever the broker call failed.
5
+ */
6
+ export type ObservedState = 'present' | 'missing' | 'unreachable';
@@ -0,0 +1 @@
1
+ export {};
@@ -1,11 +1,26 @@
1
+ import { ObservedState } from './ObservedState.js';
2
+ /** Kept apart from the counters: a faulted queue with nothing on it looks exactly like an idle one. */
3
+ export type QueueCondition = 'ok' | 'faulted' | 'unknown';
1
4
  export declare class QueueStatus {
2
- name: string;
3
- state: 'nonexisting' | 'running';
4
- vhost: string;
5
- messages_ready: number;
6
- messages_handling: number;
7
- message_publish_rate: number;
8
- message_handling_rate: number;
5
+ /** Identity of what was observed, so a stored status is readable without the query behind it. */
6
+ name: string | null;
7
+ state: ObservedState;
8
+ /** Null unless `state` is 'present'. */
9
+ condition: QueueCondition | null;
10
+ /** Queued, not yet taken. */
11
+ messages_waiting: number;
12
+ /** Taken by a runner, not yet acknowledged. */
13
+ messages_processing: number;
14
+ messages_arriving_per_second: number;
15
+ /** Acknowledgements — work finished, not merely handed out. */
16
+ messages_completed_per_second: number;
17
+ /** Redeliveries: a runner died mid-job. A failed flow run is recorded elsewhere; this is not. */
18
+ messages_retried_per_second: number;
19
+ /** Compared against the pool's ready count. */
9
20
  consumers: number;
10
- date: Date;
21
+ /**
22
+ * Once stored this is the FIRST time the value was seen: `isEqual` blanks it, and an unchanged
23
+ * status only bumps the row's `updated_at`. That is "last confirmed"; this is "unchanged since".
24
+ */
25
+ observed_at: Date;
11
26
  }
@@ -1,11 +1,23 @@
1
1
  export class QueueStatus {
2
- name;
2
+ /** Identity of what was observed, so a stored status is readable without the query behind it. */
3
+ name = null;
3
4
  state;
4
- vhost;
5
- messages_ready = 0;
6
- messages_handling = 0;
7
- message_publish_rate = 0;
8
- message_handling_rate = 0;
5
+ /** Null unless `state` is 'present'. */
6
+ condition = null;
7
+ /** Queued, not yet taken. */
8
+ messages_waiting = 0;
9
+ /** Taken by a runner, not yet acknowledged. */
10
+ messages_processing = 0;
11
+ messages_arriving_per_second = 0;
12
+ /** Acknowledgements — work finished, not merely handed out. */
13
+ messages_completed_per_second = 0;
14
+ /** Redeliveries: a runner died mid-job. A failed flow run is recorded elsewhere; this is not. */
15
+ messages_retried_per_second = 0;
16
+ /** Compared against the pool's ready count. */
9
17
  consumers = 0;
10
- date;
18
+ /**
19
+ * Once stored this is the FIRST time the value was seen: `isEqual` blanks it, and an unchanged
20
+ * status only bumps the row's `updated_at`. That is "last confirmed"; this is "unchanged since".
21
+ */
22
+ observed_at;
11
23
  }
@@ -1,9 +1,34 @@
1
+ import { ObservedState } from './ObservedState.js';
2
+ /**
3
+ * The counts cannot express this: a new runner that never becomes ready leaves the old ones
4
+ * serving, so `desired` and `ready` still agree while the deploy has failed.
5
+ */
6
+ export type RunnerRollout = 'settled' | 'in_progress' | 'failed';
7
+ /**
8
+ * A pool has four rungs — configured min/max → `desired` → `ready` → the queue's `consumers` — and
9
+ * each gap means something different. The last lives on QueueStatus, so "how many runners are busy"
10
+ * needs both.
11
+ */
1
12
  export declare class RunnersStatus {
2
- state: 'nonexisting' | 'running';
3
- total: number;
4
- running: number;
5
- down: number;
6
- memory_limit: number | null;
7
- cpu_limit: number | null;
8
- date: Date;
13
+ /** Runners are found by label, so this is the only record of which deployment answered. */
14
+ name: string | null;
15
+ state: ObservedState;
16
+ /** What the deployment asks for, not what the pool is configured for. Differing means it was
17
+ * never redeployed. */
18
+ desired: number;
19
+ ready: number;
20
+ rollout: RunnerRollout;
21
+ /** For drift against the configured image. */
22
+ image: string | null;
23
+ /**
24
+ * A pool restarting every two minutes still reports ready = 2 of 2. The count alone cannot say
25
+ * whether that is happening now, which is what `last_restart_at` answers.
26
+ */
27
+ restarts: number | null;
28
+ last_restart_at: Date | null;
29
+ /** Millicores, matching the unit the configuration uses. */
30
+ cpu_limit_millicores: number | null;
31
+ memory_limit_bytes: number | null;
32
+ /** First-seen once stored — see QueueStatus.observed_at. */
33
+ observed_at: Date;
9
34
  }
@@ -1,9 +1,28 @@
1
+ /**
2
+ * A pool has four rungs — configured min/max → `desired` → `ready` → the queue's `consumers` — and
3
+ * each gap means something different. The last lives on QueueStatus, so "how many runners are busy"
4
+ * needs both.
5
+ */
1
6
  export class RunnersStatus {
7
+ /** Runners are found by label, so this is the only record of which deployment answered. */
8
+ name = null;
2
9
  state;
3
- total;
4
- running;
5
- down;
6
- memory_limit;
7
- cpu_limit;
8
- date;
10
+ /** What the deployment asks for, not what the pool is configured for. Differing means it was
11
+ * never redeployed. */
12
+ desired;
13
+ ready;
14
+ rollout;
15
+ /** For drift against the configured image. */
16
+ image;
17
+ /**
18
+ * A pool restarting every two minutes still reports ready = 2 of 2. The count alone cannot say
19
+ * whether that is happening now, which is what `last_restart_at` answers.
20
+ */
21
+ restarts;
22
+ last_restart_at;
23
+ /** Millicores, matching the unit the configuration uses. */
24
+ cpu_limit_millicores;
25
+ memory_limit_bytes;
26
+ /** First-seen once stored — see QueueStatus.observed_at. */
27
+ observed_at;
9
28
  }
@@ -1,13 +1,17 @@
1
+ import { ObservedState } from './ObservedState.js';
1
2
  type StorageTypeStatus = {
2
- exists: boolean;
3
- used: number;
4
- limit: number | null;
3
+ /** Never 'missing' — storage is created on first use. Separates empty from unreadable. */
4
+ state: ObservedState;
5
+ used_bytes: number;
6
+ items: number;
7
+ limit_bytes: number | null;
5
8
  };
6
9
  export declare class StorageStatus {
7
10
  persistent: StorageTypeStatus;
8
11
  cache: StorageTypeStatus;
9
12
  vault: StorageTypeStatus;
10
13
  infrastructure: StorageTypeStatus;
11
- updated: Date;
14
+ /** First-seen once stored — see QueueStatus.observed_at. */
15
+ observed_at: Date;
12
16
  }
13
17
  export {};
@@ -3,5 +3,6 @@ export class StorageStatus {
3
3
  cache;
4
4
  vault;
5
5
  infrastructure;
6
- updated;
6
+ /** First-seen once stored — see QueueStatus.observed_at. */
7
+ observed_at;
7
8
  }
@@ -11,11 +11,15 @@ export declare class CodeDeploy {
11
11
  started: Date | null;
12
12
  finished: Date | null;
13
13
  status: CodeDeployStatus;
14
- archiveChecksum: string | null;
15
- archiveType: string | null;
16
- archiveSize: number | null;
17
- checksum: string | null;
18
- size: number | null;
14
+ /** The deliverable — the archive today, possibly an image later. */
15
+ artifactChecksum: string | null;
16
+ artifactFormat: string | null;
17
+ artifactSize: number | null;
18
+ /** Null while the artifact is still served; set once it is withdrawn. */
19
+ artifactRetiredAt: Date | null;
20
+ /** The built directory the artifact was made from. */
21
+ buildChecksum: string | null;
22
+ buildSize: number | null;
19
23
  storageBucketId: string | null;
20
24
  storageItemId: string | null;
21
25
  commits: ProjectDeployCommit[];
@@ -11,11 +11,15 @@ export class CodeDeploy {
11
11
  started = null;
12
12
  finished = null;
13
13
  status = CodeDeployStatus.Unknown;
14
- archiveChecksum = null;
15
- archiveType = null;
16
- archiveSize = null;
17
- checksum = null;
18
- size = null;
14
+ /** The deliverable — the archive today, possibly an image later. */
15
+ artifactChecksum = null;
16
+ artifactFormat = null;
17
+ artifactSize = null;
18
+ /** Null while the artifact is still served; set once it is withdrawn. */
19
+ artifactRetiredAt = null;
20
+ /** The built directory the artifact was made from. */
21
+ buildChecksum = null;
22
+ buildSize = null;
19
23
  storageBucketId = null;
20
24
  storageItemId = null;
21
25
  commits = [];
@@ -33,11 +37,14 @@ export class CodeDeploy {
33
37
  projectDeploy.started = rawCodeDeploy.started === null ? null : Utils.parseRawDate(rawCodeDeploy.started);
34
38
  projectDeploy.finished = rawCodeDeploy.finished === null ? null : Utils.parseRawDate(rawCodeDeploy.finished);
35
39
  projectDeploy.status = CodeDeployStatus.fromString(rawCodeDeploy.status);
36
- projectDeploy.archiveChecksum = rawCodeDeploy.archive_checksum;
37
- projectDeploy.archiveType = rawCodeDeploy.archive_type;
38
- projectDeploy.archiveSize = rawCodeDeploy.archive_size === null ? null : Utils.parseInt(rawCodeDeploy.archive_size);
39
- projectDeploy.checksum = rawCodeDeploy.checksum;
40
- projectDeploy.size = rawCodeDeploy.size === null ? null : Utils.parseInt(rawCodeDeploy.size);
40
+ projectDeploy.artifactChecksum = rawCodeDeploy.artifact_checksum;
41
+ projectDeploy.artifactFormat = rawCodeDeploy.artifact_format;
42
+ const rawArtifactSize = rawCodeDeploy.artifact_size;
43
+ projectDeploy.artifactSize = rawArtifactSize === null || rawArtifactSize === undefined ? null : Utils.parseInt(rawArtifactSize);
44
+ projectDeploy.artifactRetiredAt = rawCodeDeploy.artifact_retired_at === null || rawCodeDeploy.artifact_retired_at === undefined ? null : new Date(rawCodeDeploy.artifact_retired_at);
45
+ projectDeploy.buildChecksum = rawCodeDeploy.build_checksum;
46
+ const rawBuildSize = rawCodeDeploy.build_size;
47
+ projectDeploy.buildSize = rawBuildSize === null || rawBuildSize === undefined ? null : Utils.parseInt(rawBuildSize);
41
48
  projectDeploy.storageBucketId = rawCodeDeploy.storage_bucket;
42
49
  projectDeploy.storageItemId = rawCodeDeploy.storage_item;
43
50
  projectDeploy.commitHash = rawCodeDeploy.commit_hash;
package/dist/index.d.ts CHANGED
@@ -194,8 +194,9 @@ export { DataValueCollection } from './Model/DataValueCollection.js';
194
194
  export { EntityType } from './Model/EntityType.js';
195
195
  export { InboxMessage } from './Model/Inbox/InboxMessage.js';
196
196
  /** Infrastructure Status **/
197
- export { QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
198
- export { RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
197
+ export { ObservedState } from './Model/InfrastructureStatus/ObservedState.js';
198
+ export { QueueCondition, QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
199
+ export { RunnerRollout, RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
199
200
  export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
200
201
  export { State } from './Model/State.js';
201
202
  export { StateAware } from './Model/StateAware.js';
package/dist/index.js CHANGED
@@ -157,7 +157,6 @@ export { EntityId } from './Model/EntityId.js';
157
157
  export { DataValueCollection } from './Model/DataValueCollection.js';
158
158
  export { EntityType } from './Model/EntityType.js';
159
159
  export { InboxMessage } from './Model/Inbox/InboxMessage.js';
160
- /** Infrastructure Status **/
161
160
  export { QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
162
161
  export { RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
163
162
  export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.125.0";
1
+ export declare const VERSION = "1.126.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.125.0";
1
+ export const VERSION = "1.126.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attlaz/client",
3
- "version": "1.125.0",
3
+ "version": "1.127.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",