@prefecthq/prefect-ui-library 1.1.10 → 1.1.12
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.
- package/dist/{index-d5214ec2.mjs → index-7acf17d8.mjs} +13255 -12937
- package/dist/index-7acf17d8.mjs.map +1 -0
- package/dist/prefect-ui-library.mjs +457 -453
- package/dist/prefect-ui-library.umd.js +78 -67
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/demo/compositions/useArtifactsMock.d.ts +3 -0
- package/dist/types/demo/compositions/useSeeds.d.ts +2 -1
- package/dist/types/demo/sections/artifacts/index.d.ts +2 -0
- package/dist/types/demo/sections/blocks/BlockDocumentCombobox.vue.d.ts +2 -0
- package/dist/types/demo/utilities/api.d.ts +2 -1
- package/dist/types/demo/utilities/data.d.ts +3 -1
- package/dist/types/src/components/ArtifactDescription.vue.d.ts +16 -0
- package/dist/types/src/components/FlowMenu.vue.d.ts +2 -6
- package/dist/types/src/components/SchemaFormFieldsWithValues.vue.d.ts +22 -0
- package/dist/types/src/components/SchemaPropertiesKeyValues.vue.d.ts +2 -0
- package/dist/types/src/components/SchemaPropertyKeyValue.vue.d.ts +2 -0
- package/dist/types/src/components/WorkPoolTypeSelect.vue.d.ts +4 -2
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/compositions/useTabs.d.ts +7 -2
- package/dist/types/src/maps/index.d.ts +15 -0
- package/dist/types/src/maps/workerCollection.d.ts +10 -0
- package/dist/types/src/mocks/artifact.d.ts +3 -0
- package/dist/types/src/mocks/index.d.ts +21 -0
- package/dist/types/src/mocks/markdown.d.ts +21 -0
- package/dist/types/src/models/Artifact.d.ts +32 -7
- package/dist/types/src/models/WorkPool.d.ts +3 -2
- package/dist/types/src/models/WorkPoolCreate.d.ts +3 -0
- package/dist/types/src/models/WorkPoolEdit.d.ts +3 -0
- package/dist/types/src/models/WorkerCollectionItem.d.ts +19 -0
- package/dist/types/src/models/api/ArtifactResponse.d.ts +4 -2
- package/dist/types/src/models/api/WorkPoolRequest.d.ts +7 -0
- package/dist/types/src/models/api/WorkPoolResponse.d.ts +6 -0
- package/dist/types/src/models/api/WorkerCollectionItemResponse.d.ts +15 -0
- package/dist/types/src/models/api/index.d.ts +1 -0
- package/dist/types/src/models/index.d.ts +2 -1
- package/dist/types/src/services/CollectionsApi.d.ts +2 -1
- package/dist/types/src/services/Mapper.d.ts +15 -0
- package/dist/types/src/services/Mocker.d.ts +21 -0
- package/dist/types/src/services/WorkspaceArtifactsApi.d.ts +5 -5
- package/dist/types/src/services/can.d.ts +1 -1
- package/dist/types/src/types/SortOptionTypes.d.ts +4 -0
- package/dist/types/src/types/artifact.d.ts +8 -0
- package/dist/types/src/types/schemas.d.ts +4 -0
- package/dist/types/src/utilities/api.d.ts +2 -0
- package/dist/types/src/utilities/arrays.d.ts +1 -1
- package/dist/types/src/utilities/parameters.d.ts +3 -1
- package/dist/{viewport.es-5fa29f11-ea22d621.mjs → viewport.es-5fa29f11-bbe81571.mjs} +2 -2
- package/dist/{viewport.es-5fa29f11-ea22d621.mjs.map → viewport.es-5fa29f11-bbe81571.mjs.map} +1 -1
- package/package.json +6 -6
- package/dist/index-d5214ec2.mjs.map +0 -1
- /package/dist/types/demo/sections/{blocks/BlockDocumentsSelect.vue.d.ts → artifacts/ArtifactDescription.vue.d.ts} +0 -0
- /package/dist/types/src/components/{BlockDocumentsSelect.vue.d.ts → BlockDocumentCombobox.vue.d.ts} +0 -0
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Flow } from '../models';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
flow: Flow;
|
|
4
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
-
delete: (value: string) => void;
|
|
6
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
5
|
flow: Flow;
|
|
8
|
-
}
|
|
9
|
-
onDelete?: ((value: string) => any) | undefined;
|
|
10
|
-
}, {}>, {
|
|
6
|
+
}>>>, {}>, {
|
|
11
7
|
default: (_: {
|
|
12
8
|
flow: Flow;
|
|
13
9
|
}) => any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Schema, SchemaValues } from '../types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
schema: Schema;
|
|
4
|
+
values: SchemaValues | null | undefined;
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:values": (value: SchemaValues) => void;
|
|
7
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
schema: Schema;
|
|
9
|
+
values: SchemaValues | null | undefined;
|
|
10
|
+
}>>> & {
|
|
11
|
+
"onUpdate:values"?: ((value: SchemaValues) => any) | undefined;
|
|
12
|
+
}, {}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
+
} : {
|
|
19
|
+
type: import('vue').PropType<T[K]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -2,9 +2,11 @@ import { Schema, SchemaValues } from '../types/schemas';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
schema: Schema;
|
|
4
4
|
values: SchemaValues;
|
|
5
|
+
alternate?: boolean | undefined;
|
|
5
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
7
|
schema: Schema;
|
|
7
8
|
values: SchemaValues;
|
|
9
|
+
alternate?: boolean | undefined;
|
|
8
10
|
}>>>, {}>;
|
|
9
11
|
export default _default;
|
|
10
12
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,9 +2,11 @@ import { SchemaProperty, SchemaValue } from '../types/schemas';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
property: SchemaProperty;
|
|
4
4
|
value: SchemaValue;
|
|
5
|
+
alternate?: boolean | undefined;
|
|
5
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
7
|
property: SchemaProperty;
|
|
7
8
|
value: SchemaValue;
|
|
9
|
+
alternate?: boolean | undefined;
|
|
8
10
|
}>>>, {}>;
|
|
9
11
|
export default _default;
|
|
10
12
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
selected: string | null;
|
|
2
|
+
selected: string | null | undefined;
|
|
3
|
+
disabled?: boolean | undefined;
|
|
3
4
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
5
|
"update:selected": (value: string | null) => void;
|
|
5
6
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
-
selected: string | null;
|
|
7
|
+
selected: string | null | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
7
9
|
}>>> & {
|
|
8
10
|
"onUpdate:selected"?: ((value: string | null) => any) | undefined;
|
|
9
11
|
}, {}>;
|
|
@@ -2,10 +2,10 @@ export { default as ActivityChart } from './ActivityChart.vue';
|
|
|
2
2
|
export { default as BetaBadge } from './BetaBadge.vue';
|
|
3
3
|
export { default as BlockCapabilityBlockDocumentInput } from './BlockCapabilityBlockDocumentInput.vue';
|
|
4
4
|
export { default as BlockDocumentCard } from './BlockDocumentCard.vue';
|
|
5
|
+
export { default as BlockDocumentCombobox } from './BlockDocumentCombobox.vue';
|
|
5
6
|
export { default as BlockDocumentInput } from './BlockDocumentInput.vue';
|
|
6
7
|
export { default as BlockDocumentKeyValue } from './BlockDocumentKeyValue.vue';
|
|
7
8
|
export { default as BlockDocumentMenu } from './BlockDocumentMenu.vue';
|
|
8
|
-
export { default as BlockDocumentsSelect } from './BlockDocumentsSelect.vue';
|
|
9
9
|
export { default as BlockDocumentsTable } from './BlockDocumentsTable.vue';
|
|
10
10
|
export { default as BlockIconText } from './BlockIconText.vue';
|
|
11
11
|
export { default as BlockSchemaCapabilities } from './BlockSchemaCapabilities.vue';
|
|
@@ -240,3 +240,4 @@ export { default as WorkQueuesTable } from './WorkQueuesTable.vue';
|
|
|
240
240
|
export { default as WorkQueueStatusBadge } from './WorkQueueStatusBadge.vue';
|
|
241
241
|
export { default as WorkQueueStatusIcon } from './WorkQueueStatusIcon.vue';
|
|
242
242
|
export { default as WorkQueueToggle } from './WorkQueueToggle.vue';
|
|
243
|
+
export { default as SchemaFormFieldsWithValues } from './SchemaFormFieldsWithValues.vue';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { MaybeRef } from '../types';
|
|
2
3
|
export type ConditionalTab = {
|
|
3
4
|
label: string;
|
|
4
5
|
hidden?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export
|
|
7
|
+
export type UseTabs = {
|
|
8
|
+
tabs: ComputedRef<string[]>;
|
|
9
|
+
tab: Ref<string | undefined>;
|
|
10
|
+
};
|
|
11
|
+
export declare function useTabs(tabs: MaybeRef<ConditionalTab[]>, tab?: MaybeRef<string | undefined>): UseTabs;
|
|
@@ -83,6 +83,9 @@ export declare const maps: {
|
|
|
83
83
|
CollectionItemResponse: {
|
|
84
84
|
CollectionItem: import("..").MapFunction<import("..").CollectionItemResponse, import("..").CollectionItem>;
|
|
85
85
|
};
|
|
86
|
+
PrefectWorkerCollectionResponse: {
|
|
87
|
+
WorkerCollectionItem: import("..").MapFunction<import("..").PrefectWorkerCollectionResponse, import("..").WorkerCollectionItem[]>;
|
|
88
|
+
};
|
|
86
89
|
CollectionResponse: {
|
|
87
90
|
CollectionItems: import("..").MapFunction<import("..").CollectionsResponse, import("..").CollectionItem[]>;
|
|
88
91
|
};
|
|
@@ -312,12 +315,15 @@ export declare const maps: {
|
|
|
312
315
|
type: string;
|
|
313
316
|
isPaused: boolean;
|
|
314
317
|
concurrencyLimit: number;
|
|
318
|
+
baseJobTemplate: Record<string, unknown>;
|
|
319
|
+
defaultVariableValues: import("..").SchemaValues;
|
|
315
320
|
}>, Partial<{
|
|
316
321
|
name: string;
|
|
317
322
|
description: string;
|
|
318
323
|
type: string;
|
|
319
324
|
is_paused: boolean;
|
|
320
325
|
concurrency_limit: number;
|
|
326
|
+
base_job_template: import("..").BaseJobTemplateRequest;
|
|
321
327
|
}>>;
|
|
322
328
|
};
|
|
323
329
|
WorkPoolEdit: {
|
|
@@ -325,10 +331,13 @@ export declare const maps: {
|
|
|
325
331
|
description: string | null;
|
|
326
332
|
isPaused: boolean;
|
|
327
333
|
concurrencyLimit: number | null;
|
|
334
|
+
baseJobTemplate: import("..").WorkerBaseJobTemplate;
|
|
335
|
+
updatedDefaultVariableValues: import("..").SchemaValues;
|
|
328
336
|
}>, Partial<{
|
|
329
337
|
description: string | null;
|
|
330
338
|
is_paused: boolean;
|
|
331
339
|
concurrency_limit: number | null;
|
|
340
|
+
base_job_template: import("..").BaseJobTemplateRequest;
|
|
332
341
|
}>>;
|
|
333
342
|
};
|
|
334
343
|
WorkPoolQueue: {
|
|
@@ -410,6 +419,12 @@ export declare const maps: {
|
|
|
410
419
|
WorkPoolQueueFilter: {
|
|
411
420
|
WorkPoolQueueFilterRequest: import("..").MapFunction<import("..").WorkPoolQueueFilter, import("../models/api/Filters").WorkPoolQueueFilterRequest>;
|
|
412
421
|
};
|
|
422
|
+
WorkerSchemaProperty: {
|
|
423
|
+
WorkerSchemaPropertyRequest: import("..").MapFunction<{
|
|
424
|
+
values: import("..").SchemaValues;
|
|
425
|
+
schema: import("..").WorkerBaseJobTemplate;
|
|
426
|
+
}, import("..").WorkerBaseJobTemplate>;
|
|
427
|
+
};
|
|
413
428
|
FlowRunsHistoryFilter: {
|
|
414
429
|
FlowRunsHistoryFilterRequest: import("..").MapFunction<import("..").FlowRunsHistoryFilter, import("../models/api/Filters").FlowRunsHistoryFilterRequest>;
|
|
415
430
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PrefectWorkerCollectionResponse, WorkerCollectionItem } from '../models';
|
|
2
|
+
import { MapFunction } from '../services/Mapper';
|
|
3
|
+
import { SchemaValues, WorkerBaseJobTemplate } from '../types/schemas';
|
|
4
|
+
export declare const mapPrefectWorkerCollectionResponseToWorkerCollectionItemArray: MapFunction<PrefectWorkerCollectionResponse, WorkerCollectionItem[]>;
|
|
5
|
+
type MapSchemaValuesSource = {
|
|
6
|
+
values: SchemaValues;
|
|
7
|
+
schema: WorkerBaseJobTemplate;
|
|
8
|
+
};
|
|
9
|
+
export declare const mapWorkerSchemaValuesToWorkerSchemaValuesRequest: MapFunction<MapSchemaValuesSource, WorkerBaseJobTemplate>;
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const mocks: {
|
|
2
2
|
any: import("..").MockFunction<any, []>;
|
|
3
|
+
artifact: import("..").MockFunction<import("..").Artifact, [(Partial<import("..").Artifact> | undefined)?]>;
|
|
3
4
|
blockDocument: import("..").MockFunction<import("..").BlockDocument, [(Partial<import("..").BlockDocument> | undefined)?]>;
|
|
4
5
|
blockDocumentData: import("..").MockFunction<Record<string, unknown>, [("url" | "email_addresses" | undefined)?]>;
|
|
5
6
|
blockSchema: import("..").MockFunction<import("..").BlockSchema, [(Partial<import("..").BlockSchema> | undefined)?]>;
|
|
@@ -30,6 +31,26 @@ export declare const mocks: {
|
|
|
30
31
|
}) | undefined)?]>;
|
|
31
32
|
log: import("..").MockFunction<import("..").Log, [(Partial<import("..").Log> | undefined)?]>;
|
|
32
33
|
logLevel: import("..").MockFunction<0 | 10 | 20 | 50 | 30 | 40, []>;
|
|
34
|
+
markdownCodeBlockString: import("..").MockFunction<string, [({
|
|
35
|
+
lines?: number | undefined;
|
|
36
|
+
} | undefined)?]>;
|
|
37
|
+
markdownCodeSpanString: import("..").MockFunction<string, []>;
|
|
38
|
+
markdownContentString: import("..").MockFunction<string, [({
|
|
39
|
+
lines?: number | undefined;
|
|
40
|
+
} | undefined)?]>;
|
|
41
|
+
markdownHeaderString: import("..").MockFunction<string, [({
|
|
42
|
+
level?: number | undefined;
|
|
43
|
+
} | undefined)?]>;
|
|
44
|
+
markdownQuoteString: import("..").MockFunction<string, [({
|
|
45
|
+
lines?: number | undefined;
|
|
46
|
+
} | undefined)?]>;
|
|
47
|
+
markdownString: import("..").MockFunction<string, [({
|
|
48
|
+
sections?: number | undefined;
|
|
49
|
+
} | undefined)?]>;
|
|
50
|
+
markdownTableString: import("..").MockFunction<string, [({
|
|
51
|
+
rows?: number | undefined;
|
|
52
|
+
columns?: number | undefined;
|
|
53
|
+
} | undefined)?]>;
|
|
33
54
|
notification: import("..").MockFunction<import("..").Notification, [(Partial<import("..").Notification> | undefined)?]>;
|
|
34
55
|
notificationCreate: import("..").MockFunction<import("..").NotificationCreate, [(Partial<import("..").NotificationCreate> | undefined)?]>;
|
|
35
56
|
noun: import("..").MockFunction<string, []>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MockFunction } from '../services/Mocker';
|
|
2
|
+
export declare const randomMarkdownHeaderString: MockFunction<string, [{
|
|
3
|
+
level?: number;
|
|
4
|
+
}?]>;
|
|
5
|
+
export declare const randomMarkdownQuoteString: MockFunction<string, [{
|
|
6
|
+
lines?: number;
|
|
7
|
+
}?]>;
|
|
8
|
+
export declare const randomMarkdownContentString: MockFunction<string, [{
|
|
9
|
+
lines?: number;
|
|
10
|
+
}?]>;
|
|
11
|
+
export declare const randomMarkdownTableString: MockFunction<string, [{
|
|
12
|
+
rows?: number;
|
|
13
|
+
columns?: number;
|
|
14
|
+
}?]>;
|
|
15
|
+
export declare const randomMarkdownCodeSpanString: MockFunction<string, []>;
|
|
16
|
+
export declare const randomMarkdownCodeBlockString: MockFunction<string, [{
|
|
17
|
+
lines?: number;
|
|
18
|
+
}?]>;
|
|
19
|
+
export declare const randomMarkdownString: MockFunction<string, [{
|
|
20
|
+
sections?: number;
|
|
21
|
+
}?]>;
|
|
@@ -1,24 +1,49 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const artifactTypes: readonly ["result", "markdown", "table", "unknown"];
|
|
2
|
+
export type ArtifactType = typeof artifactTypes[number];
|
|
3
|
+
export type ResultArtifactData = Record<string, unknown>;
|
|
4
|
+
export type MarkdownArtifactData = string;
|
|
5
|
+
export type TableArtifactData = Record<string, unknown>[];
|
|
6
|
+
export type UnknownArtifactData = unknown;
|
|
7
|
+
export type ArtifactData = ResultArtifactData | MarkdownArtifactData | TableArtifactData | UnknownArtifactData;
|
|
8
|
+
export type ArtifactMetadata = Record<string, string>;
|
|
2
9
|
export interface IArtifact {
|
|
3
10
|
id: string;
|
|
4
11
|
created: Date;
|
|
5
12
|
updated: Date;
|
|
6
|
-
key: string;
|
|
7
|
-
type:
|
|
13
|
+
key: string | null;
|
|
14
|
+
type: ArtifactType;
|
|
15
|
+
description: string | null;
|
|
8
16
|
data: ArtifactData;
|
|
9
|
-
metadata:
|
|
17
|
+
metadata: ArtifactMetadata;
|
|
10
18
|
flowRunId: string | null;
|
|
11
19
|
taskRunId: string | null;
|
|
12
20
|
}
|
|
21
|
+
export type ResultArtifact = IArtifact & {
|
|
22
|
+
type: 'result';
|
|
23
|
+
data: ResultArtifactData;
|
|
24
|
+
};
|
|
25
|
+
export type MarkdownArtifact = IArtifact & {
|
|
26
|
+
type: 'markdown';
|
|
27
|
+
data: MarkdownArtifactData;
|
|
28
|
+
};
|
|
29
|
+
export type TableArtifact = IArtifact & {
|
|
30
|
+
type: 'table';
|
|
31
|
+
data: TableArtifactData;
|
|
32
|
+
};
|
|
33
|
+
export type UnknownArtifact = IArtifact & {
|
|
34
|
+
type: 'unknown';
|
|
35
|
+
data: unknown;
|
|
36
|
+
};
|
|
13
37
|
export declare class Artifact implements IArtifact {
|
|
14
38
|
readonly id: string;
|
|
39
|
+
readonly key: string | null;
|
|
15
40
|
readonly flowRunId: string | null;
|
|
16
41
|
readonly taskRunId: string | null;
|
|
17
42
|
readonly created: Date;
|
|
18
43
|
readonly updated: Date;
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
type: ArtifactType;
|
|
45
|
+
description: string | null;
|
|
21
46
|
data: ArtifactData;
|
|
22
|
-
metadata:
|
|
47
|
+
metadata: ArtifactMetadata;
|
|
23
48
|
constructor(artifact: IArtifact);
|
|
24
49
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type WorkPoolType = typeof workPoolTypes[number];
|
|
1
|
+
import { BaseJobTemplateRequest } from '../models/api/WorkPoolRequest';
|
|
3
2
|
export interface IWorkPool {
|
|
4
3
|
readonly id: string;
|
|
5
4
|
created: Date;
|
|
@@ -10,6 +9,7 @@ export interface IWorkPool {
|
|
|
10
9
|
isPaused: boolean;
|
|
11
10
|
defaultQueueId: string;
|
|
12
11
|
concurrencyLimit: number | null;
|
|
12
|
+
baseJobTemplate: Record<string, unknown>;
|
|
13
13
|
}
|
|
14
14
|
export declare class WorkPool implements IWorkPool {
|
|
15
15
|
readonly id: string;
|
|
@@ -21,6 +21,7 @@ export declare class WorkPool implements IWorkPool {
|
|
|
21
21
|
isPaused: boolean;
|
|
22
22
|
defaultQueueId: string;
|
|
23
23
|
concurrencyLimit: number | null;
|
|
24
|
+
baseJobTemplate: BaseJobTemplateRequest;
|
|
24
25
|
constructor(workPool: IWorkPool);
|
|
25
26
|
get typeLabel(): string;
|
|
26
27
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { SchemaValues } from '../types/schemas';
|
|
1
2
|
export type WorkPoolCreate = Partial<{
|
|
2
3
|
name: string;
|
|
3
4
|
description: string;
|
|
4
5
|
type: string;
|
|
5
6
|
isPaused: boolean;
|
|
6
7
|
concurrencyLimit: number;
|
|
8
|
+
baseJobTemplate: Record<string, unknown>;
|
|
9
|
+
defaultVariableValues: SchemaValues;
|
|
7
10
|
}>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { SchemaValues, WorkerBaseJobTemplate } from '../types/schemas';
|
|
1
2
|
export type WorkPoolEdit = Partial<{
|
|
2
3
|
description: string | null;
|
|
3
4
|
isPaused: boolean;
|
|
4
5
|
concurrencyLimit: number | null;
|
|
6
|
+
baseJobTemplate: WorkerBaseJobTemplate;
|
|
7
|
+
updatedDefaultVariableValues: SchemaValues;
|
|
5
8
|
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SchemaProperty } from '../types';
|
|
2
|
+
export type DefaultBaseJobConfiguration = {
|
|
3
|
+
jobConfiguration: Record<string, unknown>;
|
|
4
|
+
variables: SchemaProperty;
|
|
5
|
+
};
|
|
6
|
+
export type WorkerCollectionItem = {
|
|
7
|
+
defaultBaseJobConfiguration?: Record<string, unknown>;
|
|
8
|
+
description?: string;
|
|
9
|
+
documentationUrl?: string;
|
|
10
|
+
installCommand?: string;
|
|
11
|
+
logoUrl?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
14
|
+
export type WorkerColection = Record<string, WorkerCollectionItem>;
|
|
15
|
+
export type PrefectWorkerCollection = {
|
|
16
|
+
prefect: {
|
|
17
|
+
workers: WorkerColection;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export type ArtifactDataResponse =
|
|
1
|
+
export type ArtifactDataResponse = unknown;
|
|
2
|
+
export type ArtifactMetadataResponse = Record<string, string>;
|
|
2
3
|
export type ArtifactResponse = {
|
|
3
4
|
id: string;
|
|
4
5
|
created: string;
|
|
5
6
|
updated: string;
|
|
6
7
|
key: string;
|
|
7
8
|
type: string;
|
|
9
|
+
description: string | null;
|
|
8
10
|
data: ArtifactDataResponse;
|
|
9
|
-
metadata_:
|
|
11
|
+
metadata_: ArtifactMetadataResponse;
|
|
10
12
|
flow_run_id: string | null;
|
|
11
13
|
task_run_id: string | null;
|
|
12
14
|
};
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import { SchemaResponse } from '../../models/api/SchemaResponse';
|
|
2
|
+
export type BaseJobTemplateRequest = {
|
|
3
|
+
job_configuration?: Record<string, string>;
|
|
4
|
+
variables?: SchemaResponse;
|
|
5
|
+
};
|
|
1
6
|
export type WorkPoolCreateRequest = Partial<{
|
|
2
7
|
name: string;
|
|
3
8
|
description: string;
|
|
4
9
|
type: string;
|
|
5
10
|
is_paused: boolean;
|
|
6
11
|
concurrency_limit: number;
|
|
12
|
+
base_job_template: BaseJobTemplateRequest;
|
|
7
13
|
}>;
|
|
8
14
|
export type WorkPoolEditRequest = Partial<{
|
|
9
15
|
description: string | null;
|
|
10
16
|
is_paused: boolean;
|
|
11
17
|
concurrency_limit: number | null;
|
|
18
|
+
base_job_template: BaseJobTemplateRequest;
|
|
12
19
|
}>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { SchemaResponse } from '../../models/api/SchemaResponse';
|
|
1
2
|
import { DateString } from '../../types/dates';
|
|
3
|
+
export type BaseJobTemplateResponse = {
|
|
4
|
+
job_configuration?: Record<string, string>;
|
|
5
|
+
variables?: SchemaResponse;
|
|
6
|
+
};
|
|
2
7
|
export type WorkPoolResponse = {
|
|
3
8
|
id: string;
|
|
4
9
|
created: DateString;
|
|
@@ -9,4 +14,5 @@ export type WorkPoolResponse = {
|
|
|
9
14
|
is_paused: boolean | null;
|
|
10
15
|
concurrency_limit: number | null;
|
|
11
16
|
default_queue_id: string;
|
|
17
|
+
base_job_template: BaseJobTemplateResponse;
|
|
12
18
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SchemaPropertyResponse } from '../../models/api/SchemaResponse';
|
|
2
|
+
export type DefaultBaseJobConfigurationResponse = {
|
|
3
|
+
job_configuration: Record<string, unknown>;
|
|
4
|
+
variables: SchemaPropertyResponse;
|
|
5
|
+
};
|
|
6
|
+
export type WorkerCollectionItemResponse = {
|
|
7
|
+
default_base_job_configuration?: DefaultBaseJobConfigurationResponse;
|
|
8
|
+
description?: string;
|
|
9
|
+
documentation_url?: string;
|
|
10
|
+
install_command?: string;
|
|
11
|
+
logo_url?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
14
|
+
export type WorkerCollectionResponse = Record<string, WorkerCollectionItemResponse>;
|
|
15
|
+
export type PrefectWorkerCollectionResponse = Record<string, WorkerCollectionResponse>;
|
|
@@ -33,6 +33,7 @@ export * from './StateUpdateRequest';
|
|
|
33
33
|
export * from './TaskInputResponse';
|
|
34
34
|
export * from './TaskRunResponse';
|
|
35
35
|
export * from './UiFlowRunHistoryResponse';
|
|
36
|
+
export * from './WorkerCollectionItemResponse';
|
|
36
37
|
export * from './WorkerScheduledFlowRunResponse';
|
|
37
38
|
export * from './WorkerScheduledFlowRunsRequest';
|
|
38
39
|
export * from './WorkPoolQueueRequest';
|
|
@@ -19,6 +19,7 @@ export * from './ExistingHandleError';
|
|
|
19
19
|
export * from './FilterDateError';
|
|
20
20
|
export * from './FilterPrefixError';
|
|
21
21
|
export * from './FilterRelativeDateUnitError';
|
|
22
|
+
export * from './Filters';
|
|
22
23
|
export * from './Flow';
|
|
23
24
|
export * from './FlowRun';
|
|
24
25
|
export * from './GraphNode';
|
|
@@ -45,6 +46,7 @@ export * from './TaskInput';
|
|
|
45
46
|
export * from './TaskRun';
|
|
46
47
|
export * from './TimelineNode';
|
|
47
48
|
export * from './UiFlowRunHistory';
|
|
49
|
+
export * from './WorkerCollectionItem';
|
|
48
50
|
export * from './WorkerScheduledFlowRun';
|
|
49
51
|
export * from './WorkerScheduledFlowRuns';
|
|
50
52
|
export * from './WorkPool';
|
|
@@ -60,4 +62,3 @@ export * from './WorkQueueEdit';
|
|
|
60
62
|
export * from './WorkQueueFilter';
|
|
61
63
|
export * from './WorkQueueHealthPolicy';
|
|
62
64
|
export * from './WorkQueueStatus';
|
|
63
|
-
export * from './Filters';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CollectionItem } from '../models';
|
|
1
|
+
import { CollectionItem, WorkerCollectionItem } from '../models';
|
|
2
2
|
import { Api } from '../services/Api';
|
|
3
3
|
export declare class CollectionsApi extends Api {
|
|
4
4
|
protected routePrefix: string;
|
|
5
5
|
getFlowCollection(): Promise<CollectionItem[]>;
|
|
6
|
+
getWorkerCollection(): Promise<WorkerCollectionItem[]>;
|
|
6
7
|
}
|
|
@@ -107,6 +107,9 @@ export declare const mapper: Mapper<{
|
|
|
107
107
|
CollectionItemResponse: {
|
|
108
108
|
CollectionItem: MapFunction<import("..").CollectionItemResponse, import("..").CollectionItem>;
|
|
109
109
|
};
|
|
110
|
+
PrefectWorkerCollectionResponse: {
|
|
111
|
+
WorkerCollectionItem: MapFunction<import("..").PrefectWorkerCollectionResponse, import("..").WorkerCollectionItem[]>;
|
|
112
|
+
};
|
|
110
113
|
CollectionResponse: {
|
|
111
114
|
CollectionItems: MapFunction<import("..").CollectionsResponse, import("..").CollectionItem[]>;
|
|
112
115
|
};
|
|
@@ -336,12 +339,15 @@ export declare const mapper: Mapper<{
|
|
|
336
339
|
type: string;
|
|
337
340
|
isPaused: boolean;
|
|
338
341
|
concurrencyLimit: number;
|
|
342
|
+
baseJobTemplate: Record<string, unknown>;
|
|
343
|
+
defaultVariableValues: import("..").SchemaValues;
|
|
339
344
|
}>, Partial<{
|
|
340
345
|
name: string;
|
|
341
346
|
description: string;
|
|
342
347
|
type: string;
|
|
343
348
|
is_paused: boolean;
|
|
344
349
|
concurrency_limit: number;
|
|
350
|
+
base_job_template: import("..").BaseJobTemplateRequest;
|
|
345
351
|
}>>;
|
|
346
352
|
};
|
|
347
353
|
WorkPoolEdit: {
|
|
@@ -349,10 +355,13 @@ export declare const mapper: Mapper<{
|
|
|
349
355
|
description: string | null;
|
|
350
356
|
isPaused: boolean;
|
|
351
357
|
concurrencyLimit: number | null;
|
|
358
|
+
baseJobTemplate: import("..").WorkerBaseJobTemplate;
|
|
359
|
+
updatedDefaultVariableValues: import("..").SchemaValues;
|
|
352
360
|
}>, Partial<{
|
|
353
361
|
description: string | null;
|
|
354
362
|
is_paused: boolean;
|
|
355
363
|
concurrency_limit: number | null;
|
|
364
|
+
base_job_template: import("..").BaseJobTemplateRequest;
|
|
356
365
|
}>>;
|
|
357
366
|
};
|
|
358
367
|
WorkPoolQueue: {
|
|
@@ -434,6 +443,12 @@ export declare const mapper: Mapper<{
|
|
|
434
443
|
WorkPoolQueueFilter: {
|
|
435
444
|
WorkPoolQueueFilterRequest: MapFunction<import("..").WorkPoolQueueFilter, import("../models/api/Filters").WorkPoolQueueFilterRequest>;
|
|
436
445
|
};
|
|
446
|
+
WorkerSchemaProperty: {
|
|
447
|
+
WorkerSchemaPropertyRequest: MapFunction<{
|
|
448
|
+
values: import("..").SchemaValues;
|
|
449
|
+
schema: import("..").WorkerBaseJobTemplate;
|
|
450
|
+
}, import("..").WorkerBaseJobTemplate>;
|
|
451
|
+
};
|
|
437
452
|
FlowRunsHistoryFilter: {
|
|
438
453
|
FlowRunsHistoryFilterRequest: MapFunction<import("..").FlowRunsHistoryFilter, import("../models/api/Filters").FlowRunsHistoryFilterRequest>;
|
|
439
454
|
};
|
|
@@ -13,6 +13,7 @@ export declare class Mocker<T extends Record<string, Mock>> {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const mocker: Mocker<{
|
|
15
15
|
any: MockFunction<any, []>;
|
|
16
|
+
artifact: MockFunction<import("..").Artifact, [(Partial<import("..").Artifact> | undefined)?]>;
|
|
16
17
|
blockDocument: MockFunction<import("..").BlockDocument, [(Partial<import("..").BlockDocument> | undefined)?]>;
|
|
17
18
|
blockDocumentData: MockFunction<Record<string, unknown>, [("url" | "email_addresses" | undefined)?]>;
|
|
18
19
|
blockSchema: MockFunction<import("..").BlockSchema, [(Partial<import("..").BlockSchema> | undefined)?]>;
|
|
@@ -43,6 +44,26 @@ export declare const mocker: Mocker<{
|
|
|
43
44
|
}) | undefined)?]>;
|
|
44
45
|
log: MockFunction<import("..").Log, [(Partial<import("..").Log> | undefined)?]>;
|
|
45
46
|
logLevel: MockFunction<0 | 10 | 20 | 50 | 30 | 40, []>;
|
|
47
|
+
markdownCodeBlockString: MockFunction<string, [({
|
|
48
|
+
lines?: number | undefined;
|
|
49
|
+
} | undefined)?]>;
|
|
50
|
+
markdownCodeSpanString: MockFunction<string, []>;
|
|
51
|
+
markdownContentString: MockFunction<string, [({
|
|
52
|
+
lines?: number | undefined;
|
|
53
|
+
} | undefined)?]>;
|
|
54
|
+
markdownHeaderString: MockFunction<string, [({
|
|
55
|
+
level?: number | undefined;
|
|
56
|
+
} | undefined)?]>;
|
|
57
|
+
markdownQuoteString: MockFunction<string, [({
|
|
58
|
+
lines?: number | undefined;
|
|
59
|
+
} | undefined)?]>;
|
|
60
|
+
markdownString: MockFunction<string, [({
|
|
61
|
+
sections?: number | undefined;
|
|
62
|
+
} | undefined)?]>;
|
|
63
|
+
markdownTableString: MockFunction<string, [({
|
|
64
|
+
rows?: number | undefined;
|
|
65
|
+
columns?: number | undefined;
|
|
66
|
+
} | undefined)?]>;
|
|
46
67
|
notification: MockFunction<import("..").Notification, [(Partial<import("..").Notification> | undefined)?]>;
|
|
47
68
|
notificationCreate: MockFunction<import("..").NotificationCreate, [(Partial<import("..").NotificationCreate> | undefined)?]>;
|
|
48
69
|
noun: MockFunction<string, []>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Artifact } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { ArtifactsFilter } from '../models/Filters';
|
|
3
3
|
import { WorkspaceApi } from '../services/WorkspaceApi';
|
|
4
4
|
export interface IWorkspaceArtifactsApi {
|
|
5
5
|
getArtifact: (id: string) => Promise<Artifact>;
|
|
6
|
-
getArtifacts: (filter:
|
|
7
|
-
getArtifactsCount: (filter:
|
|
6
|
+
getArtifacts: (filter: ArtifactsFilter) => Promise<Artifact[]>;
|
|
7
|
+
getArtifactsCount: (filter: ArtifactsFilter) => Promise<number>;
|
|
8
8
|
deleteArtifact: (id: string) => Promise<void>;
|
|
9
9
|
}
|
|
10
10
|
export declare class WorkspaceArtifactsApi extends WorkspaceApi implements IWorkspaceArtifactsApi {
|
|
11
11
|
protected routePrefix: string;
|
|
12
12
|
private readonly batcher;
|
|
13
13
|
getArtifact(id: string): Promise<Artifact>;
|
|
14
|
-
getArtifacts(filter?:
|
|
15
|
-
getArtifactsCount(filter?:
|
|
14
|
+
getArtifacts(filter?: ArtifactsFilter): Promise<Artifact[]>;
|
|
15
|
+
getArtifactsCount(filter?: ArtifactsFilter): Promise<number>;
|
|
16
16
|
deleteArtifact(id: string): Promise<void>;
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
2
|
import { MaybeRef } from '../types/reactivity';
|
|
3
|
-
export declare const workspaceFeatureFlags: readonly ["access:collections"];
|
|
3
|
+
export declare const workspaceFeatureFlags: readonly ["access:collections", "access:workers"];
|
|
4
4
|
export type WorkspaceFeatureFlag = typeof workspaceFeatureFlags[number];
|
|
5
5
|
export declare const workspacePermissions: readonly ["create:automation", "create:block", "create:concurrency_limit", "create:deployment", "create:flow_run", "create:flow", "create:log", "create:notification_policy", "create:saved_search", "create:task_run", "create:work_queue", "create:work_pool_queue", "create:work_pool", "create:workspace_bot_access", "create:workspace_user_access", "delete:automation", "delete:block", "delete:concurrency_limit", "delete:deployment", "delete:flow_run", "delete:flow", "delete:notification_policy", "delete:saved_search", "delete:task_run", "delete:work_queue", "delete:work_pool_queue", "delete:work_pool", "delete:workspace_bot_access", "delete:workspace_user_access", "read:automation", "read:block", "read:concurrency_limit", "read:deployment", "read:flow_run", "read:flow", "read:log", "read:notification_policy", "read:saved_search", "read:task_run", "read:work_queue", "read:work_pool_queue", "read:work_pool", "read:workspace_bot_access", "read:workspace_settings", "read:workspace_user_access", "run:deployment", "update:automation", "update:block", "update:deployment", "update:flow_run", "update:flow", "update:notification_policy", "update:task_run", "update:work_queue", "update:work_pool_queue", "update:work_pool", "update:workspace_bot_access", "update:workspace_settings", "update:workspace_user_access", "update:workspace"];
|
|
6
6
|
export type WorkspacePermission = typeof workspacePermissions[number];
|
|
@@ -4,6 +4,10 @@ export type ArtifactSortValues = typeof artifactSortValues[number];
|
|
|
4
4
|
export declare const defaultArtifactSort: FlowSortValues;
|
|
5
5
|
export declare function isArtifactSortValue(value: unknown): value is ArtifactSortValues;
|
|
6
6
|
export declare function isArtifactSortValue(value: Ref<unknown>): value is Ref<ArtifactSortValues>;
|
|
7
|
+
export declare const artifactSortOptions: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
7
11
|
export declare const flowSortValues: readonly ["CREATED_DESC", "UPDATED_DESC", "NAME_DESC", "NAME_ASC"];
|
|
8
12
|
export type FlowSortValues = typeof flowSortValues[number];
|
|
9
13
|
export declare const defaultFlowSort: FlowSortValues;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArtifactType, ResultArtifactData, MarkdownArtifactData, Artifact, ArtifactData, TableArtifactData } from '../models/Artifact';
|
|
2
|
+
export declare function isArtifactType<T extends ArtifactType>(artifact: Artifact, type: T): artifact is Artifact & {
|
|
3
|
+
type: T;
|
|
4
|
+
};
|
|
5
|
+
export declare function isKnownArtifactType(type: unknown): type is ArtifactType & Exclude<ArtifactType, 'unknown'>;
|
|
6
|
+
export declare function isResultArtifactData(data: ArtifactData): data is ResultArtifactData;
|
|
7
|
+
export declare function isMarkdownArtifactData(data: ArtifactData): data is MarkdownArtifactData;
|
|
8
|
+
export declare function isTableArtifactData(data: ArtifactData): data is TableArtifactData;
|
|
@@ -61,5 +61,9 @@ export type Schema = SchemaProperty & {
|
|
|
61
61
|
secretFields?: string[];
|
|
62
62
|
definitions?: SchemaDefinitions;
|
|
63
63
|
};
|
|
64
|
+
export type WorkerBaseJobTemplate = {
|
|
65
|
+
job_configuration?: Record<string, string>;
|
|
66
|
+
variables?: Schema;
|
|
67
|
+
};
|
|
64
68
|
export declare function isSchemaValues(input: unknown): input is SchemaValues;
|
|
65
69
|
export declare function schemaHas<T extends Schema | SchemaProperty, P extends keyof T>(schema: T, property: P): schema is T & Require<T, P>;
|