org.designtxt.resolveTokens

bomberstudios.com

Documentation

Resolve a resolver document by providing concrete context values for each of its modifiers. Returns a flat token set with all aliases resolved. Authentication is optional; the resolver document must be publicly accessible if used without auth.

main procedure

Resolve a resolver document by providing concrete context values for each of its modifiers. Returns a flat token set with all aliases resolved. Authentication is optional; the resolver document must be publicly accessible if used without auth.

Input

Encodingapplication/json
input object Required

Contextual input values, keyed by modifier name. Each value must be a string matching one of that modifier's defined contexts. E.g. { "theme": "dark", "size": "compact" }.

resolveReferences boolean Optional

If true (default), resolve all alias references ({token.name}) in the output. Set to false to preserve aliases as literal strings.

resolverRef stringat-uri Required

AT-URI of the org.designtxt.resolver record to resolve.

maxLength: 8192 bytes

Output

Encodingapplication/json
input object Optional

Echo of the input values used for resolution.

resolvedAt stringdatetime Optional

Timestamp when resolution was performed.

tokens unknown Required

The resolved token collection. All modifier conditions have been applied according to resolutionOrder, and alias references have been resolved.

Errors

ResolverNotFound The specified resolver document could not be found.
InvalidInput The input values do not match the resolver's modifier definitions (unknown modifier, invalid context value, or missing required modifier without a default).
CircularReference The resolver or referenced token sources contain a circular reference.
ResolutionFailed Token resolution failed due to unresolvable alias references, invalid token values, or other processing errors.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "resolverRef",
        "input"
      ],
      "properties": {
        "input": {
          "type": "object",
          "properties": {},
          "description": "Contextual input values, keyed by modifier name. Each value must be a string matching one of that modifier's defined contexts. E.g. { \"theme\": \"dark\", \"size\": \"compact\" }."
        },
        "resolverRef": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 8192,
          "description": "AT-URI of the org.designtxt.resolver record to resolve."
        },
        "resolveReferences": {
          "type": "boolean",
          "description": "If true (default), resolve all alias references ({token.name}) in the output. Set to false to preserve aliases as literal strings."
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "ResolverNotFound",
      "description": "The specified resolver document could not be found."
    },
    {
      "name": "InvalidInput",
      "description": "The input values do not match the resolver's modifier definitions (unknown modifier, invalid context value, or missing required modifier without a default)."
    },
    {
      "name": "CircularReference",
      "description": "The resolver or referenced token sources contain a circular reference."
    },
    {
      "name": "ResolutionFailed",
      "description": "Token resolution failed due to unresolvable alias references, invalid token values, or other processing errors."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "tokens"
      ],
      "properties": {
        "input": {
          "type": "object",
          "properties": {},
          "description": "Echo of the input values used for resolution."
        },
        "tokens": {
          "type": "unknown",
          "description": "The resolved token collection. All modifier conditions have been applied according to resolutionOrder, and alias references have been resolved."
        },
        "resolvedAt": {
          "type": "string",
          "format": "datetime",
          "maxLength": 64,
          "description": "Timestamp when resolution was performed."
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Resolve a resolver document by providing concrete context values for each of its modifiers. Returns a flat token set with all aliases resolved. Authentication is optional; the resolver document must be publicly accessible if used without auth."
}

Lexicon Garden

@