kubex / definitions
Kubex Definitions
Requires
- php: >=8.0.0
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 0.35.1
- 0.35.0
- 0.34.1
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.5
- 0.30.4
- 0.30.3
- 0.30.2
- 0.30.1
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.1
- 0.25.0
- 0.24.1
- 0.24.0
- 0.23.1
- 0.23.0
- 0.22.0
- 0.21.4
- 0.21.3
- 0.21.2
- 0.21.1
- 0.21.0
- 0.20.7
- 0.20.6
- 0.20.5
- 0.20.4
- 0.20.3
- 0.20.2
- 0.20.1
- 0.20.0
- 0.19.0
- 0.18.3
- 0.18.2
- 0.18.1
- 0.18.0
- 0.17.0
- 0.16.3
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.0
- 0.14.0
- 0.12.5
- 0.12.4
- 0.12.3
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-add-context-data-header
- dev-7-3
This package is auto-updated.
Last update: 2026-10-23 16:46:02 UTC
README
PHP definitions for Kubex applications, matching the published Go SDK models.
Requires PHP 8.0 or later. Composer loads the classes and the namespaced endpoint
constants in Paths.php.
Definitions support provider registrations and dependencies, system/user access
restrictions, JavaScript requirements (Necessity), and blueprint/help discovery.
Return BlueprintsResponse from /_kubex/blueprints and HelpArticlesResponse
from /_kubex/help, with provideBlueprints / provideHelp enabled on the app.
Help articles are served separately from the app definition.
use Kubex\Definitions\Definition; use Kubex\Definitions\EntryPoint; use Kubex\Definitions\LaunchMode; use Kubex\Definitions\Necessity; $definition = new Definition(); // Set the app ID, name and other application fields as usual. $definition->javascriptExecution = Necessity::Required; $definition->searchPanel = EntryPoint::create('/search', 'Search'); $definition->searchPanel->launchMode = LaunchMode::Modal; $definition->provideHelp = true;
searchPanelPath is deprecated. Existing callers can continue assigning it;
serialization also generates a searchPanel entry point from that path. An
explicit searchPanel takes precedence. The legacy field remains in JSON for
older consumers.
IntegrationPoint::$secondaryActions contains entry points shown on long press
or right click. Path::$kiosk enables kiosk mode for a path. Distributors are
available through BuiltInResource::Distributor and Headers::RequestDistributors.
PermissionMeta::$min and $max default to null (omitted). Setting either to
0 sends an explicit zero bound. Code checking whether a bound is set should
compare against null.
Request and response helpers are independent of an HTTP framework:
use Kubex\Definitions\Headers; use Kubex\Definitions\RequestContext; use Kubex\Definitions\ResponseWriter; use Kubex\Definitions\ScopedKey; $context = new RequestContext(getallheaders(), $definition->id); $signatureKey = Headers::createSignatureKey($workspaceID, $appSecret); if(!$context->verify($signatureKey) || !$context->hasResourcePermission(ScopedKey::createKey('view'), 'invoice/123')) { http_response_code(403); return; } ResponseWriter::create()->refreshDataTable('#invoices')->noContent()->write();
RequestContext reads credentials, permissions and built-in resources; deny
rules take precedence. ResponseWriter::getHeaders() and getStatusCode() allow
framework adapters to apply the result themselves. Alert and AlertButton
provide structured alert headers. Semantic versions use
Kubex\Definitions\Semver\Version::parse(), separate from the application build
metadata in Kubex\Definitions\Version. Installation request/response, vendor
and event models are also available.
Run the serialization and protocol checks with composer test or
php tests/parity.php. The latter accepts --json to emit the populated fixtures
for interoperability checks against the Go SDK.