Timeline Studio API Documentation - v0.26.0
    Preparing search index...
    • Хук для управления API ключами и OAuth подключениями

      Returns {
          apiKeysInfo: Record<string, ApiKeyInfo>;
          deleteApiKey: (service: string) => Promise<boolean>;
          exchangeOAuthCode: (
              service: string,
              clientId: string,
              clientSecret: string,
              code: string,
          ) => Promise<boolean>;
          exportToEnvFormat: () => Promise<string>;
          generateOAuthUrl: (
              service: string,
              clientId: string,
              state?: string,
          ) => Promise<string>;
          getApiKeyInfo: (service: string) => ApiKeyInfo;
          getApiKeyStatus: (
              service: string,
          ) => "valid" | "not_set" | "testing" | "invalid";
          getOAuthUserInfo: (service: string) => Promise<Record<string, unknown>>;
          importFromEnv: (envFilePath?: string) => Promise<boolean>;
          loadApiKeysInfo: () => Promise<void>;
          loadingStatuses: Record<string, boolean>;
          parseOAuthCallbackUrl: (url: string) => Promise<Record<string, unknown>>;
          refreshOAuthToken: (service: string) => Promise<boolean>;
          saveOAuthCredentials: (
              service: string,
              clientId: string,
              clientSecret: string,
              accessToken?: string,
              refreshToken?: string,
          ) => Promise<boolean>;
          saveSimpleApiKey: (service: string, value: string) => Promise<boolean>;
          testApiKey: (service: string) => Promise<boolean>;
      }