Types
The @blocklet/server-js
API uses a variety of data structures to represent resources and inputs. This section serves as a complete reference for all the types you will encounter when making requests or handling responses. Understanding these structures is key to effectively using Queries and Mutations.
On This Page#
Data Structures#
These types represent the objects returned by the API in queries and mutations.
AccessKey#
Field | Type | Description |
---|---|---|
|
| The unique identifier for the access key. |
|
| The public part of the access key. |
|
| A user-provided remark for the access key. |
|
| The passport associated with this key. |
|
| Timestamp of when the key was created. |
|
| Timestamp of the last update. |
|
| Timestamp of the last time the key was used. |
|
| The DID of the user who created the key. |
|
| The DID of the user who last updated the key. |
|
| The authentication type. |
|
| The DID of the component this key is associated with. |
|
| The type of resource this key can access. |
|
| The ID of the resource this key can access. |
|
| The method or source through which the key was created. |
|
| Timestamp when the key will expire. |
AigneConfig#
Field | Type | Description |
---|---|---|
|
| The AI service provider (e.g., 'openai'). |
|
| The specific model used (e.g., 'gpt-4'). |
|
| The API key for the AI service. |
|
| The base URL for the AI service API. |
|
| Access Key ID for providers like AWS Bedrock. |
|
| Secret Access Key for providers like AWS Bedrock. |
|
| The result of the last connection validation. |
AuditLog#
Field | Type | Description |
---|---|---|
|
| Unique identifier for the audit log entry. |
|
| The scope of the action (e.g., 'node', 'blocklet'). |
|
| The category of the action (e.g., 'security', 'management'). |
|
| The specific action performed (e.g., 'login', 'update_config'). |
|
| Detailed content or payload of the log entry. |
|
| Information about the user or system that performed the action. |
|
| Environmental details like browser and OS. |
|
| Timestamp of when the event occurred. |
|
| The IP address from which the action was initiated. |
|
| The User-Agent string of the client. |
AutoBackup#
Field | Type | Description |
---|---|---|
|
| Indicates if automatic backups are enabled. |
BlockletState#
Field | Type | Description |
---|---|---|
|
| The metadata of the blocklet. |
|
| The current operational status of the blocklet. |
|
| Timestamp when the blocklet was first created. |
|
| Timestamp when the blocklet was installed. |
|
| Timestamp when the blocklet was last started. |
|
| Timestamp when the blocklet was last stopped. |
|
| Timestamp when the blocklet was last updated. |
|
| A list of environment variables for the blocklet. |
|
| A list of configuration entries for the blocklet. |
|
| Information about the blocklet's disk usage. |
|
| Information about the blocklet's runtime performance. |
|
| The source from which the blocklet was installed. |
|
| The port number the blocklet is running on. |
|
| The engine running the blocklet. |
|
| A list of child components associated with this blocklet. |
|
| The settings configured for this blocklet. |
|
| The application DID of the blocklet. |
|
| The routing site information for the blocklet. |
Certificate#
Field | Type | Description |
---|---|---|
|
| A user-friendly name for the certificate. |
|
| The primary domain this certificate is for. |
|
| The unique identifier for the certificate. |
|
| Detailed metadata about the certificate. |
|
| Timestamp of when the certificate was created. |
|
| Timestamp of the last update. |
|
| The current status of the certificate (e.g., 'valid', 'expired'). |
GeneralResponse#
Field | Type | Description |
---|---|---|
|
| The status code of the response. |
NodeState#
Field | Type | Description |
---|---|---|
|
| The DID of the Blocklet Server node. |
|
| The public key of the Blocklet Server node. |
|
| The current version of the Blocklet Server software. |
|
| The user-defined name of the node. |
|
| The user-defined description of the node. |
|
| Whether the node has been initialized. |
|
| Wallet information for the node owner. |
|
| Timestamp of when the node was created. |
|
| Timestamp of when the node was last started. |
|
| The uptime of the node in seconds. |
|
| Whether automatic upgrades are enabled. |
OauthClient#
Field | Type | Description |
---|---|---|
|
| An array of allowed redirect URIs. |
|
| The token endpoint authentication method. |
|
| An array of allowed grant types. |
|
| An array of allowed response types. |
|
| The name of the client application. |
|
| The unique identifier for the OAuth client. |
|
| The client secret. |
|
| Timestamp when the client was created. |
|
| Timestamp when the client was last updated. |
Passport#
Field | Type | Description |
---|---|---|
|
| The unique identifier for the passport. |
|
| The name associated with the passport. |
|
| A title for the passport. |
|
| Information about the issuer of the passport. |
|
| Timestamp of when the passport was issued. |
|
| Timestamp of when the passport expires. |
|
| The current status of the passport (e.g., 'active', 'revoked'). |
|
| The role assigned by this passport. |
|
| The DID of the user who holds the passport. |
Project#
Field | Type | Description |
---|---|---|
|
| The unique identifier for the project. |
|
| The type of the project (e.g., 'resource', 'pack'). |
|
| The DID of the blocklet associated with the project. |
|
| The title of the associated blocklet. |
|
| Timestamp of when the project was created. |
|
| Timestamp of the last update. |
|
| A list of stores this project is connected to. |
|
| A list of endpoints this project is connected to. |
Release#
Field | Type | Description |
---|---|---|
|
| The unique identifier for the release. |
|
| The ID of the project this release belongs to. |
|
| The version of the blocklet for this release. |
|
| Release notes. |
|
| The status of the release (e.g., 'draft', 'published'). |
|
| Timestamp of when the release was created. |
|
| Timestamp of the last update. |
UserInfo#
Field | Type | Description |
---|---|---|
|
| The user's decentralized identifier. |
|
| The user's public key. |
|
| The role of the user. |
|
| URL to the user's avatar image. |
|
| The user's full name. |
|
| The user's email address. |
|
| Whether the user has been approved. |
|
| Timestamp of when the user account was created. |
|
| Timestamp of the user's last login. |
Input Objects#
These types are used to provide arguments for mutations and queries.
AigneConfigInput#
Used for configuring AI service integrations.
Field | Type | Description |
---|---|---|
|
| The AI service provider (e.g., 'openai'). |
|
| The specific model to use. |
|
| The API key for the service. |
|
| The base URL for the service's API. |
BlockletAccessPolicyInput#
Used for creating or updating a blocklet access policy.
Field | Type | Description |
---|---|---|
|
| Unique identifier for the policy. |
|
| A user-friendly name for the policy. |
|
| A description of the policy. |
|
| The roles that this policy applies to. |
|
| If true, the policy logic is reversed. |
NodeInfoInput#
Used for updating the node's general information.
Field | Type | Description |
---|---|---|
|
| The new name for the node. |
|
| The new description for the node. |
|
| Enable or disable automatic upgrades. |
|
| The URL of the web wallet to be used with this node. |
PagingInput#
Used to specify pagination for list queries.
Field | Type | Description |
---|---|---|
|
| The page number to retrieve. |
|
| The number of items to retrieve per page. |
RequestCreateAccessKeyInput#
Used to create a new access key.
Field | Type | Description |
---|---|---|
|
| The DID of the team this key belongs to. |
|
| A note or description for the key. |
|
| The authentication type for the key. |
|
| Timestamp for when the key should expire. |
UserInfoInput#
Used for creating or updating user information.
Field | Type | Description |
---|---|---|
|
| The user's decentralized identifier. |
|
| The new role for the user. |
|
| The user's full name. |
|
| The user's email address. |
|
| Set the approval status for the user. |
Enumerations#
These types represent a fixed set of named values.
BackendServiceType#
Defines the type of backend service for a routing rule.
Value | Description |
---|---|
| The Blocklet Server's core daemon service. |
| A specific blocklet service. |
| Redirect to a different URL. |
| A specific component within a blocklet. |
BlockletStatus#
Represents the lifecycle status of a blocklet.
Value | Description |
---|---|
| The blocklet is currently running. |
| The blocklet is stopped. |
| The blocklet is being installed. |
| The blocklet has encountered an error. |
| The blocklet is restarting. |
StatusCode#
Represents the status of an API response.
Value | Description |
---|---|
| The request was successful. |
| The request is not authorized. |
| An internal server error occurred. |
| The request timed out. |
Scalars#
These are the basic, indivisible data types used throughout the API.
Type | Description |
---|---|
| A UTF-8 character sequence. |
| A signed or unsigned 32-bit integer. |
| A signed or unsigned 64-bit integer. |
| A floating-point number. |
| A |
| A flexible type that can hold any JSON-serializable value. |
| A sequence of bytes. |