| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5\Contracts; |
| 4: | |
| 5: | use LaravelUi5\Core\Enums\ArtifactType; |
| 6: | |
| 7: | /** |
| 8: | * Base interface for all UI5 artifacts such as applications, libraries, cards, or tiles. |
| 9: | * |
| 10: | * This interface provides the minimal contract required for an artefact to be |
| 11: | * discoverable and routable within the Ui5Registry. All artefacts must declare |
| 12: | * a unique JavaScript namespace and a version string to support cache busting |
| 13: | * and reliable resource resolution. |
| 14: | */ |
| 15: | interface Ui5ArtifactInterface |
| 16: | { |
| 17: | /** |
| 18: | * Returns the parent module of this artifact, if any. |
| 19: | * |
| 20: | * - For Applications, Libraries, Cards, Reports, Tiles, KPIs, Actions and Resources: |
| 21: | * this returns the Ui5ModuleInterface instance that owns the artifact. |
| 22: | * - For Dashboards (global containers outside module scope), this returns null. |
| 23: | * |
| 24: | * @return Ui5ModuleInterface|null |
| 25: | */ |
| 26: | public function getModule(): ?Ui5ModuleInterface; |
| 27: | |
| 28: | /** |
| 29: | * Returns the JavaScript namespace of the artifact. |
| 30: | * |
| 31: | * This namespace must be globally unique and is typically used as |
| 32: | * the id in manifest.json as well as the key in the UI5 resource |
| 33: | * root mapping (e.g. "io.pragmatiqu.tools"). |
| 34: | * |
| 35: | * @return string |
| 36: | */ |
| 37: | public function getNamespace(): string; |
| 38: | |
| 39: | /** |
| 40: | * Returns the type of the artifact (e.g., application, library, card). |
| 41: | * |
| 42: | * @return ArtifactType |
| 43: | */ |
| 44: | public function getType(): ArtifactType; |
| 45: | |
| 46: | /** |
| 47: | * Returns the semantic version of the artifact. |
| 48: | * |
| 49: | * The version string is used to construct resource paths and control |
| 50: | * client-side caching (e.g. "1.0.0"). |
| 51: | * |
| 52: | * @return string |
| 53: | */ |
| 54: | public function getVersion(): string; |
| 55: | |
| 56: | /** |
| 57: | * Returns the localized title of the application (e.g., for manifest.json). |
| 58: | * |
| 59: | * @return string |
| 60: | */ |
| 61: | public function getTitle(): string; |
| 62: | |
| 63: | /** |
| 64: | * Returns a short description of the application. |
| 65: | * |
| 66: | * @return string |
| 67: | */ |
| 68: | public function getDescription(): string; |
| 69: | } |
| 70: |