Skip to content

Commit 3300447

Browse files
author
Vasiliev.A
committed
Bulk api status endpoint and implementation
1 parent 28916b5 commit 3300447

15 files changed

+655
-40
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
*
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
8+
namespace Magento\AsynchronousOperations\Api;
9+
10+
/**
11+
* @api
12+
* @since 100.3.0
13+
*/
14+
interface BulkRepositoryInterface extends \Magento\Framework\Bulk\BulkStatusInterface
15+
{
16+
17+
/**
18+
* @param string $bulkUuid
19+
* @return \Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface
20+
* @throws \Magento\Framework\Exception\NoSuchEntityException
21+
* @since 100.3.0
22+
*/
23+
public function getBulkDetails($bulkUuid);
24+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data;
8+
9+
/**
10+
* Interface
11+
*
12+
* @api
13+
* @since 100.3.0
14+
*/
15+
interface OperationDetailsInterface
16+
{
17+
/**
18+
* Total operations count
19+
*
20+
* @return int
21+
* @since 100.3.0
22+
*/
23+
public function getOperationsTotal();
24+
25+
/**
26+
* Open operations count
27+
*
28+
* @return int
29+
* @since 100.3.0
30+
*/
31+
public function getOpen();
32+
33+
/**
34+
* Successfully completed operations count
35+
*
36+
* @return int
37+
* @since 100.3.0
38+
*/
39+
public function getOperationsSuccessful();
40+
41+
/**
42+
* Total failed operations count
43+
*
44+
* @return int
45+
* @since 100.3.0
46+
*/
47+
public function getTotalFailed();
48+
49+
/**
50+
* Failed not retriable operations count
51+
*
52+
* @return int
53+
* @since 100.3.0
54+
*/
55+
public function getFailedNotRetriable();
56+
57+
/**
58+
* Failed retriable operations count
59+
*
60+
* @return int
61+
* @since 100.3.0
62+
*/
63+
public function getFailedRetriable();
64+
65+
/**
66+
* Rejected operations count
67+
*
68+
* @return int
69+
* @since 100.3.0
70+
*/
71+
public function getRejected();
72+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data;
8+
9+
use \Magento\Framework\Bulk\OperationInterface;
10+
/**
11+
* Getter Class OperationShortDetailsInterface
12+
* Instead of OperationInterface this class don't provide all operation data
13+
* and not responsive to set any data, just get operation data without serialized_data
14+
*
15+
* @api
16+
* @since 100.3.0
17+
* @see \Magento\AsynchronousOperations\Api\Data\OperationInterface
18+
*/
19+
interface OperationShortDetailsInterface
20+
{
21+
/**
22+
* Operation id
23+
*
24+
* @return int
25+
* @since 100.3.0
26+
*/
27+
public function getId();
28+
29+
/**
30+
* Message Queue Topic
31+
*
32+
* @return string
33+
* @since 100.3.0
34+
*/
35+
public function getTopicName();
36+
37+
/**
38+
* Result serialized Data
39+
*
40+
* @return string
41+
* @since 100.3.0
42+
*/
43+
public function getResultSerializedData();
44+
45+
/**
46+
* Get operation status
47+
*
48+
* OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED
49+
*
50+
* @return int
51+
* @since 100.3.0
52+
*/
53+
public function getStatus();
54+
55+
/**
56+
* Get result message
57+
*
58+
* @return string
59+
* @since 100.3.0
60+
*/
61+
public function getResultMessage();
62+
63+
/**
64+
* Get error code
65+
*
66+
* @return int
67+
* @since 100.3.0
68+
*/
69+
public function getErrorCode();
70+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data;
8+
9+
/**
10+
* List of bulk operations with short operation details.
11+
* @api
12+
* @since 100.3.0
13+
*/
14+
interface ShortOperationListInterface
15+
{
16+
/**
17+
* Get list of operations.
18+
*
19+
* @return \Magento\AsynchronousOperations\Api\Data\OperationShortDetailsInterface[]
20+
* @since 100.3.0
21+
*/
22+
public function getItems();
23+
}

0 commit comments

Comments
 (0)