@pimcore/studio-ui-bundle 1.0.0-canary.20251120-134135-306bc0d → 1.0.0-canary.20251121-003148-c8f1cf0
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/build/types/src/core/modules/execution-engine/execution-engine-slice.d.ts +1 -0
- package/dist/build/types/src/core/modules/execution-engine/jobs/abstact-job.d.ts +1 -0
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/abstract-batch-delete-job.d.ts +30 -0
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/asset-batch-delete-job.d.ts +15 -0
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/data-object-batch-delete-job.d.ts +15 -0
- package/dist/build/types/src/core/modules/execution-engine/message-handlers/default-job-handler.d.ts +13 -4
- package/dist/build/types/src/core/modules/execution-engine/notification/job/job-view.d.ts +1 -2
- package/package.json +1 -1
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/factory.d.ts +0 -25
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/notification-job-container.d.ts +0 -17
|
@@ -41,4 +41,5 @@ export declare const selectAll: (state: Record<string, any>) => AbstractJob[], s
|
|
|
41
41
|
status: import("./jobs/abstact-job").JobStatus;
|
|
42
42
|
topics: import("../../types/non-empty-array").NonEmptyArray<typeof import("./topics").topics[string]>;
|
|
43
43
|
config: unknown;
|
|
44
|
+
onRetry?: (() => void | Promise<void>) | undefined;
|
|
44
45
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
|
+
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
12
|
+
export interface AbstractBatchDeleteJobConfig extends BaseJobConfig {
|
|
13
|
+
itemIds: number[];
|
|
14
|
+
}
|
|
15
|
+
export interface AbstractBatchDeleteJobOptions {
|
|
16
|
+
itemIds: number[];
|
|
17
|
+
title: string;
|
|
18
|
+
onFinish?: () => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare abstract class AbstractBatchDeleteJob implements JobInterface {
|
|
21
|
+
protected readonly itemIds: number[];
|
|
22
|
+
protected readonly title: string;
|
|
23
|
+
protected readonly onFinish?: () => Promise<void>;
|
|
24
|
+
constructor(options: AbstractBatchDeleteJobOptions);
|
|
25
|
+
run(options: JobRunOptions): Promise<void>;
|
|
26
|
+
protected abstract executeDeleteRequest(): Promise<string | number | null>;
|
|
27
|
+
protected getJobConfig(): AbstractBatchDeleteJobConfig;
|
|
28
|
+
protected handleCompletion(): Promise<void>;
|
|
29
|
+
protected handleJobFailure(error: any): Promise<void>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { AbstractBatchDeleteJob, type AbstractBatchDeleteJobOptions } from './abstract-batch-delete-job';
|
|
11
|
+
export interface AssetBatchDeleteJobOptions extends AbstractBatchDeleteJobOptions {
|
|
12
|
+
}
|
|
13
|
+
export declare class AssetBatchDeleteJob extends AbstractBatchDeleteJob {
|
|
14
|
+
protected executeDeleteRequest(): Promise<string | number | null>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { AbstractBatchDeleteJob, type AbstractBatchDeleteJobOptions } from './abstract-batch-delete-job';
|
|
11
|
+
export interface DataObjectBatchDeleteJobOptions extends AbstractBatchDeleteJobOptions {
|
|
12
|
+
}
|
|
13
|
+
export declare class DataObjectBatchDeleteJob extends AbstractBatchDeleteJob {
|
|
14
|
+
protected executeDeleteRequest(): Promise<string | number | null>;
|
|
15
|
+
}
|
package/dist/build/types/src/core/modules/execution-engine/message-handlers/default-job-handler.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { AbstractMessageHandler } from '../../../modules/global-message-bus/message-handlers/abstract-message-handler';
|
|
11
11
|
import { type AbstractMercureMessage } from '../../../modules/background-processor/process/abstract-mercure-process';
|
|
12
|
-
import { type AbstractJob } from '../../../modules/execution-engine/jobs/abstact-job';
|
|
12
|
+
import { JobStatus, type AbstractJob } from '../../../modules/execution-engine/jobs/abstact-job';
|
|
13
13
|
/**
|
|
14
14
|
* Default job handler that provides common functionality for job management, Redux integration, status mapping, and progress handling
|
|
15
15
|
* Can be used directly or extended by specific job handlers
|
|
@@ -19,7 +19,8 @@ export declare class DefaultJobHandler<TConfig extends BaseJobConfig> extends Ab
|
|
|
19
19
|
protected job: AbstractJob | null;
|
|
20
20
|
protected readonly config: TConfig;
|
|
21
21
|
protected readonly jobType: string;
|
|
22
|
-
protected readonly onJobCompletion?: (data:
|
|
22
|
+
protected readonly onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
|
|
23
|
+
protected readonly onRetry?: () => void | Promise<void>;
|
|
23
24
|
private lastProgressValue;
|
|
24
25
|
private readonly throttledProgressUpdate;
|
|
25
26
|
constructor(options: DefaultJobHandlerOptions<TConfig>);
|
|
@@ -29,7 +30,7 @@ export declare class DefaultJobHandler<TConfig extends BaseJobConfig> extends Ab
|
|
|
29
30
|
* Override in subclasses for different progress formats (e.g., step-based)
|
|
30
31
|
*/
|
|
31
32
|
protected calculateProgress(data: any): number | null;
|
|
32
|
-
protected handleJobCompletion(data:
|
|
33
|
+
protected handleJobCompletion(data: JobCompletionData): Promise<void>;
|
|
33
34
|
shouldHandle(message: AbstractMercureMessage): boolean;
|
|
34
35
|
getId(): string | number;
|
|
35
36
|
protected getJob(): AbstractJob;
|
|
@@ -45,9 +46,17 @@ export interface BaseJobConfig {
|
|
|
45
46
|
title: string;
|
|
46
47
|
progress?: number;
|
|
47
48
|
}
|
|
49
|
+
export interface JobCompletionData {
|
|
50
|
+
isSuccessful: boolean;
|
|
51
|
+
isFinished: boolean;
|
|
52
|
+
isFailed: boolean;
|
|
53
|
+
status: JobStatus;
|
|
54
|
+
payload: any;
|
|
55
|
+
}
|
|
48
56
|
export interface DefaultJobHandlerOptions<TConfig extends BaseJobConfig> {
|
|
49
57
|
jobRunId: string | number;
|
|
50
58
|
config: TConfig;
|
|
51
59
|
jobType?: string;
|
|
52
|
-
onJobCompletion?: (data:
|
|
60
|
+
onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
|
|
61
|
+
onRetry?: () => void | Promise<void>;
|
|
53
62
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobProps } from './job';
|
|
11
11
|
import React from 'react';
|
|
12
|
-
interface ButtonAction {
|
|
12
|
+
export interface ButtonAction {
|
|
13
13
|
label: string;
|
|
14
14
|
handler: () => void | Promise<void>;
|
|
15
15
|
}
|
|
@@ -22,4 +22,3 @@ export interface JobViewProps extends JobProps {
|
|
|
22
22
|
totalSteps?: number;
|
|
23
23
|
}
|
|
24
24
|
export declare const JobView: (props: JobViewProps) => React.JSX.Element;
|
|
25
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import { type AbstractJob } from '../abstact-job';
|
|
11
|
-
export interface BatchDeleteJob extends AbstractJob {
|
|
12
|
-
type: 'batch-delete';
|
|
13
|
-
config: {
|
|
14
|
-
assetContextId: number;
|
|
15
|
-
};
|
|
16
|
-
refreshGrid: () => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export interface BatchDeleteFactoryArgs {
|
|
19
|
-
action: AbstractJob['action'];
|
|
20
|
-
title: AbstractJob['title'];
|
|
21
|
-
topics: AbstractJob['topics'];
|
|
22
|
-
assetContextId: number;
|
|
23
|
-
refreshGrid: () => Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
export declare const createJob: (job: BatchDeleteFactoryArgs) => BatchDeleteJob;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { type JobProps } from '../../notification/job/job';
|
|
12
|
-
import { type BatchDeleteJob } from '../../../../modules/execution-engine/jobs/batch-delete/factory';
|
|
13
|
-
export interface BatchDeleteProps extends JobProps {
|
|
14
|
-
config: BatchDeleteJob['config'];
|
|
15
|
-
refreshGrid: () => Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
export declare const NotificationJobContainer: (props: BatchDeleteProps) => React.JSX.Element;
|