diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1367,6 +1367,7 @@ 'HarbormasterBuildableListController' => 'applications/harbormaster/controller/HarbormasterBuildableListController.php', 'HarbormasterBuildablePHIDType' => 'applications/harbormaster/phid/HarbormasterBuildablePHIDType.php', 'HarbormasterBuildableQuery' => 'applications/harbormaster/query/HarbormasterBuildableQuery.php', + 'HarbormasterBuildableSearchAPIMethod' => 'applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php', 'HarbormasterBuildableSearchEngine' => 'applications/harbormaster/query/HarbormasterBuildableSearchEngine.php', 'HarbormasterBuildableStatus' => 'applications/harbormaster/constants/HarbormasterBuildableStatus.php', 'HarbormasterBuildableTransaction' => 'applications/harbormaster/storage/HarbormasterBuildableTransaction.php', @@ -6845,6 +6846,7 @@ 'PhabricatorApplicationTransactionInterface', 'PhabricatorPolicyInterface', 'HarbormasterBuildableInterface', + 'PhabricatorConduitResultInterface', 'PhabricatorDestructibleInterface', ), 'HarbormasterBuildableActionController' => 'HarbormasterController', @@ -6852,6 +6854,7 @@ 'HarbormasterBuildableListController' => 'HarbormasterController', 'HarbormasterBuildablePHIDType' => 'PhabricatorPHIDType', 'HarbormasterBuildableQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'HarbormasterBuildableSearchAPIMethod' => 'PhabricatorSearchEngineAPIMethod', 'HarbormasterBuildableSearchEngine' => 'PhabricatorApplicationSearchEngine', 'HarbormasterBuildableStatus' => 'Phobject', 'HarbormasterBuildableTransaction' => 'PhabricatorApplicationTransaction', diff --git a/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php new file mode 100644 --- /dev/null +++ b/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php @@ -0,0 +1,18 @@ +setKey('objectPHID') + ->setType('phid') + ->setDescription(pht('PHID of the object that is built.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('containerPHID') + ->setType('phid') + ->setDescription(pht('PHID of the object containing this buildable.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('buildableStatus') + ->setType('map') + ->setDescription(pht('The current status of this buildable.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('isManual') + ->setType('bool') + ->setDescription(pht('True if this is a manual buildable.')), + ); + } + + public function getFieldValuesForConduit() { + return array( + 'objectPHID' => $this->getBuildablePHID(), + 'containerPHID' => $this->getContainerPHID(), + 'buildableStatus' => array( + 'value' => $this->getBuildableStatus(), + ), + 'isManual' => (bool)$this->getIsManualBuildable(), + ); + } + + public function getConduitSearchAttachments() { + return array(); + } + + /* -( PhabricatorDestructibleInterface )----------------------------------- */