@prefecthq/prefect-ui-library 3.11.15 → 3.11.16

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.
@@ -7,7 +7,9 @@ export interface IWorkPoolWorker {
7
7
  workPoolId: string;
8
8
  lastHeartbeatTime: Date;
9
9
  status: WorkPoolWorkerStatus;
10
+ heartbeatIntervalSeconds: number;
10
11
  clientVersion: string | null;
12
+ metadata: Record<string, unknown> | null;
11
13
  }
12
14
  export declare class WorkPoolWorker implements IWorkPoolWorker {
13
15
  readonly id: string;
@@ -18,7 +20,9 @@ export declare class WorkPoolWorker implements IWorkPoolWorker {
18
20
  workPoolId: string;
19
21
  lastHeartbeatTime: Date;
20
22
  status: WorkPoolWorkerStatus;
23
+ heartbeatIntervalSeconds: number;
21
24
  clientVersion: string | null;
25
+ metadata: Record<string, unknown> | null;
22
26
  constructor(workPoolWorker: IWorkPoolWorker);
23
27
  }
24
28
  export type PaginatedWorkPoolWorkers = {
@@ -9,6 +9,8 @@ export type WorkPoolWorkerResponse = {
9
9
  last_heartbeat_time: DateString;
10
10
  status: ServerWorkPoolWorkerStatus;
11
11
  client_version?: string | null;
12
+ heartbeat_interval_seconds: number;
13
+ metadata_: Record<string, unknown> | null;
12
14
  };
13
15
  export type WorkPoolWorkerPaginationResponse = {
14
16
  results: WorkPoolWorkerResponse[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.11.15",
3
+ "version": "3.11.16",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,6 +12,8 @@ export const mapWorkPoolWorkerResponseToWorkPoolWorker: MapFunction<WorkPoolWork
12
12
  lastHeartbeatTime: this.map('string', source.last_heartbeat_time, 'Date'),
13
13
  status: this.map('ServerWorkPoolWorkerStatus', source.status, 'WorkPoolWorkerStatus'),
14
14
  clientVersion: source.client_version ? source.client_version : null,
15
+ heartbeatIntervalSeconds: source.heartbeat_interval_seconds,
16
+ metadata: source.metadata_ ? source.metadata_ : null,
15
17
  })
16
18
  }
17
19
 
@@ -11,6 +11,8 @@ export const randomWorker: MockFunction<WorkPoolWorker, [Partial<WorkPoolWorker>
11
11
  lastHeartbeatTime: this.create('date'),
12
12
  status: this.create('workerStatus'),
13
13
  clientVersion: this.create('string'),
14
+ metadata: { 'integrations': [this.create('string'), this.create('string')] },
15
+ heartbeatIntervalSeconds: this.create('number'),
14
16
  ...overrides,
15
17
  })
16
18
  }
@@ -8,7 +8,9 @@ export interface IWorkPoolWorker {
8
8
  workPoolId: string,
9
9
  lastHeartbeatTime: Date,
10
10
  status: WorkPoolWorkerStatus,
11
+ heartbeatIntervalSeconds: number,
11
12
  clientVersion: string | null,
13
+ metadata: Record<string, unknown> | null,
12
14
  }
13
15
 
14
16
  export class WorkPoolWorker implements IWorkPoolWorker {
@@ -20,7 +22,9 @@ export class WorkPoolWorker implements IWorkPoolWorker {
20
22
  public workPoolId: string
21
23
  public lastHeartbeatTime: Date
22
24
  public status: WorkPoolWorkerStatus
25
+ public heartbeatIntervalSeconds: number
23
26
  public clientVersion: string | null
27
+ public metadata: Record<string, unknown> | null
24
28
 
25
29
  public constructor(workPoolWorker: IWorkPoolWorker) {
26
30
  this.id = workPoolWorker.id
@@ -30,7 +34,9 @@ export class WorkPoolWorker implements IWorkPoolWorker {
30
34
  this.workPoolId = workPoolWorker.workPoolId
31
35
  this.lastHeartbeatTime = workPoolWorker.lastHeartbeatTime
32
36
  this.status = workPoolWorker.status
37
+ this.heartbeatIntervalSeconds = workPoolWorker.heartbeatIntervalSeconds
33
38
  this.clientVersion = workPoolWorker.clientVersion
39
+ this.metadata = workPoolWorker.metadata
34
40
  }
35
41
  }
36
42
 
@@ -11,6 +11,8 @@ export type WorkPoolWorkerResponse = {
11
11
  last_heartbeat_time: DateString,
12
12
  status: ServerWorkPoolWorkerStatus,
13
13
  client_version?: string | null,
14
+ heartbeat_interval_seconds: number,
15
+ metadata_: Record<string, unknown> | null,
14
16
  }
15
17
 
16
18
  export type WorkPoolWorkerPaginationResponse = {