Enumerations
This section documents the key enumerations used in the Admin Hub solution.
ConnectionType_TSL
Defines the types of connections available for communicating with external services. This enum is extensible and implements the IConnectionClient_TSL interface.
Namespace: Theta.AdminHub.Client
Extensible: Yes
Default Implementation: NotImplementedClient_TSL
Usage
Plugins extend this enum to add new connection types:
enumextension 50100 "BC Admin Center Connection" extends ConnectionType_TSL
{
value(50100; "BC Admin Center")
{
Caption = 'BC Admin Center';
Implementation = IConnectionClient_TSL = "ConnectionClient_TSL";
}
}
Built-in Values
The base enum has no predefined values - all connection types are added through plugins.
Plugin Implementations
Different plugins add their own connection types:
- Admin Center Plugin: BC Admin Center
- Automation Plugin: BC Automation API
- NuGet Plugin: NuGet Package Feed
- SMP Plugin: Service Management Portal
RequestState_TSL
Represents the current state of a request in the processing queue.
Namespace: Theta.AdminHub.Client
Extensible: No
Values
| Value | Description |
|---|---|
| Queued (0) | Request is waiting to be processed by the job queue. |
| Processing (1) | Request is currently being executed. |
| Completed (2) | Request has been successfully processed. |
| Failed (3) | Request encountered an error and could not be completed. |
State Transitions
Usage Example
procedure SetUncompletedStateFilter()
begin
SetCurrentKey(State, ConnectionCode, TenantID, Method, Path);
SetFilter(State, '<>%1', RequestState_TSL::Completed);
end;
SourceProvider_TSL
Defines how Business Central app packages (.app files) are stored and retrieved. This enum is extensible and implements the ISourceProvider_TSL interface.
Namespace: Theta.AdminHub.App
Extensible: Yes
Default Implementation: UndefinedSourceProvider_TSL
Values
| Value | Caption | Implementation | Description |
|---|---|---|---|
| Undefined (0) | (empty) | UndefinedSourceProvider_TSL | No source is defined for this app version. |
| Blob (1) | Blob | BlobSourceProvider_TSL | App package is stored in the database blob field. |
Plugin Extensions
Plugins can add custom source providers:
enumextension 50102 "NuGet Source Provider" extends SourceProvider_TSL
{
value(50102; NuGet)
{
Caption = 'NuGet Package';
Implementation = ISourceProvider_TSL = "NuGet Source Provider";
}
}
Usage in App Version
var
AppVersion: Record AppVersion_TSL;
begin
AppVersion.SourceProvider := AppVersion.SourceProvider::Blob;
if AppVersion.HasSource() then
AppVersion.DownloadSource();
end;
ConnectionState_TSL
Represents the state of a connection configuration.
Namespace: Theta.AdminHub.Client
Extensible: No
Values
| Value | Description |
|---|---|
| NotConfigured | Connection has not been set up or is missing required configuration. |
| Active | Connection is properly configured and ready to use. |
| Disabled | Connection is configured but has been disabled by the user. |
Usage
Used to indicate whether a connection is ready for use in processing requests.
Environment Type
Standard Business Central enum representing the type of environment.
Values
| Value | Description |
|---|---|
| Production | Production environment containing live business data. |
| Sandbox | Sandbox environment for testing and development. |
This enum is used by the Admin Center plugin to identify environment types.
Http Method
Standard REST Client enum for HTTP request methods.
Values
| Value | Description |
|---|---|
| GET | Retrieve data from the server. |
| POST | Create new resources on the server. |
| PUT | Update or replace existing resources. |
| PATCH | Partially update existing resources. |
| DELETE | Remove resources from the server. |
Usage in Requests
var
Request: Record Request_TSL;
begin
Request.Method := Enum::"Http Method"::GET;
Request.Path := '/environments';
Request.Insert(true);
end;
OperationStatus_TSL
Represents the status of a long-running operation in the Admin Center plugin.
Namespace: Theta.AdminHubBCAdminCenter.Environment
Extensible: No
Values
| Value | Description |
|---|---|
| NotStarted | Operation has been scheduled but not yet started. |
| Running | Operation is currently in progress. |
| Succeeded | Operation completed successfully. |
| Failed | Operation failed with an error. |
| Canceled | Operation was canceled by the user or system. |
| Abandoned | Operation was abandoned due to timeout or system issues. |
Usage
Tracks the status of operations like environment updates or app installations through the BC Admin Center API.
UpdateAction_TSL
Defines available actions for updating apps in tenant environments.
Namespace: Theta.AdminHubBCAdminCenter.Environment
Extensible: Yes
Implements: IUpdateAction_TSL
Values
| Value | Description |
|---|---|
| Install | Install a new version of the app. |
| Schedule | Schedule an app update for a future date. |
| UpToDate | App is already up to date (no action needed). |
| Failed | Previous update attempt failed. |
Each value implements the IUpdateAction_TSL interface to provide action-specific behavior.