The Blocklet Server Client API utilizes a variety of GraphQL types to structure the data for queries and mutations. This section provides a comprehensive reference for all data types, input objects, enums, and scalars used throughout the API. Understanding these types is crucial for constructing valid requests and interpreting the responses from the Blocklet Server.
Scalar Types#
Scalar types represent the leaves of a GraphQL query. They are primitive values like strings, numbers, or booleans.
|
String
| Represents textual data, represented as UTF-8 character sequences. |
Boolean
| Represents true or false. |
Int
| Represents a signed 32‐bit integer. |
Float
| Represents signed double-precision floating-point values. |
ID
| Represents a unique identifier, often used to refetch an object or as a key for a cache. |
Any
| Represents any JSON-compatible value. |
Bytes
| Represents a byte array. |
Int32
| Represents a 32-bit signed integer. |
Uint32
| Represents a 32-bit unsigned integer. |
Int64
| Represents a 64-bit signed integer. |
Uint64
| Represents a 64-bit unsigned integer. |
Float32
| Represents a 32-bit floating-point number. |
Upload
| Represents a file upload, typically used in mutations. |
Enum Types#
Enums are a special kind of scalar that is restricted to a particular set of allowed values.
BackendServiceType#
Defines the type of backend service a routing rule points to.
|
daemon
| The service is the node daemon itself. |
blocklet
| The service is a running blocklet. |
redirect
| The rule performs an HTTP redirect. |
none
| No backend service is configured. |
general_proxy
| The rule acts as a general proxy to a specified URL. |
direct_response
| The rule returns a direct, static response. |
rewrite
| The rule rewrites the request path. |
component
| The service is a specific component within a blocklet. |
BackupTo#
Specifies the destination for a blocklet backup.
|
spaces
| Backup to a decentralized storage space. |
disk
| Backup to the local disk. |
BlockletSource#
Indicates the origin from which a blocklet was installed.
|
registry
| Installed from a blocklet registry/store. |
local
| Installed from a local directory. |
upload
| Installed from an uploaded file. |
url
| Installed from a direct URL. |
custom
| Installed through a custom or unknown method. |
BlockletStatus#
Represents the current lifecycle status of a blocklet.
|
added
| Blocklet has been added but not yet downloaded. |
downloading
| Blocklet is currently being downloaded. |
downloaded
| Blocklet has been downloaded successfully. |
installing
| Blocklet is currently being installed. |
installed
| Blocklet has been installed but is not running. |
starting
| Blocklet is in the process of starting. |
running
| Blocklet is currently running. |
stopping
| Blocklet is in the process of stopping. |
stopped
| Blocklet is stopped. |
error
| An error occurred in the blocklet's lifecycle. |
upgrading
| Blocklet is currently being upgraded. |
restarting
| Blocklet is restarting. |
corrupted
| Blocklet installation is corrupted. |
waiting
| Blocklet is waiting for a dependency or resource. |
deleted
| Blocklet has been deleted. |
unknown
| The status of the blocklet is unknown. |
Defines the matching strategy for HTTP headers in routing rules.
|
exact
| The header value must be an exact match. |
partial
| The header value must contain the specified string. |
regexp
| The header value must match the specified regular expression. |
Notification_NotificationSeverity#
Defines the severity level of a notification.
|
info
| Informational message. |
success
| Indicates a successful operation. |
error
| Indicates an error has occurred. |
warning
| Indicates a potential issue or warning. |
Notification_NotificationSource#
Specifies the source of the notification.
|
system
| Notification originated from the system/node. |
component
| Notification originated from a blocklet component. |
Notification_NotificationType#
Defines the type or category of the notification.
|
notification
| A standard notification message. |
connect
| A notification related to DID Connect. |
feed
| A feed-style update. |
hi
| A simple greeting or test notification. |
passthrough
| A notification that is passed through without special handling. |
NotificationActivity_ActivityTypeEnum#
Defines the type of user activity for feed-style notifications.
|
comment
| A user made a comment. |
like
| A user liked an item. |
follow
| A user followed another user or item. |
tips
| A user sent a tip. |
mention
| A user was mentioned. |
assign
| A user was assigned a task. |
un_assign
| A user was unassigned from a task. |
NotificationAttachmentType#
Defines the type of attachment included in a notification.
|
asset
| A digital asset. |
vc
| A Verifiable Credential. |
token
| A digital token. |
text
| A plain text attachment. |
image
| An image attachment. |
divider
| A visual divider for formatting. |
transaction
| A transaction record. |
dapp
| A decentralized application link. |
link
| A hyperlink. |
section
| A formatted section of content. |
PublishType#
Specifies the type of artifact being published.
|
resource
| A single resource file. |
pack
| A packed blocklet bundle. |
ReleaseStatus#
Indicates the status of a release in a publishing project.
|
draft
| The release is a draft and not yet published. |
published
| The release has been published. |
SenderType#
Defines the type of webhook sender.
|
slack
| A Slack webhook. |
api
| A generic API webhook. |
StatusCode#
Represents the status code of an API response.
|
ok
| The request was successful. |
blocklet_not_found
| The requested blocklet could not be found. |
blocklet_not_purchased
| The requested blocklet has not been purchased. |
forbidden
| The request is forbidden due to insufficient permissions. |
internal
| An internal server error occurred. |
timeout
| The request timed out. |
Input objects are complex types used as arguments for mutations and queries, allowing you to pass structured data in a single parameter.
Configuration for the AI Gateway (Aigne).
The AI service provider (e.g., 'openai').
The specific model to use (e.g., 'gpt-4').
The API key for the service.
The base URL for the API endpoint.
Access Key ID for providers like AWS.
Secret Access Key for providers like AWS.
The result of the last connection validation.
Configuration for automatic backups.
Whether automatic backups are enabled.
Configuration for automatic IP blocking policies.
Whether automatic blocking is enabled.
The time window in seconds to monitor requests.
The maximum number of requests allowed within the window.
The duration in seconds to block an IP after exceeding the quota.
A list of HTTP status codes to consider for blocking.
Configuration for automatic update checks.
Whether automatic update checks are enabled.
Basic user information used in various input types.
The user's Decentralized Identifier (DID).
URL to the user's avatar image.
The user's email address.
Whether the user is approved.
Timestamp of when the user was created.
Timestamp of the last update to the user's profile.
The user's preferred locale (e.g., 'en').
Configuration for IP blocking policies.
Whether the block policy is enabled.
A list of IP addresses to permanently block.
autoBlocking
AutoBlockPolicyInput
Configuration for automatic IP blocking.
Defines a blocklet access policy.
The unique identifier for the policy.
A descriptive name for the policy.
A detailed description of the policy.
The roles this policy applies to.
If true, the policy logic is inverted (deny instead of allow).
If true, the policy cannot be easily modified or deleted.
Input for querying BlockletAccessPolicy objects.
A search string to filter policies by name or description.
Describes the distribution file of a blocklet.
The URL of the blocklet's tarball file.
The integrity hash of the tarball for verification.
Defines Docker-related settings for a blocklet.
The name of the Docker image to use.
dockerArgs
[DockerRunKeyValuePairInput!]
Arguments to pass to the docker run command.
dockerEnvs
[DockerEnvKeyValuePairInput!]
Environment variables to set in the container.
The command to execute inside the container.
Configuration for a blocklet's gateway settings.
requestLimit
RequestLimitInput
Request limiting configuration.
blockPolicy
BlockPolicyInput
IP blocking policy configuration.
proxyPolicy
ProxyPolicyInput
Proxy policy configuration.
Whether caching is enabled at the gateway.
Web Application Firewall policy configuration.
The DID of the team associated with this configuration.
Defines a response header policy.
The unique identifier for the policy.
A descriptive name for the policy.
A detailed description of the policy.
JSON string of security-related headers.
JSON string of CORS headers.
JSON string of custom headers to add.
JSON string of headers to remove.
If true, the policy cannot be easily modified or deleted.
Input for querying BlockletResponseHeaderPolicy objects.
A search string to filter policies by name or description.
Defines a security rule that combines access and header policies for a specific path.
The unique identifier for the rule.
The URL path pattern this rule applies to.
The DID of the component this rule is associated with.
The execution priority of the rule (lower numbers execute first).
responseHeaderPolicyId
String
The ID of the response header policy to apply.
The ID of the access policy to apply.
Whether the rule is currently active.
An optional remark or note about the rule.
accessPolicy
BlockletAccessPolicyInput
The full access policy object (used when creating a new rule).
responseHeaderPolicy
BlockletResponseHeaderPolicyInput
The full response header policy object (used when creating a new rule).
Input for querying BlockletSecurityRule objects.
A search string to filter rules by path pattern or remark.
Represents a blocklet store/registry.
A description of the store.
The URL of the store's logo.
The maintainer of the store.
The CDN URL used by the store.
Whether the store requires authentication.
The unique identifier of the store.
The scope of the store (e.g., 'public', 'private').
ConfigEntryInput#
Represents a single configuration key-value pair.
Whether this configuration is required.
A description of the configuration item.
A validation rule or pattern for the value.
If true, the value is sensitive and should be treated as a secret.
If true, this is a custom, user-defined configuration.
If true, this configuration is shared among components.
Represents a navigation item in the user interface.
The unique ID of the navigation item.
The destination URL or path.
The icon for the navigation item.
The section where this item should appear (e.g., 'sidebar').
The component this navigation item belongs to.
The ID of the parent navigation item, if any.
The role required to see this item.
Whether the item is visible.
The source of this navigation configuration (e.g., 'blocklet', 'user').
The icon to display when the navigation item is active.
The color of the navigation item text.
The color when the navigation item is active.
A description for the navigation item.
Indicates if the navigation item is private.
Information about a user's account from a third-party provider.
User's name from the provider.
URL of the user's profile picture.
User's email from the provider.
Whether the email is verified by the provider.
The subject identifier from the provider.
Any additional data from the provider.
Represents a user's connected third-party account.
The name of the third-party provider (e.g., 'github').
The DID associated with this connected account.
The unique ID of the connection.
Timestamp of the last login with this account.
userInfo
ConnectedAccountInfoInput
Detailed user information from the provider.
Represents a single environment variable for a Docker container.
The environment variable key.
The environment variable value.
A description of the variable.
If true, the value is sensitive.
If true, the variable is shared.
If true, this variable must be set.
Indicates if it's a custom variable.
Represents a key-value pair for Docker run arguments, such as volume mounts or port mappings.
The argument key (e.g., '-v', '-p').
The path for volume mounts.
The name of the argument.
A prefix for the argument.
The protocol for port mappings (e.g., 'tcp').
Defines how this argument affects proxying.
Token used for downloading a private blocklet.
The DID of the blocklet requiring the token.
Structure for enabling a specific event for a webhook.
The type of the event (e.g., 'blocklet.started').
Structure for configuring the main node gateway.
requestLimit
RequestLimitInput
Request limiting configuration.
blockPolicy
BlockPolicyInput
IP blocking policy configuration.
proxyPolicy
ProxyPolicyInput
Proxy policy configuration.
Whether caching is enabled at the gateway.
Web Application Firewall policy configuration.
Represents a file and its corresponding hash.
The hash of the file content.
Structure for configuring user invitation settings.
Whether user invitations are enabled.
Represents the issuer of a credential or passport.
The public key of the issuer.
Structure for email-based login settings.
Whether email login is enabled.
If true, users must verify their email address.
If true, email addresses must be unique across all users.
trustOauthProviders
Boolean
If true, email addresses from OAuth providers are trusted by default.
enableDomainBlackList
Boolean
Whether to use a domain blacklist.
A list of email domains to block.
enableDomainWhiteList
Boolean
Whether to use a domain whitelist.
A list of allowed email domains.
trustedIssuers
[IssuerInput!]
A list of trusted issuers for email verification.
Structure for phone-based login settings.
Whether phone login is enabled.
If true, users must verify their phone number.
If true, phone numbers must be unique.
trustedIssuers
[IssuerInput!]
A list of trusted issuers for phone verification.
enableRegionBlackList
Boolean
Whether to use a region blacklist.
A list of blocked country codes.
enableRegionWhiteList
Boolean
Whether to use a region whitelist.
A list of allowed country codes.
Structure for updating the node's information.
The display name of the node.
A description of the node.
Whether the node should upgrade automatically.
Whether to show the welcome page.
The URL for user registration.
The URL of the web wallet.
blockletRegistryList
[BlockletStoreInput!]
A list of configured blocklet registries.
The disk usage percentage at which to trigger an alert.
Whether to allow installation of beta releases.
The URL for NFT domain services.
enableFileSystemIsolation
Boolean
Whether to isolate blocklet file systems.
Whether to enable Docker for blocklets.
Read-only field indicating if Docker is installed.
enableDockerNetwork
Boolean
Whether to enable custom Docker networking.
enableSessionHardening
Boolean
Whether to enable advanced session security features.
Structure for creating or updating an OAuth client.
An array of allowed redirect URIs.
tokenEndpointAuthMethod
String
The authentication method for the token endpoint.
The OAuth grant types this client is allowed to use.
The OAuth response types this client is allowed to use.
The name of the client application.
The unique ID of the client.
Standard structure for pagination parameters.
The page number to retrieve.
The number of items per page.
Structure for defining how a passport is displayed.
The display type (e.g., 'text', 'image').
The content to be displayed.
Structure for creating or updating a permission.
The name of the permission (e.g., 'user:create').
A description of what the permission allows.
If true, the permission cannot be easily modified or deleted.
Structure for configuring proxy behavior.
Whether the proxy policy is enabled.
Whether to trust all proxies in the chain.
A list of trusted proxy IP addresses.
The HTTP header used to identify the real client IP.
Structure for configuring request rate limiting.
Whether rate limiting is enabled.
The global request limit.
The number of requests per time unit.
The HTTP methods to which this limit applies.
Structure for updating a user role.
The unique name of the role.
The human-readable title of the role.
A description of the role.
Extra metadata for the role in JSON format.
Structure for defining a routing rule.
The unique ID of the rule.
The source criteria for the rule.
The destination target for the rule.
If true, the rule cannot be easily modified or deleted.
Structure for configuring user session settings.
The Time-to-Live (TTL) for session cache, in seconds.
The TTL for the session itself, in seconds.
email
LoginEmailSettingsInput
Email login settings.
phone
LoginPhoneSettingsInput
Phone login settings.
The salt used for session key generation.
Whether to enable session blacklisting.
Structure for creating or updating a tag.
The unique ID of the tag (used for updates).
A description of the tag.
The color associated with the tag (hex code).
Structure for a user's physical address.
The first line of the address.
The second line of the address.
Comprehensive structure for user information, used for creating or updating users.
The user's assigned role.
URL to the user's avatar.
The user's email address.
Whether the user's account is approved.
An administrative remark about the user.
Extra metadata in JSON format.
A list of tags to associate with the user.
The user's physical address.
Structure for filtering and querying users.
Filter users by approval status.
A search term to match against user fields.
Filter users by associated tag IDs.
Whether to include tag details in the response.
includeUserSessions
Boolean
Whether to include session details in the response.
Structure for querying user sessions.
Filter sessions by user DID.
Filter sessions by visitor ID.
Filter sessions by application PID.
Filter sessions by status (e.g., 'active').
Whether to include user details in the response.
Structure for Web Application Firewall (WAF) configuration.
Whether the WAF is enabled.
The operational mode of the WAF (e.g., 'detection', 'blocking').
inboundAnomalyScoreThreshold
Uint32
The anomaly score threshold for inbound traffic.
outboundAnomalyScoreThreshold
Uint32
The anomaly score threshold for outbound traffic.
The logging level for WAF events.
Structure for defining a parameter for a webhook.
The name of the parameter.
A description of the parameter.
Whether the parameter is required.
The default value for the parameter.
The current value of the parameter.
The data type of the parameter (e.g., 'string').
Structure for creating or updating a webhook endpoint.
The URL to which webhook payloads will be sent.
A description of the webhook endpoint.
enabledEvents
[EnableEventInput!]
A list of events that this endpoint subscribes to.
The status of the endpoint (e.g., 'enabled', 'disabled').