@prefecthq/prefect-ui-library 2.8.19 → 2.9.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.
Files changed (29) hide show
  1. package/dist/{FlowRunsPageWithDefaultFilter-27u9Rhj4.mjs → FlowRunsPageWithDefaultFilter-pWCcli3J.mjs} +2 -2
  2. package/dist/{FlowRunsPageWithDefaultFilter-27u9Rhj4.mjs.map → FlowRunsPageWithDefaultFilter-pWCcli3J.mjs.map} +1 -1
  3. package/dist/{index-CC5sE3vL.mjs → index-C47yg68t.mjs} +13949 -13503
  4. package/dist/{index-CC5sE3vL.mjs.map → index-C47yg68t.mjs.map} +1 -1
  5. package/dist/prefect-ui-library.mjs +867 -850
  6. package/dist/prefect-ui-library.umd.js +83 -83
  7. package/dist/prefect-ui-library.umd.js.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/types/src/automations/components/AutomationTriggerDeploymentStatusInput.vue.d.ts +20 -0
  10. package/dist/types/src/automations/components/AutomationTriggerEventInput.vue.d.ts +24 -0
  11. package/dist/types/src/automations/components/AutomationTriggerEventPostureSelect.vue.d.ts +19 -0
  12. package/dist/types/src/automations/components/AutomationWithinInput.vue.d.ts +32 -0
  13. package/dist/types/src/automations/components/index.d.ts +5 -0
  14. package/dist/types/src/automations/index.d.ts +1 -2
  15. package/dist/types/src/automations/maps/deploymentStatusTrigger.d.ts +5 -0
  16. package/dist/types/src/automations/maps/triggers.d.ts +5 -0
  17. package/dist/types/src/automations/maps/utilities.d.ts +13 -0
  18. package/dist/types/src/automations/types/api/triggers.d.ts +21 -0
  19. package/dist/types/src/automations/types/automationTriggerEvent.d.ts +28 -0
  20. package/dist/types/src/automations/types/deploymentStatusTrigger.d.ts +14 -0
  21. package/dist/types/src/automations/types/index.d.ts +6 -0
  22. package/dist/types/src/automations/types/triggerTemplates.d.ts +2 -0
  23. package/dist/types/src/automations/types/triggers.d.ts +3 -0
  24. package/dist/types/src/components/DeploymentStatusSelect.vue.d.ts +19 -0
  25. package/dist/types/src/components/DurationInput.vue.d.ts +21 -0
  26. package/dist/types/src/components/index.d.ts +2 -0
  27. package/dist/types/src/maps/index.d.ts +10 -0
  28. package/dist/types/src/services/Mapper.d.ts +10 -0
  29. package/package.json +4 -3
@@ -0,0 +1,32 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ time: number;
3
+ } & {
4
+ posture: "Reactive" | "Proactive";
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:time": (time: number) => void;
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
+ time: number;
9
+ } & {
10
+ posture: "Reactive" | "Proactive";
11
+ }>>> & {
12
+ "onUpdate:time"?: ((time: number) => any) | undefined;
13
+ }, {}, {}>, {
14
+ label?(_: {
15
+ id: string;
16
+ }): any;
17
+ }>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToOption<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
@@ -0,0 +1,5 @@
1
+ export { default as AutomationActionInput } from './AutomationActionInput.vue';
2
+ export { default as AutomationActionDescription } from './AutomationActionDescription.vue';
3
+ export { default as AutomationTriggerEventPostureSelect } from './AutomationTriggerEventPostureSelect.vue';
4
+ export { default as AutomationWithinInput } from './AutomationWithinInput.vue';
5
+ export { default as AutomationTriggerEventInput } from './AutomationTriggerEventInput.vue';
@@ -1,3 +1,2 @@
1
+ export * from './components';
1
2
  export * from './types';
2
- export { default as AutomationActionInput } from './components/AutomationActionInput.vue';
3
- export { default as AutomationActionDescription } from './components/AutomationActionDescription.vue';
@@ -0,0 +1,5 @@
1
+ import { AutomationTriggerEvent } from '../../automations/types/automationTriggerEvent';
2
+ import { DeploymentStatusTrigger } from '../../automations/types/deploymentStatusTrigger';
3
+ import { MapFunction } from '../../schemas/mapper';
4
+ export declare const mapDeploymentStatusTriggerToAutomationTrigger: MapFunction<DeploymentStatusTrigger, AutomationTriggerEvent>;
5
+ export declare const mapAutomationTriggerToDeploymentStatusTrigger: MapFunction<AutomationTriggerEvent, DeploymentStatusTrigger>;
@@ -0,0 +1,5 @@
1
+ import { AutomationTriggerResponse } from '../../automations/types/api/triggers';
2
+ import { AutomationTrigger } from '../../automations/types/triggers';
3
+ import { MapFunction } from '../../schemas/mapper';
4
+ export declare const mapAutomationTriggerResponseToAutomationTrigger: MapFunction<AutomationTriggerResponse, AutomationTrigger>;
5
+ export declare const mapAutomationTriggerToAutomationTriggerRequest: MapFunction<AutomationTrigger, AutomationTriggerResponse>;
@@ -0,0 +1,13 @@
1
+ import { AutomationTriggerMatch, EventResource, EventResourceLabel, EventResourceRole, EventResourceValue } from '../../automations/types/api/triggers';
2
+ import { AutomationTrigger } from '../../automations/types/triggers';
3
+ export declare function toResourceId(resource: EventResource, values: string[]): string | string[];
4
+ export declare function fromResourceId(resource: EventResource, value: EventResourceValue): string[];
5
+ export declare function fromResourceName(match: AutomationTriggerMatch, role: EventResourceRole): string[];
6
+ export declare function toStateNameEvents(stateTypes: string[]): string[];
7
+ export declare function fromStateNameEvents(events: string[]): string[];
8
+ export declare function toMatchRelatedId(role: EventResourceRole, id: string | string[]): AutomationTriggerMatch | undefined;
9
+ export declare function toMatchRelatedName(role: EventResourceRole, name: string | string[]): AutomationTriggerMatch | undefined;
10
+ export declare function isMatchResource(trigger: AutomationTrigger, predicate: (resourceIds: string[]) => boolean): boolean;
11
+ export declare function isForEachResource(trigger: AutomationTrigger, resource: EventResourceLabel): boolean;
12
+ export declare function isExpectResource(trigger: AutomationTrigger, predicate: (resourceIds: string[]) => boolean): boolean;
13
+ export declare function isAfterResource(trigger: AutomationTrigger, predicate: (resourceIds: string[]) => boolean): boolean;
@@ -0,0 +1,21 @@
1
+ export type EventResourceLabel = 'prefect.resource.id' | 'prefect.resource.role' | 'prefect.resource.name' | 'prefect-cloud.incident.severity';
2
+ export type EventResource = 'prefect.deployment' | 'prefect.flow-run' | 'prefect.flow' | 'prefect.tag' | 'prefect.work-pool' | 'prefect.work-queue' | 'prefect-cloud.incident';
3
+ export type EventResourceRole = 'flow' | 'tag' | 'work-queue' | 'work-pool';
4
+ export type EventResourceValue = string | string[] | undefined;
5
+ export type AutomationTriggerMatch = Partial<Record<EventResourceLabel, EventResourceValue>>;
6
+ export declare const automationTriggerEventPosture: readonly ["Reactive", "Proactive"], isAutomationTriggerEventPosture: (value: unknown) => value is "Reactive" | "Proactive";
7
+ export declare const DEFAULT_EVENT_TRIGGER_WITHIN = 0;
8
+ export type AutomationTriggerEventPosture = typeof automationTriggerEventPosture[number];
9
+ export type AutomationTriggerEventResponse = {
10
+ type: 'event';
11
+ match?: AutomationTriggerMatch;
12
+ match_related?: AutomationTriggerMatch;
13
+ after?: string[];
14
+ expect?: string[];
15
+ for_each?: string[];
16
+ posture: AutomationTriggerEventPosture;
17
+ threshold: number;
18
+ within?: number;
19
+ };
20
+ export declare function isAutomationTriggerEventResponse(value: unknown): value is AutomationTriggerEventResponse;
21
+ export type AutomationTriggerResponse = AutomationTriggerEventResponse;
@@ -0,0 +1,28 @@
1
+ import { AutomationTriggerMatch } from '../../automations/types/api/triggers';
2
+ import { Require } from '../../types/utilities';
3
+ export declare const automationTriggerEventPosture: readonly ["Reactive", "Proactive"], isAutomationTriggerEventPosture: (value: unknown) => value is "Reactive" | "Proactive";
4
+ export declare const DEFAULT_EVENT_TRIGGER_WITHIN = 0;
5
+ export declare const DEFAULT_EVENT_TRIGGER_THRESHOLD = 1;
6
+ export type AutomationTriggerEventPosture = typeof automationTriggerEventPosture[number];
7
+ export type IAutomationTriggerEvent = {
8
+ posture: AutomationTriggerEventPosture;
9
+ match: AutomationTriggerMatch;
10
+ matchRelated: AutomationTriggerMatch;
11
+ forEach: string[];
12
+ after: string[];
13
+ expect: string[];
14
+ threshold: number;
15
+ within?: number | undefined;
16
+ };
17
+ export declare class AutomationTriggerEvent implements IAutomationTriggerEvent {
18
+ readonly type = "event";
19
+ posture: AutomationTriggerEventPosture;
20
+ match: AutomationTriggerMatch;
21
+ matchRelated: AutomationTriggerMatch;
22
+ forEach: string[];
23
+ after: string[];
24
+ expect: string[];
25
+ threshold: number;
26
+ within: number;
27
+ constructor(trigger: Require<Partial<IAutomationTriggerEvent>, 'posture'>);
28
+ }
@@ -0,0 +1,14 @@
1
+ import { AutomationTriggerEventPosture } from '../../automations/types/automationTriggerEvent';
2
+ import { DeploymentStatus } from '../../models/DeploymentStatus';
3
+ export declare const deploymentStatusEvent: readonly ["prefect.deployment.ready", "prefect.deployment.not-ready"], isDeploymentStatusEvent: (value: unknown) => value is "prefect.deployment.ready" | "prefect.deployment.not-ready";
4
+ export type DeploymentStatusEvent = typeof deploymentStatusEvent[number];
5
+ export type DeploymentStatusTrigger = {
6
+ deployments: string[];
7
+ posture: AutomationTriggerEventPosture;
8
+ status: DeploymentStatus;
9
+ time: number;
10
+ };
11
+ /**
12
+ * This is used to determine if an AutomationTrigger can be mapped into a DeploymentStatusTrigger
13
+ */
14
+ export declare function isDeploymentStatusTrigger(trigger: unknown): boolean;
@@ -6,5 +6,11 @@ export { isCreateAutomationActionQuery, isCreateAutomationTriggerQuery } from '.
6
6
  export type { AutomationAction, AutomationActionType } from './actions';
7
7
  export type { AutomationSort, AutomationsFilter } from './filter';
8
8
  export { isAutomationAction, automationActionTypes, isAutomationActionType, automationActionTypeLabels } from './actions';
9
+ export type { AutomationTriggerResponse } from './api/triggers';
10
+ export { isAutomationTriggerEventResponse } from './api/triggers';
9
11
  export type { IAutomation } from './automation';
10
12
  export { Automation } from './automation';
13
+ export * from './triggers';
14
+ export * from './triggerTemplates';
15
+ export * from './automationTriggerEvent';
16
+ export * from './deploymentStatusTrigger';
@@ -0,0 +1,2 @@
1
+ export declare const automationTriggerEventTemplates: readonly ["deployment-status", "flow-run-state", "work-pool-status", "work-queue-status"], isAutomationTriggerEventTemplate: (value: unknown) => value is "deployment-status" | "flow-run-state" | "work-pool-status" | "work-queue-status";
2
+ export type AutomationTriggerEventTemplate = typeof automationTriggerEventTemplates[number];
@@ -0,0 +1,3 @@
1
+ import { AutomationTriggerEvent } from '../../automations/types/automationTriggerEvent';
2
+ export declare function isAutomationTriggerEvent(value: unknown): value is AutomationTriggerEvent;
3
+ export type AutomationTrigger = AutomationTriggerEvent;
@@ -0,0 +1,19 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ selected: "ready" | "not_ready";
3
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:selected": (value: "ready" | "not_ready") => void;
5
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
+ selected: "ready" | "not_ready";
7
+ }>>> & {
8
+ "onUpdate:selected"?: ((value: "ready" | "not_ready") => any) | undefined;
9
+ }, {}, {}>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToOption<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
@@ -0,0 +1,21 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ modelValue: number;
3
+ min?: number | undefined;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: number) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
+ modelValue: number;
8
+ min?: number | undefined;
9
+ }>>> & {
10
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
+ }, {}, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
@@ -324,3 +324,5 @@ export { default as WorkQueueToggle } from './WorkQueueToggle.vue';
324
324
  export { default as WorkspaceDashboardFlowRunsCard } from './WorkspaceDashboardFlowRunsCard.vue';
325
325
  export { default as WorkspaceVariableCombobox } from './WorkspaceVariableCombobox.vue';
326
326
  export { default as FlowRunCreateFormV2 } from './FlowRunCreateFormV2.vue';
327
+ export { default as DeploymentStatusSelect } from './DeploymentStatusSelect.vue';
328
+ export { default as DurationInput } from './DurationInput.vue';
@@ -603,4 +603,14 @@ export declare const maps: {
603
603
  TaskRunHistoryResponse: {
604
604
  TaskRunHistory: import("..").MapFunction<import("../models/api/TaskRunHistoryResponse").TaskRunHistoryResponse, import("..").TaskRunHistory>;
605
605
  };
606
+ AutomationTrigger: {
607
+ DeploymentStatusTrigger: import("../schemas/mapper").MapFunction<import("..").AutomationTriggerEvent, import("..").DeploymentStatusTrigger>;
608
+ AutomationTriggerRequest: import("../schemas/mapper").MapFunction<import("..").AutomationTriggerEvent, import("../automations/types/api/triggers").AutomationTriggerEventResponse>;
609
+ };
610
+ DeploymentStatusTrigger: {
611
+ AutomationTrigger: import("../schemas/mapper").MapFunction<import("..").DeploymentStatusTrigger, import("..").AutomationTriggerEvent>;
612
+ };
613
+ AutomationTriggerResponse: {
614
+ AutomationTrigger: import("../schemas/mapper").MapFunction<import("../automations/types/api/triggers").AutomationTriggerEventResponse, import("..").AutomationTriggerEvent>;
615
+ };
606
616
  };
@@ -627,6 +627,16 @@ export declare const mapper: Mapper<{
627
627
  TaskRunHistoryResponse: {
628
628
  TaskRunHistory: MapFunction<import("../models/api/TaskRunHistoryResponse").TaskRunHistoryResponse, import("..").TaskRunHistory>;
629
629
  };
630
+ AutomationTrigger: {
631
+ DeploymentStatusTrigger: import("../schemas/mapper").MapFunction<import("..").AutomationTriggerEvent, import("..").DeploymentStatusTrigger>;
632
+ AutomationTriggerRequest: import("../schemas/mapper").MapFunction<import("..").AutomationTriggerEvent, import("../automations/types/api/triggers").AutomationTriggerEventResponse>;
633
+ };
634
+ DeploymentStatusTrigger: {
635
+ AutomationTrigger: import("../schemas/mapper").MapFunction<import("..").DeploymentStatusTrigger, import("..").AutomationTriggerEvent>;
636
+ };
637
+ AutomationTriggerResponse: {
638
+ AutomationTrigger: import("../schemas/mapper").MapFunction<import("../automations/types/api/triggers").AutomationTriggerEventResponse, import("..").AutomationTriggerEvent>;
639
+ };
630
640
  }>;
631
641
  export type MapFunction<S, D> = (this: typeof mapper, source: S) => D;
632
642
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "2.8.19",
3
+ "version": "2.9.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,8 @@
22
22
  "lint": "eslint src",
23
23
  "test": "vitest",
24
24
  "validate:types": "vue-tsc --noEmit",
25
- "version": "npm run changelog && git add CHANGELOG.md"
25
+ "version": "npm run changelog && git add CHANGELOG.md",
26
+ "release": "./prefect-ui-library-release"
26
27
  },
27
28
  "main": "./dist/prefect-ui-library.umd.js",
28
29
  "module": "./dist/prefect-ui-library.mjs",
@@ -77,7 +78,7 @@
77
78
  "@prefecthq/vue-charts": "^2.0.3",
78
79
  "@prefecthq/vue-compositions": "^1.11.4",
79
80
  "vee-validate": "^4.7.0",
80
- "vue": "^3.4.21",
81
+ "vue": "^3.4.26",
81
82
  "vue-router": "^4.3.0"
82
83
  }
83
84
  }