@prefecthq/prefect-ui-library 3.11.17 → 3.11.18

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.
@@ -1,11 +1,11 @@
1
1
  import { WorkPoolWorkerStatus } from '../models/WorkPoolWorkerStatus';
2
- type Integration = {
2
+ export type Integration = {
3
3
  name: string;
4
4
  version: string;
5
5
  };
6
- type Metadata = Record<string, unknown> & {
6
+ export type Metadata = {
7
7
  integrations?: Integration[];
8
- };
8
+ } & Record<string, unknown>;
9
9
  export interface IWorkPoolWorker {
10
10
  readonly id: string;
11
11
  created: Date;
@@ -29,7 +29,7 @@ export declare class WorkPoolWorker implements IWorkPoolWorker {
29
29
  status: WorkPoolWorkerStatus;
30
30
  heartbeatIntervalSeconds: number;
31
31
  clientVersion: string | null;
32
- metadata: Record<string, unknown> | null;
32
+ metadata: Metadata | null;
33
33
  constructor(workPoolWorker: IWorkPoolWorker);
34
34
  }
35
35
  export type PaginatedWorkPoolWorkers = {
@@ -39,4 +39,3 @@ export type PaginatedWorkPoolWorkers = {
39
39
  page: number;
40
40
  pages: number;
41
41
  };
42
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.11.17",
3
+ "version": "3.11.18",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@ 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')] },
14
+ metadata: { integrations: [{ name: this.create('string'), version: this.create('string') }], 'foo': 'bar' },
15
15
  heartbeatIntervalSeconds: this.create('number'),
16
16
  ...overrides,
17
17
  })
@@ -1,7 +1,7 @@
1
1
  import { WorkPoolWorkerStatus } from '@/models/WorkPoolWorkerStatus'
2
2
 
3
- type Integration = { name: string, version: string }
4
- type Metadata = Record<string, unknown> & { integrations?: Integration[] }
3
+ export type Integration = { name: string, version: string }
4
+ export type Metadata = { integrations?: Integration[] } & Record<string, unknown>
5
5
 
6
6
  export interface IWorkPoolWorker {
7
7
  readonly id: string,
@@ -27,7 +27,7 @@ export class WorkPoolWorker implements IWorkPoolWorker {
27
27
  public status: WorkPoolWorkerStatus
28
28
  public heartbeatIntervalSeconds: number
29
29
  public clientVersion: string | null
30
- public metadata: Record<string, unknown> | null
30
+ public metadata: Metadata | null
31
31
 
32
32
  public constructor(workPoolWorker: IWorkPoolWorker) {
33
33
  this.id = workPoolWorker.id