nextspace
    Preparing search index...

    Class Api

    Singleton class to manage API tokens.

    Index

    Properties

    ADMIN_TOKENS: ApiTokens = ...
    API_TOKENS: ApiTokens = ...

    Methods

    • Returns the current access token. Always call this at point-of-use so you get the live value from the singleton rather than a value captured at render/effect time that may have gone stale after a token refresh.

      Returns string

    • Returns Promise<
          {
              availablePlatforms: { label?: string; name: string }[];
              conversationTypes: {
                  adapters?: {
                      [key: string]: {
                          audioChannels?: {
                              agent?: (...) | (...);
                              config?: (...) | (...);
                              direct?: (...) | (...) | (...);
                              direction: (...) | (...) | (...);
                              name?: (...) | (...);
                          }[];
                          chatChannels?: {
                              agent?: (...)
                              | (...);
                              config?: (...) | (...);
                              direct?: (...) | (...) | (...);
                              direction: (...) | (...) | (...);
                              name?: (...) | (...);
                          }[];
                          config?: { [key: string]: unknown };
                          dmChannels?: {
                              agent?: (...) | (...);
                              config?: (...) | (...);
                              direct?: (...) | (...) | (...);
                              direction: (...) | (...) | (...);
                              name?: (...) | (...);
                          }[];
                          type: string;
                      };
                  };
                  agents?: { name: string; properties?: { [key: string]: unknown } }[];
                  channels?: { direct?: boolean; name: string; passcode?: string | null }[];
                  description: string;
                  enableDMs?: string[];
                  label?: string;
                  name: string;
                  platforms: { label?: string; name: string }[];
                  properties: {
                      default?: string | number | boolean | Record<string, never>;
                      description?: string;
                      itemKey?: string;
                      label?: string;
                      name: string;
                      options?: Record<string, never>[];
                      required: boolean;
                      schema?: Record<string, never>[];
                      type: "string" | "number" | "boolean" | "object" | "enum";
                      validationKeys?: string[];
                  }[];
              }[];
              supportedModels: {
                  defaultModelOptions?: { [key: string]: unknown };
                  description: string;
                  label: string;
                  llmModel: string;
                  llmPlatform: string;
                  name: string;
              }[];
          },
      >

    • Parameters

      • access: string
      • refresh: string

      Returns void

    • Parameters

      • access: string
      • refresh: string

      Returns void