@prefecthq/prefect-ui-library 2.8.5 → 2.8.7

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.
@@ -0,0 +1,4 @@
1
+ import { LocationQuery } from 'vue-router';
2
+ import { CreateAutomationQuery } from '../../automations/types/createAutomationQuery';
3
+ import { MapFunction } from '../../services/Mapper';
4
+ export declare const mapCreateAutomationQueryToLocationQuery: MapFunction<CreateAutomationQuery, LocationQuery>;
@@ -0,0 +1,23 @@
1
+ import { AutomationAction } from '../../automations/types/actions';
2
+ export type CreateEventAutomationQuery = {
3
+ from: 'event';
4
+ event: {
5
+ id: string;
6
+ occurred: Date;
7
+ };
8
+ };
9
+ export declare function isCreateEventAutomationQuery(value: unknown): value is CreateEventAutomationQuery;
10
+ export type CreateFlowAutomationQuery = {
11
+ from: 'flow';
12
+ flowId: string;
13
+ };
14
+ export declare function isCreateFlowAutomationQuery(value: unknown): value is CreateFlowAutomationQuery;
15
+ export type CreateWorkPoolQueueAutomationQuery = {
16
+ from: 'workPoolQueue';
17
+ workPoolQueueId: string;
18
+ };
19
+ export declare function isCreateWorkPoolQueueAutomationQuery(value: unknown): value is CreateWorkPoolQueueAutomationQuery;
20
+ export type CreateAutomationTriggerQuery = CreateEventAutomationQuery | CreateFlowAutomationQuery | CreateWorkPoolQueueAutomationQuery;
21
+ export type CreateAutomationQuery = CreateAutomationTriggerQuery & {
22
+ actions?: AutomationAction[];
23
+ };
@@ -1,6 +1,7 @@
1
1
  export type { AutomationActionResponse } from './api/actions';
2
2
  export { isAutomationActionResponse } from './api/actions';
3
3
  export type { AutomationResponse } from './api/automation';
4
+ export type { CreateAutomationTriggerQuery, CreateAutomationQuery } from './createAutomationQuery';
4
5
  export type { AutomationAction, AutomationActionType } from './actions';
5
6
  export type { AutomationSort, AutomationsFilter } from './filter';
6
7
  export { isAutomationAction, automationActionTypes, isAutomationActionType, automationActionTypeLabels } from './actions';
@@ -52,6 +52,7 @@ export * from './useVariables';
52
52
  export * from './useWorkPool';
53
53
  export * from './useWorkPoolById';
54
54
  export * from './useWorkPoolLastPolled';
55
+ export * from './useWorkPoolsCount';
55
56
  export * from './useWorkPoolQueue';
56
57
  export * from './useWorkQueueStatus';
57
58
  export * from './useWorkspaceApi';
@@ -0,0 +1,6 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ import { WorkPoolsFilter } from '../models';
3
+ import { WorkspaceWorkPoolsApi } from '../services/WorkspaceWorkPoolsApi';
4
+ import { UseEntitySubscription } from '../types/useEntitySubscription';
5
+ export type UseWorkPoolsCount = UseEntitySubscription<WorkspaceWorkPoolsApi['getWorkPoolsCount'], 'workPoolCount'>;
6
+ export declare function useWorkPoolsCount(filter?: MaybeRefOrGetter<WorkPoolsFilter>): UseWorkPoolsCount;
@@ -1,4 +1,35 @@
1
1
  export declare function useWorkspaceRoutes(): {
2
+ automations: () => {
3
+ readonly name: "workspace.automations";
4
+ readonly params: {
5
+ readonly accountId?: string | undefined;
6
+ readonly workspaceId?: string | undefined;
7
+ };
8
+ };
9
+ automation: (automationId: string) => {
10
+ readonly name: "workspace.automation.view";
11
+ readonly params: {
12
+ readonly automationId: string;
13
+ readonly accountId?: string | undefined;
14
+ readonly workspaceId?: string | undefined;
15
+ };
16
+ };
17
+ automationCreate: (automationQuery?: import("..").CreateAutomationQuery | undefined) => {
18
+ readonly name: "workspace.automation.create";
19
+ readonly params: {
20
+ readonly accountId?: string | undefined;
21
+ readonly workspaceId?: string | undefined;
22
+ };
23
+ readonly query: import("vue-router").LocationQuery | undefined;
24
+ };
25
+ automationEdit: (automationId: string) => {
26
+ readonly name: "workspace.automation.edit";
27
+ readonly params: {
28
+ readonly automationId: string;
29
+ readonly accountId?: string | undefined;
30
+ readonly workspaceId?: string | undefined;
31
+ };
32
+ };
2
33
  artifact: (artifactId: string) => {
3
34
  readonly name: "workspace.artifacts.artifact";
4
35
  readonly params: {
@@ -83,6 +83,9 @@ export declare const maps: {
83
83
  ConcurrencyV2LimitUpdate: {
84
84
  ConcurrencyV2UpdateRequest: import("..").MapFunction<import("../models/ConcurrencyV2Update").ConcurrencyV2Update, import("../models/api/ConcurrencyV2UpdateRequest").ConcurrencyV2UpdateRequest>;
85
85
  };
86
+ CreateAutomationQuery: {
87
+ LocationQuery: import("..").MapFunction<import("..").CreateAutomationQuery, import("vue-router").LocationQuery>;
88
+ };
86
89
  CreatedOrUpdatedByResponse: {
87
90
  CreatedOrUpdatedBy: import("..").MapFunction<import("..").CreatedOrUpdatedByResponse, import("..").CreatedOrUpdatedBy>;
88
91
  };
@@ -1,8 +1,40 @@
1
+ import { CreateAutomationQuery } from '../automations/types/createAutomationQuery';
1
2
  type CreateWorkspaceRoutesConfig = {
2
3
  accountId: string;
3
4
  workspaceId: string;
4
5
  };
5
6
  export declare function createWorkspaceRoutes(config?: CreateWorkspaceRoutesConfig): {
7
+ automations: () => {
8
+ readonly name: "workspace.automations";
9
+ readonly params: {
10
+ readonly accountId?: string | undefined;
11
+ readonly workspaceId?: string | undefined;
12
+ };
13
+ };
14
+ automation: (automationId: string) => {
15
+ readonly name: "workspace.automation.view";
16
+ readonly params: {
17
+ readonly automationId: string;
18
+ readonly accountId?: string | undefined;
19
+ readonly workspaceId?: string | undefined;
20
+ };
21
+ };
22
+ automationCreate: (automationQuery?: CreateAutomationQuery) => {
23
+ readonly name: "workspace.automation.create";
24
+ readonly params: {
25
+ readonly accountId?: string | undefined;
26
+ readonly workspaceId?: string | undefined;
27
+ };
28
+ readonly query: import("vue-router").LocationQuery | undefined;
29
+ };
30
+ automationEdit: (automationId: string) => {
31
+ readonly name: "workspace.automation.edit";
32
+ readonly params: {
33
+ readonly automationId: string;
34
+ readonly accountId?: string | undefined;
35
+ readonly workspaceId?: string | undefined;
36
+ };
37
+ };
6
38
  artifact: (artifactId: string) => {
7
39
  readonly name: "workspace.artifacts.artifact";
8
40
  readonly params: {
@@ -107,6 +107,9 @@ export declare const mapper: Mapper<{
107
107
  ConcurrencyV2LimitUpdate: {
108
108
  ConcurrencyV2UpdateRequest: MapFunction<import("../models/ConcurrencyV2Update").ConcurrencyV2Update, import("../models/api/ConcurrencyV2UpdateRequest").ConcurrencyV2UpdateRequest>;
109
109
  };
110
+ CreateAutomationQuery: {
111
+ LocationQuery: MapFunction<import("..").CreateAutomationQuery, import("vue-router").LocationQuery>;
112
+ };
110
113
  CreatedOrUpdatedByResponse: {
111
114
  CreatedOrUpdatedBy: MapFunction<import("..").CreatedOrUpdatedByResponse, import("..").CreatedOrUpdatedBy>;
112
115
  };
@@ -3,6 +3,7 @@ import { AutomationsFilter } from '../automations/types/filter';
3
3
  import { WorkspaceApi } from '../services/WorkspaceApi';
4
4
  export declare class WorkspaceAutomationsApi extends WorkspaceApi {
5
5
  protected routePrefix: string;
6
+ getAutomation(automationId: string): Promise<Automation>;
6
7
  getAutomations(filter?: AutomationsFilter): Promise<Automation[]>;
7
8
  validateTemplate(template: string): Promise<string | true>;
8
9
  }
@@ -6,6 +6,7 @@ export declare class WorkspaceWorkPoolsApi extends WorkspaceApi {
6
6
  createWorkPool(request: WorkPoolCreate): Promise<WorkPool>;
7
7
  getWorkPoolByName(name: string): Promise<WorkPool>;
8
8
  getWorkPools(filter?: WorkPoolsFilter): Promise<WorkPool[]>;
9
+ getWorkPoolsCount(filter?: WorkPoolsFilter): Promise<number>;
9
10
  getWorkPoolById(id: string): Promise<WorkPool>;
10
11
  updateWorkPool(name: string, request: WorkPoolEdit): Promise<void>;
11
12
  pauseWorkPool(name: string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "2.8.5",
3
+ "version": "2.8.7",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",