From 1e2f76441453abe2d42eac8549d048f2f4b74a32 Mon Sep 17 00:00:00 2001 From: Zachary Date: Tue, 24 Mar 2026 22:42:42 -0400 Subject: [PATCH] Sync types and client with backend for social auth and agent assignments Co-Authored-By: Claude Opus 4.6 (1M context) --- src/client.ts | 7 ++++++- src/index.ts | 1 + src/types.ts | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 519fea1..e359322 100644 --- a/src/client.ts +++ b/src/client.ts @@ -21,6 +21,7 @@ import type { GetExportResponse, GetMeResponse, IssueApiTokenResponse, + RotateApiTokenResponse, JWKSResponse, HealthResponse, AuthRegisterResponse, @@ -137,6 +138,10 @@ export class ElydoraClient { return this.request('POST', '/v1/auth/token', { ttl_seconds: ttlSeconds ?? null }); } + async rotateApiToken(): Promise { + return this.request('POST', '/v1/auth/rotate', {}); + } + // ------------------------------------------------------------------------- // Agent management // ------------------------------------------------------------------------- @@ -241,7 +246,7 @@ export class ElydoraClient { } async verifyOperation(operationId: string): Promise { - return this.request('POST', `/v1/operations/${encodeURIComponent(operationId)}/verify`); + return this.request('POST', `/v1/operations/${encodeURIComponent(operationId)}/verify`, {}); } // ------------------------------------------------------------------------- diff --git a/src/index.ts b/src/index.ts index 284ab9a..cc56bf8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,6 +62,7 @@ export type { ListExportsResponse, GetMeResponse, IssueApiTokenResponse, + RotateApiTokenResponse, JWK, JWKSResponse, HealthResponse, diff --git a/src/types.ts b/src/types.ts index 3cf230f..a187b5c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -266,6 +266,14 @@ export interface GetMeResponse { export interface IssueApiTokenResponse { readonly token: string; readonly expires_at: number | null; + readonly token_id: string; +} + +export interface RotateApiTokenResponse { + readonly token: string; + readonly expires_at: number | null; + readonly token_id: string; + readonly previous_token_grace_until: number; } export interface HealthResponse {