> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aikeedo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Theme Objects

> Complete reference for all theme objects, variables, and data structures available in Aikeedo themes.

# Theme Objects Reference

This comprehensive guide covers all theme objects, variables, and data structures available in Aikeedo themes. Each object provides specific functionality and data access for building dynamic theme components.

## Global Objects and Variables

These objects and variables are available globally throughout all theme templates:

* `version` - App version information
* `theme` - Current theme name
* `environment` - Current environment
* `nav` - Navigation registry
* `view_namespace` - Current view namespace
* `config` - All configuration settings
* `currency` - Global currency information
* `locales` - Available locales array
* `locale` - Current locale object
* `option` - All option settings

## User-Specific Objects

These objects are only available when a user is logged in:

* `user` - Current user object with workspace information
* `workspace` - Current user's workspace object

## Nested Objects

These objects are available as properties of other objects:

* `address` - Available as `workspace.address`
* `affiliate` - Available as `user.affiliate`
* `country` - Available as `user.country`
* `subscription` - Available as `workspace.subscription`
* `plan_snapshot` - Available as `subscription.plan`

## User Object

The `user` object is a fundamental component in Aikeedo themes, providing access to essential user information when a user is logged into their account. This object is globally accessible, allowing you to easily incorporate user-specific data and functionality into your theme.

The `user` object is available globally when a user is logged in. If no user is logged in, the object will be undefined. Always check for the existence of the `user` object before attempting to access its properties.

<Note>
  It's a good practice to use conditional checks when working with the `user` object to ensure your theme functions correctly for both logged-in and guest users.
</Note>

<ResponseField name="user" type="User Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the user, always in UUID version 4 format (e.g., "01895d81-4963-71b4-b591-8404987d6954").
    </ResponseField>

    <ResponseField name="role" type="enum" required>
      The user's role in the system. Possible values are:

      * `admin`: Administrator role with full system access
      * `user`: Standard user role with limited permissions
    </ResponseField>

    <ResponseField name="email" type="string" required>
      The user's email address.
    </ResponseField>

    <ResponseField name="first_name" type="string" required>
      The user's first name.
    </ResponseField>

    <ResponseField name="last_name" type="string" required>
      The user's last name.
    </ResponseField>

    <ResponseField name="phone_number" type="string|null" required>
      The user's phone number. This field may be null if not set.
    </ResponseField>

    <ResponseField name="language" type="string" required>
      The user's preferred language code (e.g., "en-US").
    </ResponseField>

    <ResponseField name="has_password" type="boolean" required>
      Indicates whether the user has set a password. Users who signed up using 3rd party services like Google will not have a password.
    </ResponseField>

    <ResponseField name="workspace_cap" type="number|null" required>
      The calculated amount of workspaces the user can have. This value may be null if unlimited.
    </ResponseField>

    <ResponseField name="avatar" type="string" required>
      URL to the user's Gravatar avatar image (generated from email hash).
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the user account was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number|null" required>
      Unix timestamp of the last update to the user account. While this field always exists, its value may be null if the user account has never been updated.
    </ResponseField>

    <ResponseField name="ip" type="string|null" required>
      The IP address associated with the user account.
    </ResponseField>

    <ResponseField name="country" type="Country|null" required>
      The user's country information. See Country Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="city_name" type="string|null" required>
      The name of the city associated with the user.
    </ResponseField>

    <ResponseField name="is_email_verified" type="boolean" required>
      Indicates whether the user's email has been verified.
    </ResponseField>

    <ResponseField name="api_key" type="string" required>
      The user's API key (partially masked for security).
    </ResponseField>

    <ResponseField name="affiliate" type="Affiliate" required>
      The user's affiliate object. See Affiliate Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="workspace" type="Workspace" required>
      The user's active workspace object. See Workspace Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="preferences" type="object" required>
      The user's preferences and settings.
    </ResponseField>

    <ResponseField name="workspaces" type="array<Workspace>" required>
      An array of workspace objects that the user is a member of, excluding workspaces owned by the user. Each object in this array represents a workspace where the user has membership but not ownership. See Workspace Object for more details on the properties of these objects.
    </ResponseField>

    <ResponseField name="owned_workspaces" type="array<Workspace>" required>
      An array of workspace objects that the user owns. See Workspace Object for more details on the properties of these objects.
    </ResponseField>
  </Expandable>
</ResponseField>

## Affiliate Object

The `affiliate` object provides access to essential affiliate information for users participating in the affiliate program. This object is part of the user object and contains details about the user's affiliate status, earnings, and payout preferences.

The `affiliate` object is always available as a property of the `user` object when a user is logged in. Affiliate accounts are automatically generated for each user, so you can safely access `user.affiliate` properties without additional checks for its existence.

<ResponseField name="affiliate" type="Affiliate Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the affiliate account, always in UUID version 4 format (e.g., "0191acee-3bf1-71cf-ac75-7a9e06fd6a3c").
    </ResponseField>

    <ResponseField name="paypal_email" type="string|null" required>
      The PayPal email address associated with the affiliate account for payouts. This field may be null if not set by the user.
    </ResponseField>

    <ResponseField name="bank_requisites" type="string|null" required>
      Bank account details for payouts. This field may be null if not set by the user.
    </ResponseField>

    <ResponseField name="code" type="string" required>
      The unique affiliate code assigned to the user (e.g., "87a052aa0996"). This code is used to track referrals.
    </ResponseField>

    <ResponseField name="clicks" type="integer" required>
      The total number of clicks on the user's affiliate links.
    </ResponseField>

    <ResponseField name="referrals" type="integer" required>
      The total number of successful referrals made by the affiliate.
    </ResponseField>

    <ResponseField name="balance" type="integer" required>
      The current balance of earnings available for payout to the affiliate. Amount in currency minor units.
    </ResponseField>

    <ResponseField name="pending" type="integer" required>
      The amount of earnings that have been requested for payout but not yet processed or paid out. Amount in currency minor units.
    </ResponseField>

    <ResponseField name="withdrawn" type="integer" required>
      The total amount of earnings that have been paid out to the affiliate. Amount in currency minor units.
    </ResponseField>

    <ResponseField name="currency" type="Currency" required>
      An object containing information about the currency used for affiliate earnings. See Currency Object for more details.
    </ResponseField>

    <ResponseField name="payout_method" type="enum" required>
      The preferred payout method chosen by the affiliate. Possible values are:

      * `paypal`: PayPal payout method
      * `bank_transfer`: Bank transfer payout method
    </ResponseField>
  </Expandable>
</ResponseField>

## Country Object

The `country` object provides access to country information for users. This object contains details about the user's country including name, codes, and flag information.

The `country` object is available as a property of the `user` object. It may be null if the user's country is not set.

<ResponseField name="country" type="Country Object">
  <Expandable title="Properties">
    <ResponseField name="name" type="string" required>
      The full name of the country (e.g., "United States").
    </ResponseField>

    <ResponseField name="alpha2" type="string" required>
      The two-letter country code (e.g., "US").
    </ResponseField>

    <ResponseField name="alpha3" type="string" required>
      The three-letter country code (e.g., "USA").
    </ResponseField>

    <ResponseField name="flag_url" type="string" required>
      URL to the country's flag image (e.g., "[https://flagcdn.com/us.svg](https://flagcdn.com/us.svg)").
    </ResponseField>
  </Expandable>
</ResponseField>

## Currency Object

The `currency` object provides access to currency information used throughout the system. This object is used to represent various currencies and their properties.

The `currency` object is globally available and represents the global currency set in the billing settings. It can be accessed in other contexts where currency information is needed, such as in `affiliate.currency` or `subscription.currency`.

<ResponseField name="currency" type="Currency Object">
  <Expandable title="Properties">
    <ResponseField name="code" type="string" required>
      A unique three-letter code that identifies the currency, following the ISO 4217 standard (e.g., "USD" for United States Dollar).
    </ResponseField>

    <ResponseField name="name" type="string" required>
      The full name of the currency (e.g., "United States Dollar").
    </ResponseField>

    <ResponseField name="symbol" type="string|null" required>
      The symbol used to represent the currency. This can be null if no specific symbol is associated with the currency.
    </ResponseField>

    <ResponseField name="fraction_digits" type="number" required>
      The number of digits typically used for fractional amounts of this currency (e.g., 2 for currenzcies like USD or EUR, which use cents, or 0 for currencies like JPY that don't use fractional units).
    </ResponseField>
  </Expandable>
</ResponseField>

## Environment Variable

The `environment` variable is used to determine the current execution environment in Aikeedo themes. This is important for making environment-specific decisions in your theme logic.

The `environment` variable is available globally throughout the theme.

<ResponseField name="environment" type="string" required>
  The current environment value. This is the same as the `ENVIRONMENT` value set in the `/.env` file.
</ResponseField>

## Locale Object

The `locale` object provides access to language and region information used throughout the system. This object is used to represent various locales and their properties.

The `locale` object is available in various contexts throughout the Aikeedo system where language and region information is relevant. It can be accessed in theme templates and components to display localized content, format dates and numbers, or adapt the user interface to specific cultural preferences.

<ResponseField name="locale" type="Locale Object">
  <Expandable title="Properties">
    <ResponseField name="name" type="string" required>
      A unique identifier for the locale, typically following the format of language code and country/region code (e.g., "en-US" for English in the United States).
    </ResponseField>

    <ResponseField name="label" type="string" required>
      A human-readable name for the locale, usually in the language of the locale itself (e.g., "English (US)" for the en-US locale).
    </ResponseField>

    <ResponseField name="enabled" type="boolean" required>
      Indicates whether this locale is currently active and available for use in the system.
    </ResponseField>
  </Expandable>
</ResponseField>

## Locales Array

The `locales` array provides access to all available language and region configurations in the system. This array contains multiple Locale objects, each representing a specific language-region combination.

The `locales` array is globally available throughout the Aikeedo system. It can be accessed in theme templates, components, and other contexts where information about all supported languages is needed. This array is particularly useful for implementing language selection features or displaying available language options to users.

<ResponseField name="locales" type="array<Locale>" required>
  The array of locales available in the system. Each element is a Locale object.
</ResponseField>

## Plan Object

The `Plan` object represents a subscription plan in Aikeedo themes, providing access to essential plan information. This object is part of the `plans` array, which is globally accessible, allowing you to easily incorporate plan-specific data and functionality into your theme.

The `Plan` objects are available globally as part of the `plans` array. You can iterate through this array to access individual plan objects and their properties.

<Note>
  It's a good practice to check if the `plans` array exists and has elements before attempting to access individual plan objects.
</Note>

<ResponseField name="plan" type="Plan Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the plan, always in UUID version 4 format (e.g., "018e73c8-c4d7-7124-b9ee-83fcf3e1c74b").
    </ResponseField>

    <ResponseField name="title" type="string" required>
      The name or title of the plan (e.g., "Free").
    </ResponseField>

    <ResponseField name="description" type="string" required>
      A brief description of the plan (e.g., "Launch Your Journey").
    </ResponseField>

    <ResponseField name="icon" type="string|null" required>
      URL to the plan's icon image. This field can be null if no icon is set.
    </ResponseField>

    <ResponseField name="price" type="number" required>
      The price of the plan. For free plans, this value will be 0.
    </ResponseField>

    <ResponseField name="billing_cycle" type="string" required>
      The billing cycle for the plan (e.g., "monthly").
    </ResponseField>

    <ResponseField name="credit_count" type="number" required>
      The number of credits included in the plan.
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the plan was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number" required>
      Unix timestamp of the last update to the plan.
    </ResponseField>

    <ResponseField name="is_featured" type="boolean" required>
      Indicates whether the plan is featured or not.
    </ResponseField>

    <ResponseField name="superiority" type="number" required>
      A numeric value representing the plan's superiority or ranking compared to other plans.
    </ResponseField>

    <ResponseField name="config" type="PlanConfig" required>
      The configuration object for the plan. See Plan Config Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="feature_list" type="array" required>
      An array of features included in the plan. This array may be empty if no specific features are defined.
    </ResponseField>
  </Expandable>
</ResponseField>

## Plan Snapshot Object

The `plan_snapshot` object represents a snapshot of a subscription plan at the time of subscription creation. This object is used in subscriptions to maintain the plan details even if the original plan is modified.

The `plan_snapshot` object is available as a property of the `subscription` object.

<ResponseField name="plan_snapshot" type="Plan Snapshot Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the plan snapshot.
    </ResponseField>

    <ResponseField name="title" type="string" required>
      The name or title of the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="description" type="string" required>
      A brief description of the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="icon" type="string|null" required>
      URL to the plan's icon image at the time of snapshot. This field can be null if no icon was set.
    </ResponseField>

    <ResponseField name="price" type="number" required>
      The price of the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="billing_cycle" type="string" required>
      The billing cycle for the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="credit_count" type="number" required>
      The number of credits included in the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="member_cap" type="number|null" required>
      The maximum number of members allowed in the workspace for this plan.
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the plan snapshot was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number" required>
      Unix timestamp of when the plan snapshot was last updated.
    </ResponseField>

    <ResponseField name="config" type="object" required>
      The configuration object for the plan at the time of snapshot.
    </ResponseField>

    <ResponseField name="feature_list" type="array" required>
      An array of features included in the plan at the time of snapshot. Each feature object contains:

      * `title`: The feature title
      * `is_included`: Boolean indicating if the feature is included (true) or excluded (false)
    </ResponseField>
  </Expandable>
</ResponseField>

## Plan Config Object

The `plan-config` object contains configuration settings for different AI models, tools, and features available in a specific plan. It defines which capabilities are enabled and which models are accessible.

The `plan-config` object is available as a property of the `plan` object. It can be accessed within theme templates when working with plan-related data.

<ResponseField name="plan-config" type="Plan Config Object">
  <Expandable title="Properties">
    <ResponseField name="writer" type="object">
      Writer feature configuration.

      <Expandable title="Writer properties">
        <ResponseField name="is_enabled" type="boolean">
          Indicates whether the writer feature is enabled for this plan.
        </ResponseField>

        <ResponseField name="model" type="string">
          Specifies the AI model used for the writer feature (e.g., "gpt-4o").
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="coder" type="object">
      Coder feature configuration.

      <Expandable title="Coder properties">
        <ResponseField name="is_enabled" type="boolean">
          Indicates whether the coder feature is enabled for this plan.
        </ResponseField>

        <ResponseField name="model" type="string">
          Specifies the AI model used for the coder feature (e.g., "gpt-4o").
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="imagine" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the imagine feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="transcriber" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the transcriber feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="voiceover" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the voiceover feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="chat" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the chat feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="voice_isolator" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the voice isolator feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="classifier" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the classifier feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="composer" type="object">
      <ResponseField name="is_enabled" type="boolean">
        Indicates whether the composer feature is enabled for this plan.
      </ResponseField>
    </ResponseField>

    <ResponseField name="titler" type="object">
      <ResponseField name="model" type="string">
        Specifies the AI model used for the titler feature (e.g., "gpt-4o-mini").
      </ResponseField>
    </ResponseField>

    <ResponseField name="models" type="object">
      An object containing boolean flags for various AI models, indicating which ones are available in this plan. Examples include:

      * `o1-preview`, `o1-mini`, `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-4`, `gpt-3.5-turbo`
      * `claude-3-5-sonnet-20240620`, `claude-3-haiku-20240307`, `claude-3-sonnet-20240229`, `claude-3-opus-20240229`
      * `command-r-plus`, `command-r`, `command`, `command-light`
      * `dall-e-3`, `dall-e-2`, `flux/dev`, `flux/schnell`, `flux-pro`, `flux-realism`
      * `sd-ultra`, `sd-core`, `sd3-large`, `sd3-large-turbo`, `sd3-medium`
      * `stable-diffusion-xl-1024-v1-0`, `stable-diffusion-v1-6`, `clipdrop`
      * `tts-1`, `eleven_multilingual_v2`, `eleven_turbo_v2_5`, `eleven_multilingual_v1`, `eleven_monolingual_v1`
      * `google-tts-standard`, `google-tts-premium`, `google-tts-studio`, `azure-tts`
      * `chirp-v3-5`, `chirp-v3-0`
    </ResponseField>

    <ResponseField name="tools" type="object">
      An object specifying which tools are available in this plan:

      * `embedding_search`: Boolean indicating if embedding search is enabled
      * `google_search`: Boolean indicating if Google search is enabled
      * `cohere_web_search`: Boolean indicating if Cohere web search is enabled
      * `web_scrap`: Boolean indicating if web scraping is enabled
      * `generate_image`: Boolean indicating if image generation is enabled
    </ResponseField>

    <ResponseField name="embedding_model" type="string">
      Specifies the embedding model used for this plan (e.g., "text-embedding-3-small").
    </ResponseField>

    <ResponseField name="assistants" type="array<string>|null">
      An array of assistant IDs that are available in this plan. If set to null, all assistants are available.
    </ResponseField>

    <ResponseField name="presets" type="array<string>|null">
      An array of preset IDs that are available in this plan. If set to null, all presets are available.
    </ResponseField>
  </Expandable>
</ResponseField>

## Subscription Object

The `subscription` object provides access to subscription information for a workspace or user. This object contains details about the subscription status, usage, and related information.

The `subscription` object is available within the `workspace` or `user.workspace` objects.

<ResponseField name="subscription" type="Subscription Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the subscription.
    </ResponseField>

    <ResponseField name="trial_period_days" type="integer|null" required>
      The number of days in the trial period. This can be null if there is no trial period.
    </ResponseField>

    <ResponseField name="usage_count" type="number" required>
      The amount of usage consumed in the current subscription period.
    </ResponseField>

    <ResponseField name="usage_percentage" type="string" required>
      The percentage of usage consumed, represented as a string with two decimal places.
    </ResponseField>

    <ResponseField name="credit_count" type="number" required>
      The remaining credit available in the current subscription period.
    </ResponseField>

    <ResponseField name="credit_percentage" type="string" required>
      The percentage of credit remaining, represented as a string with two decimal places.
    </ResponseField>

    <ResponseField name="created_at" type="integer" required>
      The Unix timestamp representing when the subscription was created.
    </ResponseField>

    <ResponseField name="updated_at" type="integer|null" required>
      The Unix timestamp representing when the subscription was last updated.
    </ResponseField>

    <ResponseField name="canceled_at" type="integer|null" required>
      The Unix timestamp representing when the subscription was canceled. This can be null if the subscription has not been canceled.
    </ResponseField>

    <ResponseField name="cancel_at" type="integer|null" required>
      The Unix timestamp representing when the subscription is scheduled to be canceled. This can be null if no cancellation is scheduled.
    </ResponseField>

    <ResponseField name="renew_at" type="integer" required>
      The Unix timestamp representing when the subscription is scheduled to renew.
    </ResponseField>

    <ResponseField name="plan" type="PlanSnapshot" required>
      A link to the PlanSnapshot object associated with this subscription. See Plan Snapshot Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="currency" type="Currency|null" required>
      A link to the Currency object associated with this subscription. See Currency Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="payment_gateway" type="string" required>
      The payment gateway used for this subscription (e.g., "stripe", "paypal").
    </ResponseField>

    <ResponseField name="external_id" type="string|null" required>
      The external ID from the payment gateway for this subscription.
    </ResponseField>
  </Expandable>
</ResponseField>

## User Object

The `user` object is a fundamental component in Aikeedo themes, providing access to essential user information when a user is logged into their account. This object is globally accessible, allowing you to easily incorporate user-specific data and functionality into your theme.

The `user` object is available globally when a user is logged in. If no user is logged in, the object will be undefined. Always check for the existence of the `user` object before attempting to access its properties.

<Note>
  It's a good practice to use conditional checks when working with the `user` object to ensure your theme functions correctly for both logged-in and guest users.
</Note>

<ResponseField name="user" type="User Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the user, always in UUID version 4 format (e.g., "01895d81-4963-71b4-b591-8404987d6954").
    </ResponseField>

    <ResponseField name="role" type="enum" required>
      The user's role in the system. Possible values are:

      * `admin`: Administrator role with full system access
      * `user`: Standard user role with limited permissions
    </ResponseField>

    <ResponseField name="email" type="string" required>
      The user's email address.
    </ResponseField>

    <ResponseField name="first_name" type="string" required>
      The user's first name.
    </ResponseField>

    <ResponseField name="last_name" type="string" required>
      The user's last name.
    </ResponseField>

    <ResponseField name="phone_number" type="string|null" required>
      The user's phone number. This field may be null if not set.
    </ResponseField>

    <ResponseField name="language" type="string" required>
      The user's preferred language code (e.g., "en-US").
    </ResponseField>

    <ResponseField name="has_password" type="boolean" required>
      Indicates whether the user has set a password. Users who signed up using 3rd party services like Google will not have a password.
    </ResponseField>

    <ResponseField name="workspace_cap" type="number|null" required>
      The calculated amount of workspaces the user can have. This value may be null if unlimited.
    </ResponseField>

    <ResponseField name="avatar" type="string" required>
      URL to the user's Gravatar avatar image (generated from email hash).
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the user account was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number|null" required>
      Unix timestamp of the last update to the user account. While this field always exists, its value may be null if the user account has never been updated.
    </ResponseField>

    <ResponseField name="ip" type="string|null" required>
      The IP address associated with the user account.
    </ResponseField>

    <ResponseField name="country" type="Country|null" required>
      The user's country information. See Country Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="city_name" type="string|null" required>
      The name of the city associated with the user.
    </ResponseField>

    <ResponseField name="is_email_verified" type="boolean" required>
      Indicates whether the user's email has been verified.
    </ResponseField>

    <ResponseField name="api_key" type="string" required>
      The user's API key (partially masked for security).
    </ResponseField>

    <ResponseField name="affiliate" type="Affiliate" required>
      The user's affiliate object. See Affiliate Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="workspace" type="Workspace" required>
      The user's active workspace object. See Workspace Object for more details on the properties of this object.
    </ResponseField>

    <ResponseField name="preferences" type="object" required>
      The user's preferences and settings.
    </ResponseField>

    <ResponseField name="workspaces" type="array<Workspace>" required>
      An array of workspace objects that the user is a member of, excluding workspaces owned by the user. Each object in this array represents a workspace where the user has membership but not ownership. See Workspace Object for more details on the properties of these objects.
    </ResponseField>

    <ResponseField name="owned_workspaces" type="array<Workspace>" required>
      An array of workspace objects that the user owns. See Workspace Object for more details on the properties of these objects.
    </ResponseField>
  </Expandable>
</ResponseField>

## Version Variable

The `version` variable provides access to the currently installed version of the Aikeedo app. This can be useful for version-specific logic or displaying the app version in your theme.

The `version` variable is available globally throughout the theme.

<ResponseField name="version" type="string" required>
  The current version of the Aikeedo app. This value is read from the `/VERSION` file.
</ResponseField>

## Theme Variable

The `theme` variable provides access to the current theme name being used.

The `theme` variable is available globally throughout the theme.

<ResponseField name="theme" type="string" required>
  The current theme name (e.g., "heyaikeedo/default").
</ResponseField>

## Nav Variable

The `nav` variable provides access to the navigation registry for building navigation menus.

The `nav` variable is available globally throughout the theme.

<ResponseField name="nav" type="object" required>
  The navigation registry object for building navigation menus.
</ResponseField>

## View Namespace Variable

The `view_namespace` variable indicates which namespace the current view belongs to.

The `view_namespace` variable is available globally throughout the theme.

<ResponseField name="view_namespace" type="string|null" required>
  The current view namespace. Possible values are:

  * `"app"`: For application views
  * `"admin"`: For admin views
  * `null`: For other views
</ResponseField>

## Config Variable

The `config` variable provides access to all configuration settings.

The `config` variable is available globally throughout the theme.

<ResponseField name="config" type="object" required>
  An object containing all configuration settings from the application.
</ResponseField>

## Option Variable

The `option` variable provides access to all option settings configured in the admin panel.

The `option` variable is available globally throughout the theme.

<ResponseField name="option" type="object" required>
  An object containing all option settings from the admin panel. This includes site settings, billing options, color schemes, and other customizable options.
</ResponseField>

## Workspace Object

The `workspace` object is a fundamental component in Aikeedo themes, representing a user's working environment and associated settings. This object contains crucial information about the workspace, including subscription details, credit usage, and various configuration options.

The `workspace` object is available globally when a user is logged into the app. Additionally, it is always accessible as a property of the `user` object. Each user has at least one workspace, so you can safely access `workspace` properties or `user.workspace` properties without additional checks for their existence.

<ResponseField name="workspace" type="Workspace Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the workspace, always in UUID version 4 format (e.g., "018d5355-c857-7044-8284-83e7950685b4").
    </ResponseField>

    <ResponseField name="name" type="string" required>
      The name of the workspace (e.g., "Personal").
    </ResponseField>

    <ResponseField name="openai_api_key" type="string" required>
      The OpenAI API key associated with the workspace.
    </ResponseField>

    <ResponseField name="anthropic_api_key" type="string" required>
      The Anthropic API key associated with the workspace.
    </ResponseField>

    <ResponseField name="address" type="Address|null" required>
      The workspace's address information. This may be null if not set. See Address Object for more details on the properties of this object when it's not null.
    </ResponseField>

    <ResponseField name="is_eligible_for_trial" type="boolean" required>
      Indicates whether the workspace is eligible for a trial period.
    </ResponseField>

    <ResponseField name="is_eligible_for_free_plan" type="boolean" required>
      Indicates whether the workspace is eligible for a free plan.
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the workspace was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number|null" required>
      Unix timestamp of the last update to the workspace. While this field always exists, its value may be null if the workspace has never been updated.
    </ResponseField>

    <ResponseField name="invitations" type="array<WorkspaceInvitation>" required>
      An array of pending invitations to join the workspace. This array may be empty. See Workspace Invitation Object for more details.
    </ResponseField>

    <ResponseField name="credit_count" type="number" required>
      The current number of credits available in the workspace.
    </ResponseField>

    <ResponseField name="total_credit_count" type="number" required>
      The total number of credits allocated to the workspace, including used and available credits.
    </ResponseField>

    <ResponseField name="subscription" type="Subscription|null" required>
      An object containing detailed information about the workspace's subscription. See Subscription Object for more details.
    </ResponseField>

    <ResponseField name="owner" type="User" required>
      The owner of the workspace. This property is only available when the workspace is extended with user information.
    </ResponseField>

    <ResponseField name="users" type="array<User>" required>
      An array of users who are members of the workspace. This property is only available when the workspace is extended with user information.
    </ResponseField>
  </Expandable>
</ResponseField>

## Workspace Invitation Object

The `workspace_invitation` object represents an invitation to join a workspace in Aikeedo themes. This object contains essential information about the invitation, including its unique identifier, the invited email address, and timestamps.

The `workspace_invitation` object is available in contexts related to workspace management, such as when listing pending invitations or processing invitation responses.

<Note>
  Always check for the existence of the `workspace_invitation` object before attempting to access its properties to ensure your theme functions correctly in all invitation-related scenarios.
</Note>

<ResponseField name="workspace_invitation" type="Workspace Invitation Object">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required>
      A unique identifier for the workspace invitation, always in UUID version 4 format (e.g., "018d5355-c857-7044-8284-83e7950685b4").
    </ResponseField>

    <ResponseField name="email" type="string" required>
      The email address of the user invited to join the workspace.
    </ResponseField>

    <ResponseField name="created_at" type="number" required>
      Unix timestamp of when the workspace invitation was created.
    </ResponseField>

    <ResponseField name="updated_at" type="number" required>
      Unix timestamp of the last update to the workspace invitation. This may be the same as `created_at` if the invitation hasn't been modified since creation.
    </ResponseField>
  </Expandable>
</ResponseField>
