// Code generated by ogen, DO NOT EDIT.
package gen
import (
"context"
)
// Handler handles operations described by OpenAPI v3 specification.
type Handler interface {
// CompleteUserOnboarding implements completeUserOnboarding operation.
//
// Complete a user onboarding step.
//
// POST /v1/me/onboarding
CompleteUserOnboarding(ctx context.Context, req *CompleteOnboardingBody) (*OnboardingResult, error)
// CreatePrompt implements createPrompt operation.
//
// Create a prompt.
//
// POST /v1/me/prompts
CreatePrompt(ctx context.Context, req *CreatePromptBody) (*UpsertPromptResult, error)
// DeleteCredential implements deleteCredential operation.
//
// Delete credentials for a module.
//
// DELETE /v1/me/credentials/{module}
DeleteCredential(ctx context.Context, params DeleteCredentialParams) (*SuccessResult, error)
// DeleteOAuthApp implements deleteOAuthApp operation.
//
// Delete an OAuth app (admin only).
//
// DELETE /v1/admin/oauth/apps/{provider}
DeleteOAuthApp(ctx context.Context, params DeleteOAuthAppParams) (*SuccessResult, error)
// DeletePrompt implements deletePrompt operation.
//
// Delete a prompt.
//
// DELETE /v1/me/prompts/{id}
DeletePrompt(ctx context.Context, params DeletePromptParams) (*DeletePromptResult, error)
// GenerateApiKey implements generateApiKey operation.
//
// Generate a new API key.
//
// POST /v1/me/apikeys
GenerateApiKey(ctx context.Context, req *GenerateApiKeyBody) (*GenerateApiKeyResult, error)
// GetApiKeyStatus implements getApiKeyStatus operation.
//
// Check if an API key is active (internal, called by Worker).
//
// GET /v1/internal/apikeys/{id}/status
GetApiKeyStatus(ctx context.Context, params GetApiKeyStatusParams) (GetApiKeyStatusRes, error)
// GetModuleConfig implements getModuleConfig operation.
//
// Get module configuration.
//
// GET /v1/me/modules/config
GetModuleConfig(ctx context.Context) ([]ModuleConfig, error)
// GetMyProfile implements getMyProfile operation.
//
// Get current user profile.
//
// GET /v1/me/profile
GetMyProfile(ctx context.Context) (*UserProfile, error)
// GetOAuthAppCredentials implements getOAuthAppCredentials operation.
//
// Get OAuth app credentials for a provider.
//
// GET /v1/oauth/apps/{provider}/credentials
GetOAuthAppCredentials(ctx context.Context, params GetOAuthAppCredentialsParams) (*OAuthAppCredentials, error)
// GetPrompt implements getPrompt operation.
//
// Get a prompt by ID.
//
// GET /v1/me/prompts/{id}
GetPrompt(ctx context.Context, params GetPromptParams) (*GetPromptResult, error)
// GetStripeCustomerId implements getStripeCustomerId operation.
//
// Get linked Stripe customer ID.
//
// GET /v1/me/stripe
GetStripeCustomerId(ctx context.Context) (*StripeCustomer, error)
// GetUsage implements getUsage operation.
//
// Get usage statistics.
//
// GET /v1/me/usage
GetUsage(ctx context.Context, params GetUsageParams) (*UsageData, error)
// LinkStripeCustomer implements linkStripeCustomer operation.
//
// Link a Stripe customer ID.
//
// PUT /v1/me/stripe
LinkStripeCustomer(ctx context.Context, req *LinkStripeCustomerBody) (*SuccessResult, error)
// ListAllOAuthConsents implements listAllOAuthConsents operation.
//
// List all OAuth consents across users (admin only).
//
// GET /v1/admin/oauth/consents
ListAllOAuthConsents(ctx context.Context) ([]OAuthConsentAdmin, error)
// ListApiKeys implements listApiKeys operation.
//
// List API keys.
//
// GET /v1/me/apikeys
ListApiKeys(ctx context.Context) ([]ApiKey, error)
// ListCredentials implements listCredentials operation.
//
// List stored credentials.
//
// GET /v1/me/credentials
ListCredentials(ctx context.Context) ([]Credential, error)
// ListModules implements listModules operation.
//
// List available modules with their tools.
//
// GET /v1/modules
ListModules(ctx context.Context) ([]ModuleWithTools, error)
// ListOAuthApps implements listOAuthApps operation.
//
// List all OAuth apps (admin only).
//
// GET /v1/admin/oauth/apps
ListOAuthApps(ctx context.Context) ([]OAuthApp, error)
// ListOAuthConsents implements listOAuthConsents operation.
//
// List OAuth consents.
//
// GET /v1/me/oauth/consents
ListOAuthConsents(ctx context.Context) ([]OAuthConsent, error)
// ListPlans implements listPlans operation.
//
// List available plans.
//
// GET /v1/plans
ListPlans(ctx context.Context) ([]PlanInfo, error)
// ListPrompts implements listPrompts operation.
//
// List prompts.
//
// GET /v1/me/prompts
ListPrompts(ctx context.Context, params ListPromptsParams) ([]Prompt, error)
// RegisterUser implements registerUser operation.
//
// Register or find existing user from Clerk ID.
//
// POST /v1/me/register
RegisterUser(ctx context.Context) (RegisterUserRes, error)
// RevokeApiKey implements revokeApiKey operation.
//
// Revoke an API key.
//
// DELETE /v1/me/apikeys/{id}
RevokeApiKey(ctx context.Context, params RevokeApiKeyParams) (*SuccessResult, error)
// RevokeOAuthConsent implements revokeOAuthConsent operation.
//
// Revoke an OAuth consent.
//
// DELETE /v1/me/oauth/consents/{id}
RevokeOAuthConsent(ctx context.Context, params RevokeOAuthConsentParams) (*RevokeConsentResult, error)
// UpdatePrompt implements updatePrompt operation.
//
// Update a prompt.
//
// PUT /v1/me/prompts/{id}
UpdatePrompt(ctx context.Context, req *UpdatePromptBody, params UpdatePromptParams) (*UpsertPromptResult, error)
// UpdateSettings implements updateSettings operation.
//
// Update user settings.
//
// PUT /v1/me/settings
UpdateSettings(ctx context.Context, req *UpdateSettingsBody) (*SuccessResult, error)
// UpsertCredential implements upsertCredential operation.
//
// Create or update credentials for a module.
//
// PUT /v1/me/credentials/{module}
UpsertCredential(ctx context.Context, req *UpsertCredentialBody, params UpsertCredentialParams) (*UpsertCredentialResult, error)
// UpsertModuleDescription implements upsertModuleDescription operation.
//
// Update module description.
//
// PUT /v1/me/modules/{name}/description
UpsertModuleDescription(ctx context.Context, req *UpsertModuleDescriptionBody, params UpsertModuleDescriptionParams) (*SuccessResult, error)
// UpsertOAuthApp implements upsertOAuthApp operation.
//
// Create or update an OAuth app (admin only).
//
// PUT /v1/admin/oauth/apps/{provider}
UpsertOAuthApp(ctx context.Context, req *UpsertOAuthAppBody, params UpsertOAuthAppParams) (*SuccessResult, error)
// UpsertToolSettings implements upsertToolSettings operation.
//
// Update tool enable/disable settings for a module.
//
// PUT /v1/me/modules/{name}/tools
UpsertToolSettings(ctx context.Context, req *UpsertToolSettingsBody, params UpsertToolSettingsParams) (*UpsertToolSettingsResult, error)
}
// Server implements http server based on OpenAPI v3 specification and
// calls Handler to handle requests.
type Server struct {
h Handler
sec SecurityHandler
baseServer
}
// NewServer creates new Server.
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error) {
s, err := newServerConfig(opts...).baseServer()
if err != nil {
return nil, err
}
return &Server{
h: h,
sec: sec,
baseServer: s,
}, nil
}