Initial public release of Warp.
Repo-Sync-Origin: warpdotdev/warp-internal@12af1d983b
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
use crate::object::ObjectMetadata;
|
||||
use crate::object_permissions::ObjectPermissions;
|
||||
use crate::scalars::Time;
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum RequestLimitRefreshDuration {
|
||||
Monthly,
|
||||
Weekly,
|
||||
EveryTwoWeeks,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RequestLimitInfo {
|
||||
pub is_unlimited: bool,
|
||||
pub next_refresh_time: Time,
|
||||
pub request_limit: i32,
|
||||
pub requests_used_since_last_refresh: i32,
|
||||
pub request_limit_refresh_duration: RequestLimitRefreshDuration,
|
||||
pub is_unlimited_voice: bool,
|
||||
pub voice_request_limit: i32,
|
||||
pub voice_requests_used_since_last_refresh: i32,
|
||||
pub is_unlimited_codebase_indices: bool,
|
||||
pub max_codebase_indices: i32,
|
||||
pub max_files_per_repo: i32,
|
||||
pub embedding_generation_batch_size: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AgentTaskState {
|
||||
#[cynic(rename = "BLOCKED")]
|
||||
Blocked,
|
||||
#[cynic(rename = "CANCELLED")]
|
||||
Cancelled,
|
||||
#[cynic(rename = "CLAIMED")]
|
||||
Claimed,
|
||||
#[cynic(rename = "ERROR")]
|
||||
Error,
|
||||
#[cynic(rename = "IN_PROGRESS")]
|
||||
InProgress,
|
||||
#[cynic(rename = "SUCCEEDED")]
|
||||
Succeeded,
|
||||
#[cynic(rename = "FAILED")]
|
||||
Failed,
|
||||
}
|
||||
|
||||
/// Machine-readable error code from the platform error catalog.
|
||||
/// Used in task status messages to identify the class of error.
|
||||
/// See platformerrors package for the canonical definitions.
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug, PartialEq)]
|
||||
pub enum PlatformErrorCode {
|
||||
#[cynic(rename = "AUTHENTICATION_REQUIRED")]
|
||||
AuthenticationRequired,
|
||||
#[cynic(rename = "BUDGET_EXCEEDED")]
|
||||
BudgetExceeded,
|
||||
#[cynic(rename = "CONTENT_POLICY_VIOLATION")]
|
||||
ContentPolicyViolation,
|
||||
#[cynic(rename = "ENVIRONMENT_SETUP_FAILED")]
|
||||
EnvironmentSetupFailed,
|
||||
#[cynic(rename = "EXTERNAL_AUTHENTICATION_REQUIRED")]
|
||||
ExternalAuthenticationRequired,
|
||||
#[cynic(rename = "FEATURE_NOT_AVAILABLE")]
|
||||
FeatureNotAvailable,
|
||||
#[cynic(rename = "INSUFFICIENT_CREDITS")]
|
||||
InsufficientCredits,
|
||||
#[cynic(rename = "INTEGRATION_DISABLED")]
|
||||
IntegrationDisabled,
|
||||
#[cynic(rename = "INTEGRATION_NOT_CONFIGURED")]
|
||||
IntegrationNotConfigured,
|
||||
#[cynic(rename = "INTERNAL_ERROR")]
|
||||
InternalError,
|
||||
#[cynic(rename = "INVALID_REQUEST")]
|
||||
InvalidRequest,
|
||||
#[cynic(rename = "NOT_AUTHORIZED")]
|
||||
NotAuthorized,
|
||||
#[cynic(rename = "RESOURCE_UNAVAILABLE")]
|
||||
ResourceUnavailable,
|
||||
#[cynic(rename = "RESOURCE_NOT_FOUND")]
|
||||
ResourceNotFound,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PlanArtifact {
|
||||
pub document_uid: cynic::Id,
|
||||
pub notebook_uid: Option<cynic::Id>,
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PullRequestArtifact {
|
||||
pub url: String,
|
||||
pub branch: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ScreenshotArtifact {
|
||||
pub artifact_uid: cynic::Id,
|
||||
pub mime_type: String,
|
||||
pub description: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct FileArtifact {
|
||||
pub artifact_uid: cynic::Id,
|
||||
pub filepath: String,
|
||||
pub mime_type: String,
|
||||
pub description: Option<String>,
|
||||
pub size_bytes: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug, Clone)]
|
||||
pub enum AIConversationArtifact {
|
||||
PlanArtifact(PlanArtifact),
|
||||
PullRequestArtifact(PullRequestArtifact),
|
||||
ScreenshotArtifact(ScreenshotArtifact),
|
||||
FileArtifact(FileArtifact),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug, PartialEq)]
|
||||
pub enum AgentHarness {
|
||||
Oz,
|
||||
ClaudeCode,
|
||||
Gemini,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SerializedBlockFormat {
|
||||
JsonV1,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct AIConversationFormat {
|
||||
pub has_task_list: bool,
|
||||
pub block_snapshot: Option<SerializedBlockFormat>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
#[cynic(graphql_type = "AIConversation")]
|
||||
pub struct AIConversation {
|
||||
pub conversation_id: cynic::Id,
|
||||
pub final_task_list: String,
|
||||
pub harness: AgentHarness,
|
||||
pub title: String,
|
||||
pub working_directory: Option<String>,
|
||||
pub usage: ConversationUsage,
|
||||
pub metadata: ObjectMetadata,
|
||||
pub permissions: ObjectPermissions,
|
||||
pub ambient_agent_task_id: Option<cynic::Id>,
|
||||
pub artifacts: Option<Vec<AIConversationArtifact>>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ConversationUsage {
|
||||
pub conversation_id: String,
|
||||
pub last_updated: Time,
|
||||
pub title: String,
|
||||
pub usage_metadata: ConversationUsageMetadata,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ConversationUsageMetadata {
|
||||
pub context_window_usage: f64,
|
||||
pub credits_spent: f64,
|
||||
pub summarized: bool,
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
use crate::{scalars::Time, schema, workspace::UgcCollectionEnablementSetting};
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct BillingMetadata {
|
||||
pub customer_type: CustomerType,
|
||||
pub delinquency_status: DelinquencyStatus,
|
||||
pub tier: Tier,
|
||||
pub service_agreements: Vec<ServiceAgreement>,
|
||||
pub ai_overages: Option<AiOverages>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct AiOverages {
|
||||
pub current_monthly_request_cost_cents: i32,
|
||||
pub current_monthly_requests_used: i32,
|
||||
pub current_period_end: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct BonusGrantsInfo {
|
||||
pub grants: Vec<BonusGrant>,
|
||||
pub spending_info: Option<BonusGrantSpendingInfo>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct BonusGrantSpendingInfo {
|
||||
pub current_month_credits_purchased: i32,
|
||||
pub current_month_period_end: Time,
|
||||
pub current_month_spend_cents: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum BonusGrantType {
|
||||
AmbientOnly,
|
||||
Any,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct BonusGrant {
|
||||
pub created_at: Time,
|
||||
pub cost_cents: i32,
|
||||
pub expiration: Option<Time>,
|
||||
pub grant_type: BonusGrantType,
|
||||
pub reason: String,
|
||||
pub user_facing_message: Option<String>,
|
||||
pub request_credits_granted: i32,
|
||||
pub request_credits_remaining: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum AddonCreditAutoReloadStatus {
|
||||
Failed,
|
||||
Succeeded,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ServiceAgreement {
|
||||
pub addon_credit_auto_reload_status: Option<AddonCreditAutoReloadStatus>,
|
||||
pub current_period_end: Time,
|
||||
pub status: ServiceAgreementStatus,
|
||||
pub stripe_subscription_id: Option<String>,
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: ServiceAgreementType,
|
||||
pub sunsetted_to_build_ts: Option<Time>,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum ServiceAgreementStatus {
|
||||
Active,
|
||||
Canceled,
|
||||
PastDue,
|
||||
Unpaid,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug, PartialEq)]
|
||||
pub enum ServiceAgreementType {
|
||||
Enterprise,
|
||||
Legacy,
|
||||
ProTrial,
|
||||
Prosumer,
|
||||
SelfServe,
|
||||
TeamTrial,
|
||||
Turbo,
|
||||
Business,
|
||||
Lightspeed,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct Tier {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub warp_ai_policy: Option<WarpAiPolicy>,
|
||||
pub team_size_policy: Option<TeamSizePolicy>,
|
||||
pub shared_notebooks_policy: Option<SharedNotebooksPolicy>,
|
||||
pub shared_workflows_policy: Option<SharedWorkflowsPolicy>,
|
||||
pub session_sharing_policy: Option<SessionSharingPolicy>,
|
||||
pub ai_autonomy_policy: Option<AiAutonomyPolicy>,
|
||||
pub telemetry_data_collection_policy: Option<TelemetryDataCollectionPolicy>,
|
||||
pub ugc_data_collection_policy: Option<UgcDataCollectionPolicy>,
|
||||
pub usage_based_pricing_policy: Option<UsageBasedPricingPolicy>,
|
||||
pub codebase_context_policy: Option<CodebaseContextPolicy>,
|
||||
pub byo_api_key_policy: Option<ByoApiKeyPolicy>,
|
||||
pub purchase_add_on_credits_policy: Option<PurchaseAddOnCreditsPolicy>,
|
||||
pub enterprise_pay_as_you_go_policy: Option<EnterprisePayAsYouGoPolicy>,
|
||||
pub enterprise_credits_auto_reload_policy: Option<EnterpriseCreditsAutoReloadPolicy>,
|
||||
pub multi_admin_policy: Option<MultiAdminPolicy>,
|
||||
pub ambient_agents_policy: Option<AmbientAgentsPolicy>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct SessionSharingPolicy {
|
||||
pub enabled: bool,
|
||||
pub max_session_bytes_size: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct AiAutonomyPolicy {
|
||||
pub enabled: bool,
|
||||
pub toggleable: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct SharedWorkflowsPolicy {
|
||||
pub is_unlimited: bool,
|
||||
pub limit: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct SharedNotebooksPolicy {
|
||||
pub is_unlimited: bool,
|
||||
pub limit: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct TeamSizePolicy {
|
||||
pub is_unlimited: bool,
|
||||
pub limit: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct WarpAiPolicy {
|
||||
pub limit: i32,
|
||||
pub is_code_suggestions_toggleable: bool,
|
||||
pub is_prompt_suggestions_toggleable: bool,
|
||||
pub is_next_command_enabled: bool,
|
||||
pub is_voice_enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct TelemetryDataCollectionPolicy {
|
||||
pub default: bool,
|
||||
pub toggleable: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct UgcDataCollectionPolicy {
|
||||
pub default_setting: UgcCollectionEnablementSetting,
|
||||
pub toggleable: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct UsageBasedPricingPolicy {
|
||||
pub toggleable: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct CodebaseContextPolicy {
|
||||
pub toggleable: bool,
|
||||
pub is_unlimited_indices: bool,
|
||||
pub max_indices: i32,
|
||||
pub max_files_per_repo: i32,
|
||||
pub embedding_generation_batch_size: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ByoApiKeyPolicy {
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PurchaseAddOnCreditsPolicy {
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct EnterprisePayAsYouGoPolicy {
|
||||
pub enabled: bool,
|
||||
pub payg_cost_per_thousand_credits_cents: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct EnterpriseCreditsAutoReloadPolicy {
|
||||
pub enabled: bool,
|
||||
pub auto_reload_cost_cents: i32,
|
||||
pub auto_reload_credit_denomination: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct MultiAdminPolicy {
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct AmbientAgentsPolicy {
|
||||
pub enabled: bool,
|
||||
pub toggleable: bool,
|
||||
pub max_concurrent_agents: i32,
|
||||
pub instance_shape: Option<InstanceShape>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct InstanceShape {
|
||||
pub vcpus: i32,
|
||||
pub memory_gb: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum CustomerType {
|
||||
Enterprise,
|
||||
Free,
|
||||
Legacy,
|
||||
ProTrial,
|
||||
Prosumer,
|
||||
SelfServe,
|
||||
TeamTrial,
|
||||
Turbo,
|
||||
Business,
|
||||
Lightspeed,
|
||||
Build,
|
||||
BuildMax,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum DelinquencyStatus {
|
||||
NoDelinquency,
|
||||
PastDue,
|
||||
TeamLimitExceeded,
|
||||
Unpaid,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct AddonCreditsOption {
|
||||
pub credits: i32,
|
||||
pub price_usd_cents: i32,
|
||||
}
|
||||
|
||||
impl AddonCreditsOption {
|
||||
pub fn rate(&self) -> f32 {
|
||||
self.price_usd_cents as f32 / self.credits as f32
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PricingInfo {
|
||||
pub plans: Vec<PlanPricing>,
|
||||
pub overages: OveragesPricing,
|
||||
pub addon_credits_options: Vec<AddonCreditsOption>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PlanPricing {
|
||||
pub plan: StripeSubscriptionPlan,
|
||||
pub monthly_plan_price_per_month_usd_cents: i32,
|
||||
pub yearly_plan_price_per_month_usd_cents: i32,
|
||||
pub request_limit: Option<i32>,
|
||||
pub codebase_limit: i32,
|
||||
pub codebase_context_file_limit: i32,
|
||||
pub max_team_size: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct OveragesPricing {
|
||||
pub price_per_request_usd_cents: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug, PartialEq)]
|
||||
pub enum StripeSubscriptionPlan {
|
||||
Business,
|
||||
Lightspeed,
|
||||
Pro,
|
||||
Team,
|
||||
Turbo,
|
||||
Build,
|
||||
BuildBusiness,
|
||||
BuildMax,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
use super::object::ObjectType;
|
||||
use crate::{response_context::ResponseContext, schema};
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserFacingError {
|
||||
pub error: UserFacingErrorInterface,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserFacingErrorInterface {
|
||||
SharedObjectsLimitExceeded(SharedObjectsLimitExceeded),
|
||||
PersonalObjectsLimitExceeded(PersonalObjectsLimitExceeded),
|
||||
AccountDelinquencyError(AccountDelinquencyError),
|
||||
GenericStringObjectUniqueKeyConflict(GenericStringObjectUniqueKeyConflict),
|
||||
BudgetExceededError(BudgetExceededError),
|
||||
PaymentMethodDeclinedError(PaymentMethodDeclinedError),
|
||||
InvalidAttachmentError(InvalidAttachmentError),
|
||||
#[cynic(fallback)]
|
||||
Unknown(UserFacingErrorFallback),
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "UserFacingErrorInterface")]
|
||||
pub struct UserFacingErrorFallback {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SharedObjectsLimitExceeded {
|
||||
pub limit: i32,
|
||||
pub object_type: ObjectType,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct PersonalObjectsLimitExceeded {
|
||||
pub limit: i32,
|
||||
pub object_type: ObjectType,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct AccountDelinquencyError {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenericStringObjectUniqueKeyConflict {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, thiserror::Error)]
|
||||
#[error("{message}")]
|
||||
pub struct BudgetExceededError {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, thiserror::Error)]
|
||||
#[error("{message}")]
|
||||
pub struct PaymentMethodDeclinedError {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, thiserror::Error)]
|
||||
#[error("{message}")]
|
||||
pub struct InvalidAttachmentError {
|
||||
pub message: String,
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
use crate::schema;
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum Experiment {
|
||||
AgentModeAnalyticsControl,
|
||||
AgentModeAnalyticsExperiment,
|
||||
AmbientAgentsControl,
|
||||
AmbientAgentsExperiment,
|
||||
AgentModeEarlyAccessExperiment,
|
||||
AgentModeHigherLimitExperiment,
|
||||
AgentModeLowerLimitExperiment,
|
||||
AgentModeUnlimitedRequestsControl,
|
||||
AgentModeUnlimitedRequestsExperiment,
|
||||
AgentOnboardingControl,
|
||||
AgentOnboardingSkippable,
|
||||
AgentOnboardingUnskippable,
|
||||
BuildPlanAutoReloadBannerToggle,
|
||||
BuildPlanAutoReloadControl,
|
||||
BuildPlanAutoReloadPostPurchaseModal,
|
||||
CloudPreferencesControl,
|
||||
CloudPreferencesGradualRolloutExperiment,
|
||||
DisableAgentModeExperiment,
|
||||
EnvVarsEarlyAccessExperiment,
|
||||
FreeTierToBuildConversionControl,
|
||||
FreeTierToBuildConversionDripCoupon,
|
||||
FreeTierToBuildConversionImmediateCoupon,
|
||||
FreeTierToBuildConversionInterstitialEmail,
|
||||
FreeTierToBuildConversionInterstitialOnly,
|
||||
LinuxLaunchExperiment,
|
||||
MultiAgentControl,
|
||||
MultiAgentExperiment,
|
||||
MultiArmReverseAiTrialControl,
|
||||
MultiArmReverseAiTrialFiveHundredRequests,
|
||||
MultiArmReverseAiTrialOneThousandFiveHundredRequests,
|
||||
MultiArmReverseAiTrialOneThousandRequests,
|
||||
OverlimitAgentModeControl,
|
||||
OverlimitAgentModeGradualRolloutExperiment,
|
||||
PromptSuggestionsViaMaaControl,
|
||||
PromptSuggestionsViaMaaExperiment,
|
||||
PromptSuggestionsViaMaaOob,
|
||||
FreeUserNoAiControl,
|
||||
FreeUserNoAiExperiment,
|
||||
ReverseProTrialControl,
|
||||
ReverseProTrialExperiment,
|
||||
ReverseProTrialOneWeekControl,
|
||||
ReverseProTrialOneWeekExperiment,
|
||||
ReverseTrialControl,
|
||||
ReverseTrialExperiment,
|
||||
SessionSharingControl,
|
||||
SessionSharingExperiment,
|
||||
SplitCreditCostControl,
|
||||
SplitCreditCostExperiment,
|
||||
WindowsLaunchControl,
|
||||
WindowsLaunchExperiment,
|
||||
TmuxSshWarpificationControl,
|
||||
TmuxSshWarpificationExperiment,
|
||||
UsageBasedPricingControl,
|
||||
UsageBasedPricingExperiment,
|
||||
CodebaseContextExperiment,
|
||||
CodebaseContextControl,
|
||||
SuggestedCodeDiffsControl,
|
||||
SuggestedCodeDiffsExperiment,
|
||||
UpgradeToProModalControl,
|
||||
UpgradeToProModalExperimentNoPromo,
|
||||
UpgradeToProModalExperimentWithPromo,
|
||||
FreeUserInitialCreditsControl,
|
||||
FreeUserInitialCreditsFiveHundred,
|
||||
FreeUserInitialCreditsThreeHundred,
|
||||
OzMultiHarnessControl,
|
||||
OzMultiHarnessExperiment,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
use crate::{
|
||||
object::{CloudObject, ObjectMetadata},
|
||||
object_permissions::ObjectPermissions,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct Folder {
|
||||
pub name: String,
|
||||
pub metadata: ObjectMetadata,
|
||||
pub permissions: ObjectPermissions,
|
||||
#[cynic(rename = "isWarpPack")]
|
||||
pub is_warp_pack: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct FolderWithDescendants {
|
||||
pub descendants: Vec<CloudObject>,
|
||||
pub folder: Folder,
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::Scalar, Debug, Clone)]
|
||||
pub struct ContentHash(pub String);
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum EmbeddingConfig {
|
||||
#[cynic(rename = "OPENAI_TEXT_SMALL_3_256")]
|
||||
OpenaiTextSmall3256,
|
||||
#[cynic(rename = "VOYAGE_CODE_3_512")]
|
||||
VoyageCode3512,
|
||||
#[cynic(rename = "VOYAGE_3_5_512")]
|
||||
Voyage35512,
|
||||
#[cynic(rename = "VOYAGE_3_5_LITE_512")]
|
||||
Voyage35Lite512,
|
||||
}
|
||||
|
||||
#[derive(cynic::Scalar, Debug, Clone)]
|
||||
pub struct NodeHash(pub String);
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct Fragment {
|
||||
pub content: String,
|
||||
pub content_hash: ContentHash,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RepoMetadata {
|
||||
pub path: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
use super::{
|
||||
object::{CloudObjectEventEntrypoint, ObjectMetadata},
|
||||
object_permissions::ObjectPermissions,
|
||||
};
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct GenericStringObject {
|
||||
pub format: GenericStringObjectFormat,
|
||||
pub metadata: ObjectMetadata,
|
||||
pub permissions: ObjectPermissions,
|
||||
pub serialized_model: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum GenericStringObjectFormat {
|
||||
#[cynic(rename = "JsonEnvVarCollection")]
|
||||
JsonEnvVarCollection,
|
||||
#[cynic(rename = "JsonPreference")]
|
||||
JsonPreference,
|
||||
#[cynic(rename = "JsonWorkflowEnum")]
|
||||
JsonWorkflowEnum,
|
||||
#[cynic(rename = "JsonAIFact")]
|
||||
JsonAIFact,
|
||||
#[cynic(rename = "JsonMCPServer")]
|
||||
JsonMCPServer,
|
||||
#[cynic(rename = "JsonAIExecutionProfile")]
|
||||
JsonAIExecutionProfile,
|
||||
#[cynic(rename = "JsonTemplatableMCPServer")]
|
||||
JsonTemplatableMCPServer,
|
||||
#[cynic(rename = "JsonCloudEnvironment")]
|
||||
JsonCloudEnvironment,
|
||||
#[cynic(rename = "JsonScheduledAmbientAgent")]
|
||||
JsonScheduledAmbientAgent,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenericStringObjectUniqueKey {
|
||||
pub key: String,
|
||||
pub unique_per: UniquePer,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum UniquePer {
|
||||
#[cynic(rename = "User")]
|
||||
User,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for GenericStringObjectFormat {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let s = match self {
|
||||
GenericStringObjectFormat::JsonEnvVarCollection => "JsonEnvVarCollection",
|
||||
GenericStringObjectFormat::JsonPreference => "JsonPreference",
|
||||
GenericStringObjectFormat::JsonWorkflowEnum => "JsonWorkflowEnum",
|
||||
GenericStringObjectFormat::JsonAIFact => "JsonAIFact",
|
||||
GenericStringObjectFormat::JsonMCPServer => "JsonMCPServer",
|
||||
GenericStringObjectFormat::JsonAIExecutionProfile => "JsonAIExecutionProfile",
|
||||
GenericStringObjectFormat::JsonTemplatableMCPServer => "JsonTemplatableMCPServer",
|
||||
GenericStringObjectFormat::JsonCloudEnvironment => "JsonCloudEnvironment",
|
||||
GenericStringObjectFormat::JsonScheduledAmbientAgent => "JsonScheduledAmbientAgent",
|
||||
};
|
||||
write!(f, "{s}")
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenericStringObjectInput {
|
||||
pub client_id: cynic::Id,
|
||||
pub entrypoint: CloudObjectEventEntrypoint,
|
||||
pub format: GenericStringObjectFormat,
|
||||
pub initial_folder_id: Option<cynic::Id>,
|
||||
pub serialized_model: String,
|
||||
pub uniqueness_key: Option<GenericStringObjectUniqueKey>,
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
#[cynic(graphql_type = "MCPTemplateVariable")]
|
||||
pub struct MCPTemplateVariable {
|
||||
pub key: String,
|
||||
pub allowed_values: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
#[cynic(graphql_type = "MCPJsonTemplate")]
|
||||
pub struct MCPJsonTemplate {
|
||||
pub json: String,
|
||||
pub variables: Vec<MCPTemplateVariable>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
#[cynic(graphql_type = "MCPGalleryTemplate")]
|
||||
pub struct MCPGalleryTemplate {
|
||||
pub description: String,
|
||||
pub gallery_item_id: String,
|
||||
pub instructions_in_markdown: Option<String>,
|
||||
pub json_template: MCPJsonTemplate,
|
||||
pub template: String,
|
||||
pub title: String,
|
||||
pub version: i32,
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
pub mod ai;
|
||||
pub mod billing;
|
||||
pub mod error;
|
||||
pub mod experiment;
|
||||
pub mod folder;
|
||||
pub mod full_source_code_embedding;
|
||||
pub mod generic_string_object;
|
||||
pub mod mcp_gallery_template;
|
||||
pub mod mutations;
|
||||
pub mod notebook;
|
||||
pub mod object;
|
||||
pub mod object_actions;
|
||||
pub mod object_permissions;
|
||||
pub mod queries;
|
||||
pub mod request_context;
|
||||
pub mod response_context;
|
||||
pub mod subscriptions;
|
||||
pub mod user;
|
||||
pub mod workflow;
|
||||
pub mod workspace;
|
||||
|
||||
// Re-export the schema that's generated by the schema crate.
|
||||
pub use warp_graphql_schema::schema;
|
||||
|
||||
use cynic::impl_scalar;
|
||||
impl_scalar!(crate::scalars::Time, schema::Time);
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation addInviteLinkDomainRestriction($requestContext: RequestContext!, $input: AddInviteLinkDomainRestrictionInput!) {
|
||||
addInviteLinkDomainRestriction(requestContext: $requestContext, input:$input) {
|
||||
... on AddInviteLinkDomainRestrictionOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct AddInviteLinkDomainRestrictionInput {
|
||||
pub domain: String,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct AddInviteLinkDomainRestrictionVariables {
|
||||
pub input: AddInviteLinkDomainRestrictionInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "AddInviteLinkDomainRestrictionVariables"
|
||||
)]
|
||||
pub struct AddInviteLinkDomainRestriction {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub add_invite_link_domain_restriction: AddInviteLinkDomainRestrictionResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
add_invite_link_domain_restriction(AddInviteLinkDomainRestrictionVariables) -> AddInviteLinkDomainRestriction;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct AddInviteLinkDomainRestrictionOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum AddInviteLinkDomainRestrictionResult {
|
||||
AddInviteLinkDomainRestrictionOutput(AddInviteLinkDomainRestrictionOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
object_permissions::{AccessLevel, ObjectPermissions},
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
user::PublicUserProfile,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct AddObjectGuestsVariables {
|
||||
pub input: AddObjectGuestsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "AddObjectGuestsVariables")]
|
||||
pub struct AddObjectGuests {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub add_object_guests: AddObjectGuestsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
add_object_guests(AddObjectGuestsVariables) -> AddObjectGuests;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct AddObjectGuestsOutput {
|
||||
pub object_permissions: ObjectPermissions,
|
||||
pub response_context: ResponseContext,
|
||||
pub user_profiles: Option<Vec<PublicUserProfile>>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum AddObjectGuestsResult {
|
||||
AddObjectGuestsOutput(AddObjectGuestsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct AddObjectGuestsInput {
|
||||
pub access_level: AccessLevel,
|
||||
pub object_uid: cynic::Id,
|
||||
pub user_emails: Vec<String>,
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
use super::create_generic_string_object::CreateGenericStringObjectOutput;
|
||||
use crate::{
|
||||
error::UserFacingError, generic_string_object::GenericStringObjectInput,
|
||||
object_permissions::Owner, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct BulkCreateObjectsVariables {
|
||||
pub input: BulkCreateObjectsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "BulkCreateObjectsVariables"
|
||||
)]
|
||||
pub struct BulkCreateObjects {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub bulk_create_objects: BulkCreateObjectsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
bulk_create_objects(BulkCreateObjectsVariables) -> BulkCreateObjects;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct BulkCreateObjectsOutput {
|
||||
pub generic_string_objects: Option<BulkCreateGenericStringObjectsOutput>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct BulkCreateGenericStringObjectsOutput {
|
||||
pub objects: Vec<CreateGenericStringObjectOutput>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum BulkCreateObjectsResult {
|
||||
BulkCreateObjectsOutput(BulkCreateObjectsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct BulkCreateObjectsInput {
|
||||
pub generic_string_objects: Option<BulkCreateGenericStringObjectsInput>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct BulkCreateGenericStringObjectsInput {
|
||||
pub objects: Vec<GenericStringObjectInput>,
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
use super::create_file_artifact_upload_target::FileArtifact;
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ConfirmFileArtifactUploadVariables {
|
||||
pub input: ConfirmFileArtifactUploadInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "ConfirmFileArtifactUploadVariables"
|
||||
)]
|
||||
pub struct ConfirmFileArtifactUpload {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub confirm_file_artifact_upload: ConfirmFileArtifactUploadResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
confirm_file_artifact_upload(ConfirmFileArtifactUploadVariables) -> ConfirmFileArtifactUpload;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ConfirmFileArtifactUploadResult {
|
||||
ConfirmFileArtifactUploadOutput(ConfirmFileArtifactUploadOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ConfirmFileArtifactUploadOutput {
|
||||
pub artifact: FileArtifact,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
#[cynic(graphql_type = "ConfirmFileArtifactUploadInput")]
|
||||
pub struct ConfirmFileArtifactUploadInput {
|
||||
pub artifact_uid: cynic::Id,
|
||||
pub checksum: String,
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateAgentTaskVariables {
|
||||
pub input: CreateAgentTaskInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "CreateAgentTaskVariables")]
|
||||
pub struct CreateAgentTask {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_agent_task: CreateAgentTaskResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
create_agent_task(CreateAgentTaskVariables) -> CreateAgentTask;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum CreateAgentTaskResult {
|
||||
CreateAgentTaskOutput(CreateAgentTaskOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateAgentTaskOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub task_id: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
#[cynic(graphql_type = "CreateAgentTaskInput")]
|
||||
pub struct CreateAgentTaskInput {
|
||||
pub prompt: String,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub environment_uid: Option<cynic::Id>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub parent_run_id: Option<cynic::Id>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub agent_config_snapshot: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateAnonymousUserVariables {
|
||||
pub input: CreateAnonymousUserInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateAnonymousUserInput {
|
||||
pub anonymous_user_type: AnonymousUserType,
|
||||
pub expiration_type: AnonymousUserExpirationType,
|
||||
pub referral_code: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "CreateAnonymousUserVariables"
|
||||
)]
|
||||
pub struct CreateAnonymousUser {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_anonymous_user: CreateAnonymousUserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_anonymous_user(CreateAnonymousUserVariables) -> CreateAnonymousUser;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateAnonymousUserOutput {
|
||||
pub expires_at: Option<Time>,
|
||||
pub anonymous_user_type: AnonymousUserType,
|
||||
pub firebase_uid: String,
|
||||
pub id_token: String,
|
||||
pub is_invite_valid: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum CreateAnonymousUserResult {
|
||||
CreateAnonymousUserOutput(CreateAnonymousUserOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum AnonymousUserExpirationType {
|
||||
#[cynic(rename = "EXPIRATION_14_DAYS")]
|
||||
Expiration14Days,
|
||||
#[cynic(rename = "NO_EXPIRATION")]
|
||||
NoExpiration,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum AnonymousUserType {
|
||||
NativeClientAnonymousUser,
|
||||
NativeClientAnonymousUserFeatureGated,
|
||||
WebClientAnonymousUser,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateFileArtifactUploadTargetVariables {
|
||||
pub input: CreateFileArtifactUploadTargetInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "CreateFileArtifactUploadTargetVariables"
|
||||
)]
|
||||
pub struct CreateFileArtifactUploadTarget {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_file_artifact_upload_target: CreateFileArtifactUploadTargetResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
create_file_artifact_upload_target(CreateFileArtifactUploadTargetVariables) -> CreateFileArtifactUploadTarget;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum CreateFileArtifactUploadTargetResult {
|
||||
CreateFileArtifactUploadTargetOutput(CreateFileArtifactUploadTargetOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateFileArtifactUploadTargetOutput {
|
||||
pub artifact: FileArtifact,
|
||||
pub response_context: ResponseContext,
|
||||
pub upload_target: FileArtifactUploadTarget,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct FileArtifact {
|
||||
pub artifact_uid: cynic::Id,
|
||||
pub filepath: String,
|
||||
pub description: Option<String>,
|
||||
pub mime_type: String,
|
||||
pub size_bytes: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "CreateUploadTarget")]
|
||||
pub struct FileArtifactUploadTarget {
|
||||
pub url: String,
|
||||
pub method: String,
|
||||
pub headers: Vec<FileArtifactUploadHeader>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "CreateUploadTargetHeader")]
|
||||
pub struct FileArtifactUploadHeader {
|
||||
pub name: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
#[cynic(graphql_type = "CreateFileArtifactUploadTargetInput")]
|
||||
pub struct CreateFileArtifactUploadTargetInput {
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub conversation_id: Option<cynic::Id>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub run_id: Option<cynic::Id>,
|
||||
pub filepath: String,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub mime_type: Option<String>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub size_bytes: Option<i32>,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
use crate::{
|
||||
error::UserFacingError, folder::Folder, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateFolderVariables {
|
||||
pub input: CreateFolderInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "CreateFolderVariables")]
|
||||
pub struct CreateFolder {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_folder: CreateFolderResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_folder(CreateFolderVariables) -> CreateFolder;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateFolderOutput {
|
||||
pub folder: Folder,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateFolderResult {
|
||||
CreateFolderOutput(CreateFolderOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateFolderInput {
|
||||
pub initial_folder_id: Option<cynic::Id>,
|
||||
pub name: String,
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
generic_string_object::{GenericStringObject, GenericStringObjectInput},
|
||||
object_permissions::Owner,
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateGenericStringObjectVariables {
|
||||
pub input: CreateGenericStringObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "CreateGenericStringObjectVariables"
|
||||
)]
|
||||
pub struct CreateGenericStringObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_generic_string_object: CreateGenericStringObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_generic_string_object(CreateGenericStringObjectVariables) -> CreateGenericStringObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateGenericStringObjectOutput {
|
||||
pub client_id: cynic::Id,
|
||||
pub generic_string_object: GenericStringObject,
|
||||
pub response_context: ResponseContext,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateGenericStringObjectResult {
|
||||
CreateGenericStringObjectOutput(CreateGenericStringObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateGenericStringObjectInput {
|
||||
pub generic_string_object: GenericStringObjectInput,
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
managed_secrets::{ManagedSecret, ManagedSecretType},
|
||||
object_permissions::Owner,
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateManagedSecretVariables {
|
||||
pub input: CreateManagedSecretInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "CreateManagedSecretVariables"
|
||||
)]
|
||||
pub struct CreateManagedSecret {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_managed_secret: CreateManagedSecretResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
create_managed_secret(CreateManagedSecretVariables) -> CreateManagedSecret;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateManagedSecretOutput {
|
||||
pub managed_secret: ManagedSecret,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateManagedSecretResult {
|
||||
CreateManagedSecretOutput(CreateManagedSecretOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateManagedSecretInput {
|
||||
pub description: Option<String>,
|
||||
pub encrypted_value: String,
|
||||
pub name: String,
|
||||
pub owner: Owner,
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: ManagedSecretType,
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, notebook::Notebook, object::CloudObjectEventEntrypoint,
|
||||
object_permissions::Owner, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateNotebookVariables {
|
||||
pub input: CreateNotebookInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateNotebookInput {
|
||||
pub ai_document_id: Option<String>,
|
||||
pub conversation_id: Option<String>,
|
||||
pub data: Option<String>,
|
||||
pub entrypoint: CloudObjectEventEntrypoint,
|
||||
pub initial_folder_id: Option<cynic::Id>,
|
||||
pub owner: Owner,
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "CreateNotebookVariables")]
|
||||
pub struct CreateNotebook {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_notebook: CreateNotebookResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_notebook(CreateNotebookVariables) -> CreateNotebook;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateNotebookOutput {
|
||||
pub notebook: Notebook,
|
||||
pub response_context: ResponseContext,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateNotebookResult {
|
||||
CreateNotebookOutput(CreateNotebookOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
use crate::{error::UserFacingError, request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateSimpleIntegrationVariables {
|
||||
pub config: SimpleIntegrationConfig,
|
||||
pub enabled: bool,
|
||||
pub integration_type: String,
|
||||
pub is_update: bool,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SimpleIntegrationConfig {
|
||||
// For these fields, None means "don't change".
|
||||
// For base_prompt/environment_uid/model_id, Some("") means "clear".
|
||||
// Note: mcp_servers_json is treated as patch data; on update, an empty string is a no-op.
|
||||
pub base_prompt: Option<String>,
|
||||
pub environment_uid: Option<String>,
|
||||
pub model_id: Option<String>,
|
||||
pub mcp_servers_json: Option<String>,
|
||||
pub remove_mcp_server_names: Option<Vec<String>>,
|
||||
pub worker_host: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "CreateSimpleIntegrationVariables"
|
||||
)]
|
||||
pub struct CreateSimpleIntegration {
|
||||
#[arguments(input: { config: $config, enabled: $enabled, integrationType: $integration_type, isUpdate: $is_update }, requestContext: $request_context)]
|
||||
pub create_simple_integration: CreateSimpleIntegrationResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateSimpleIntegrationOutput {
|
||||
pub auth_url: Option<String>,
|
||||
pub success: bool,
|
||||
pub message: String,
|
||||
#[cynic(rename = "txId")]
|
||||
pub tx_id: Option<cynic::Id>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum CreateSimpleIntegrationResult {
|
||||
CreateSimpleIntegrationOutput(CreateSimpleIntegrationOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
CreateSimpleIntegration(CreateSimpleIntegrationVariables) -> CreateSimpleIntegration;
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::CloudObjectEventEntrypoint, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema, workspace::Workspace,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation CreateTeam($input: CreateTeamInput!, $request_context: RequestContext!) {
|
||||
createTeam(input: $input, requestContext: $request_context) {
|
||||
... on CreateTeamOutput {
|
||||
workspace {
|
||||
uid
|
||||
name
|
||||
members {
|
||||
uid
|
||||
email
|
||||
role
|
||||
}
|
||||
teams {
|
||||
uid
|
||||
name
|
||||
members {
|
||||
uid
|
||||
email
|
||||
role
|
||||
}
|
||||
}
|
||||
billingMetadata {
|
||||
customerType
|
||||
delinquencyStatus
|
||||
tier {
|
||||
name
|
||||
description
|
||||
warpAiPolicy {
|
||||
limit
|
||||
isCodeSuggestionsToggleable
|
||||
isPromptSuggestionsToggleable
|
||||
isNextCommandEnabled
|
||||
isVoiceEnabled
|
||||
}
|
||||
teamSizePolicy {
|
||||
isUnlimited
|
||||
limit
|
||||
}
|
||||
sharedNotebooksPolicy {
|
||||
isUnlimited
|
||||
limit
|
||||
}
|
||||
sharedWorkflowsPolicy {
|
||||
isUnlimited
|
||||
limit
|
||||
}
|
||||
sessionSharingPolicy {
|
||||
enabled
|
||||
maxSessionBytesSize
|
||||
}
|
||||
anyoneWithLinkSharingPolicy {
|
||||
toggleable
|
||||
}
|
||||
directLinkSharingPolicy {
|
||||
toggleable
|
||||
}
|
||||
byoApiKeyPolicy {
|
||||
enabled
|
||||
}
|
||||
pricing {
|
||||
enablePayAsYouGo
|
||||
autoReloadCreditDenomination
|
||||
autoReloadCostCents
|
||||
}
|
||||
}
|
||||
serviceAgreements {
|
||||
currentPeriodEnd
|
||||
status
|
||||
stripeSubscriptionId
|
||||
type
|
||||
}
|
||||
}
|
||||
settings {
|
||||
isDiscoverable
|
||||
isInviteLinkEnabled
|
||||
llmSettings {
|
||||
enabled
|
||||
}
|
||||
telemetrySettings {
|
||||
forceEnabled
|
||||
}
|
||||
linkSharingSettings {
|
||||
anyoneWithLinkSharingEnabled
|
||||
directLinkSharingEnabled
|
||||
}
|
||||
}
|
||||
hasBillingHistory
|
||||
inviteCode
|
||||
pendingEmailInvites {
|
||||
email
|
||||
expired
|
||||
}
|
||||
inviteLinkDomainRestrictions {
|
||||
uid
|
||||
domain
|
||||
}
|
||||
stripeCustomerId
|
||||
isEligibleForDiscovery
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateTeamVariables {
|
||||
pub input: CreateTeamInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateTeamInput {
|
||||
pub discoverable: bool,
|
||||
pub entrypoint: CloudObjectEventEntrypoint,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "CreateTeamVariables")]
|
||||
pub struct CreateTeam {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_team: CreateTeamResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_team(CreateTeamVariables) -> CreateTeam;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateTeamResult {
|
||||
CreateTeamOutput(CreateTeamOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateTeamOutput {
|
||||
pub workspace: Workspace,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, object::CloudObjectEventEntrypoint, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema, workflow::Workflow,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation CreateWorkflow($input: CreateWorkflowInput!, $requestContext: RequestContext!) {
|
||||
createWorkflow(input: $input, requestContext: $requestContext) {
|
||||
... on CreateWorkflowOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
workflow {
|
||||
data
|
||||
metadata {
|
||||
creatorUid
|
||||
currentEditorUid
|
||||
isWelcomeObject
|
||||
lastEditorUid
|
||||
metadataLastUpdatedTs
|
||||
parent {
|
||||
... on FolderContainer {
|
||||
folderUid
|
||||
}
|
||||
... on Space {
|
||||
uid
|
||||
type
|
||||
}
|
||||
}
|
||||
revisionTs
|
||||
trashedTs
|
||||
uid
|
||||
}
|
||||
permissions {
|
||||
guests {
|
||||
accessLevel
|
||||
source {
|
||||
... on FolderContainer {
|
||||
folderUid
|
||||
}
|
||||
... on Space {
|
||||
uid
|
||||
type
|
||||
}
|
||||
}
|
||||
subject {
|
||||
... on UserGuest {
|
||||
firebaseUid
|
||||
}
|
||||
}
|
||||
}
|
||||
lastUpdatedTs
|
||||
anyoneLinkSharing {
|
||||
accessLevel
|
||||
source {
|
||||
... on FolderContainer {
|
||||
folderUid
|
||||
}
|
||||
... on Space {
|
||||
uid
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
revisionTs
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
... on SharedObjectsLimitExceeded {
|
||||
limit
|
||||
objectType
|
||||
message
|
||||
}
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CreateWorkflowVariables {
|
||||
pub input: CreateWorkflowInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "CreateWorkflowVariables")]
|
||||
pub struct CreateWorkflow {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub create_workflow: CreateWorkflowResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
create_workflow(CreateWorkflowVariables) -> CreateWorkflow;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CreateWorkflowOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub workflow: Workflow,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CreateWorkflowResult {
|
||||
CreateWorkflowOutput(CreateWorkflowOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CreateWorkflowInput {
|
||||
pub data: String,
|
||||
pub entrypoint: CloudObjectEventEntrypoint,
|
||||
pub initial_folder_id: Option<cynic::Id>,
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct DeleteAIConversationVariables {
|
||||
pub input: DeleteConversationInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "DeleteAIConversationVariables"
|
||||
)]
|
||||
pub struct DeleteAIConversation {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub delete_conversation: DeleteConversationResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
delete_ai_conversation(DeleteAIConversationVariables) -> DeleteAIConversation;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct DeleteConversationOutput {
|
||||
pub deleted_uid: cynic::Id,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum DeleteConversationResult {
|
||||
DeleteConversationOutput(DeleteConversationOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct DeleteConversationInput {
|
||||
pub conversation_id: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation DeleteInviteLinkDomainRestriction($input:DeleteInviteLinkDomainRestrictionInput!, $request_context:RequestContext!) {
|
||||
deleteInviteLinkDomainRestriction(
|
||||
input:$input,
|
||||
requestContext: $request_context
|
||||
) {
|
||||
__typename
|
||||
... on DeleteInviteLinkDomainRestrictionOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct DeleteInviteLinkDomainRestrictionVariables {
|
||||
pub input: DeleteInviteLinkDomainRestrictionInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "DeleteInviteLinkDomainRestrictionVariables"
|
||||
)]
|
||||
pub struct DeleteInviteLinkDomainRestriction {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub delete_invite_link_domain_restriction: DeleteInviteLinkDomainRestrictionResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
delete_invite_link_domain_restriction(DeleteInviteLinkDomainRestrictionVariables) -> DeleteInviteLinkDomainRestriction;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct DeleteInviteLinkDomainRestrictionOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum DeleteInviteLinkDomainRestrictionResult {
|
||||
DeleteInviteLinkDomainRestrictionOutput(DeleteInviteLinkDomainRestrictionOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct DeleteInviteLinkDomainRestrictionInput {
|
||||
pub team_uid: cynic::Id,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object_permissions::Owner, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct DeleteManagedSecretVariables {
|
||||
pub input: DeleteManagedSecretInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "DeleteManagedSecretVariables"
|
||||
)]
|
||||
pub struct DeleteManagedSecret {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub delete_managed_secret: DeleteManagedSecretResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
delete_managed_secret(DeleteManagedSecretVariables) -> DeleteManagedSecret;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct DeleteManagedSecretOutput {
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum DeleteManagedSecretResult {
|
||||
DeleteManagedSecretOutput(DeleteManagedSecretOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct DeleteManagedSecretInput {
|
||||
pub name: String,
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct DeleteObjectVariables {
|
||||
pub input: DeleteObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "DeleteObjectVariables")]
|
||||
pub struct DeleteObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub delete_object: DeleteObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
delete_object(DeleteObjectVariables) -> DeleteObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct DeleteObjectOutput {
|
||||
pub deleted_uids: Vec<cynic::Id>,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum DeleteObjectResult {
|
||||
DeleteObjectOutput(DeleteObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct DeleteObjectInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation DeleteTeamInvite(
|
||||
$input: DeleteTeamInviteInput!,
|
||||
$requestContext: RequestContext!
|
||||
) {
|
||||
deleteTeamInvite(input:$input, requestContext: $requestContext) {
|
||||
... on DeleteTeamInviteOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct DeleteTeamInviteVariables {
|
||||
pub input: DeleteTeamInviteInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "DeleteTeamInviteVariables")]
|
||||
pub struct DeleteTeamInvite {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub delete_team_invite: DeleteTeamInviteResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
delete_team_invite(DeleteTeamInviteVariables) -> DeleteTeamInvite;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct DeleteTeamInviteOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum DeleteTeamInviteResult {
|
||||
DeleteTeamInviteOutput(DeleteTeamInviteOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct DeleteTeamInviteInput {
|
||||
pub email: String,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object_permissions::Owner, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation EmptyTrash($input: EmptyTrashInput!, $requestContext: RequestContext!) {
|
||||
emptyTrash(input: $input, requestContext: $requestContext) {
|
||||
... on EmptyTrashOutput {
|
||||
deletedUids
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
success
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct EmptyTrashVariables {
|
||||
pub input: EmptyTrashInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "EmptyTrashVariables")]
|
||||
pub struct EmptyTrash {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub empty_trash: EmptyTrashResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
empty_trash(EmptyTrashVariables) -> EmptyTrash;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct EmptyTrashOutput {
|
||||
pub deleted_uids: Vec<cynic::Id>,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum EmptyTrashResult {
|
||||
EmptyTrashOutput(EmptyTrashOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct EmptyTrashInput {
|
||||
pub owner: Owner,
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
use crate::{error::UserFacingError, request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ExpireApiKeyVariables {
|
||||
pub key_uid: cynic::Id,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "ExpireApiKeyVariables")]
|
||||
pub struct ExpireApiKey {
|
||||
#[arguments(input: { keyUID: $key_uid }, requestContext: $request_context)]
|
||||
pub expire_api_key: ExpireApiKeyResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ExpireApiKeyOutput {
|
||||
pub __typename: String,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ExpireApiKeyResult {
|
||||
ExpireApiKeyOutput(ExpireApiKeyOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
expire_api_key(ExpireApiKeyVariables) -> ExpireApiKey;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
use crate::queries::api_keys::ApiKeyProperties;
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GenerateApiKeyVariables {
|
||||
pub input: GenerateApiKeyInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenerateApiKeyInput {
|
||||
pub name: String,
|
||||
pub team_id: Option<cynic::Id>,
|
||||
pub expires_at: Option<Time>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateApiKeyOutput {
|
||||
pub raw_api_key: String,
|
||||
pub api_key: ApiKeyProperties,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateApiKeyResult {
|
||||
GenerateApiKeyOutput(GenerateApiKeyOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "GenerateApiKeyVariables")]
|
||||
pub struct GenerateApiKey {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub generate_api_key: GenerateApiKeyResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
generate_api_key(GenerateApiKeyVariables) -> GenerateApiKey;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
full_source_code_embedding::{ContentHash, EmbeddingConfig, Fragment, NodeHash, RepoMetadata},
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GenerateCodeEmbeddingsVariables {
|
||||
pub input: GenerateCodeEmbeddingsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenerateCodeEmbeddingsInput {
|
||||
pub embedding_config: EmbeddingConfig,
|
||||
pub repo_metadata: RepoMetadata,
|
||||
pub fragments: Vec<Fragment>,
|
||||
pub root_hash: NodeHash,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct MerkleTreeNode {
|
||||
pub hash: NodeHash,
|
||||
pub children: Vec<NodeHash>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "GenerateCodeEmbeddingsVariables"
|
||||
)]
|
||||
pub struct GenerateCodeEmbeddings {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub generate_code_embeddings: GenerateCodeEmbeddingsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
generate_code_embeddings(GenerateCodeEmbeddingsVariables) -> GenerateCodeEmbeddings;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCodeEmbeddingsError {
|
||||
pub error: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCodeEmbeddingsOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub embedding_results: Vec<GenerateCodeEmbeddingResult>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCodeEmbeddingResult {
|
||||
pub hash: ContentHash,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateCodeEmbeddingsResult {
|
||||
GenerateCodeEmbeddingsOutput(GenerateCodeEmbeddingsOutput),
|
||||
GenerateCodeEmbeddingsError(GenerateCodeEmbeddingsError),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation GenerateCommands($input: GenerateCommandsInput!, $requestContext: RequestContext!) {
|
||||
generateCommands(input: $input, requestContext: $requestContext) {
|
||||
... on GenerateCommandsOutput {
|
||||
status {
|
||||
... on GenerateCommandsSuccess {
|
||||
commands {
|
||||
command
|
||||
description
|
||||
parameters {
|
||||
description
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
... on GenerateCommandsFailure {
|
||||
type
|
||||
}
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GenerateCommandsVariables {
|
||||
pub input: GenerateCommandsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "GenerateCommandsVariables")]
|
||||
pub struct GenerateCommands {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub generate_commands: GenerateCommandsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
generate_commands(GenerateCommandsVariables) -> GenerateCommands;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCommandsSuccess {
|
||||
pub commands: Vec<GeneratedCommand>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GeneratedCommand {
|
||||
pub command: String,
|
||||
pub description: String,
|
||||
pub parameters: Vec<GeneratedCommandParameter>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GeneratedCommandParameter {
|
||||
pub description: String,
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCommandsOutput {
|
||||
pub status: GenerateCommandsStatus,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateCommandsFailure {
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: GenerateCommandsFailureType,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateCommandsResult {
|
||||
GenerateCommandsOutput(GenerateCommandsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateCommandsStatus {
|
||||
GenerateCommandsSuccess(GenerateCommandsSuccess),
|
||||
GenerateCommandsFailure(GenerateCommandsFailure),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum GenerateCommandsFailureType {
|
||||
AiProviderError,
|
||||
BadPrompt,
|
||||
Other,
|
||||
RateLimited,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenerateCommandsInput {
|
||||
pub prompt: String,
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
use crate::{
|
||||
ai::RequestLimitInfo, error::UserFacingError, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation GenerateDialogue($input: GenerateDialogueInput!, $requestContext: RequestContext!) {
|
||||
generateDialogue(input: $input, requestContext: $requestContext) {
|
||||
... on GenerateDialogueOutput {
|
||||
status {
|
||||
... on GenerateDialogueSuccess {
|
||||
answer
|
||||
requestLimitInfo {
|
||||
isUnlimited
|
||||
nextRefreshTime
|
||||
requestLimit
|
||||
requestsUsedSinceLastRefresh
|
||||
}
|
||||
transcriptSummarized
|
||||
truncated
|
||||
}
|
||||
... on GenerateDialogueFailure {
|
||||
requestLimitInfo {
|
||||
isUnlimited
|
||||
nextRefreshTime
|
||||
requestLimit
|
||||
requestsUsedSinceLastRefresh
|
||||
}
|
||||
}
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GenerateDialogueVariables {
|
||||
pub input: GenerateDialogueInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "GenerateDialogueVariables")]
|
||||
pub struct GenerateDialogue {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub generate_dialogue: GenerateDialogueResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
generate_dialogue(GenerateDialogueVariables) -> GenerateDialogue;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateDialogueSuccess {
|
||||
pub answer: String,
|
||||
pub request_limit_info: RequestLimitInfo,
|
||||
pub transcript_summarized: bool,
|
||||
pub truncated: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateDialogueOutput {
|
||||
pub status: GenerateDialogueStatus,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateDialogueFailure {
|
||||
pub request_limit_info: RequestLimitInfo,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateDialogueResult {
|
||||
GenerateDialogueOutput(GenerateDialogueOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateDialogueStatus {
|
||||
GenerateDialogueSuccess(GenerateDialogueSuccess),
|
||||
GenerateDialogueFailure(GenerateDialogueFailure),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenerateDialogueInput {
|
||||
pub prompt: String,
|
||||
pub transcript: Vec<TranscriptPart>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TranscriptPart {
|
||||
pub assistant: String,
|
||||
pub user: String,
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation GenerateMetadataForCommand($input: GenerateMetadataForCommandInput!, $requestContext: RequestContext!) {
|
||||
generateMetadataForCommand(input: $input, requestContext: $requestContext) {
|
||||
... on GenerateMetadataForCommandOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
status {
|
||||
... on GenerateMetadataForCommandSuccess {
|
||||
description
|
||||
parameterizedCommand
|
||||
parameters {
|
||||
description
|
||||
name
|
||||
value
|
||||
}
|
||||
title
|
||||
}
|
||||
... on GenerateMetadataForCommandFailure {
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GenerateMetadataForCommandVariables {
|
||||
pub input: GenerateMetadataForCommandInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "GenerateMetadataForCommandVariables"
|
||||
)]
|
||||
pub struct GenerateMetadataForCommand {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub generate_metadata_for_command: GenerateMetadataForCommandResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
generate_metadata_for_command(GenerateMetadataForCommandVariables) -> GenerateMetadataForCommand;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateMetadataForCommandSuccess {
|
||||
pub description: String,
|
||||
pub parameterized_command: String,
|
||||
pub parameters: Vec<GeneratedMetadataForCommand>,
|
||||
pub title: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GeneratedMetadataForCommand {
|
||||
pub description: String,
|
||||
pub name: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateMetadataForCommandOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub status: GenerateMetadataForCommandStatus,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenerateMetadataForCommandFailure {
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: GenerateMetadataForCommandFailureType,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateMetadataForCommandResult {
|
||||
GenerateMetadataForCommandOutput(GenerateMetadataForCommandOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GenerateMetadataForCommandStatus {
|
||||
GenerateMetadataForCommandSuccess(GenerateMetadataForCommandSuccess),
|
||||
GenerateMetadataForCommandFailure(GenerateMetadataForCommandFailure),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum GenerateMetadataForCommandFailureType {
|
||||
AiProviderError,
|
||||
BadCommand,
|
||||
Other,
|
||||
RateLimited,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GenerateMetadataForCommandInput {
|
||||
pub command: String,
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
use crate::{
|
||||
notebook::{UpdateNotebookEditAccessInput, UpdateNotebookEditAccessResult},
|
||||
request_context::RequestContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GiveUpNotebookEditAccessVariables {
|
||||
pub input: UpdateNotebookEditAccessInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "GiveUpNotebookEditAccessVariables"
|
||||
)]
|
||||
pub struct GiveUpNotebookEditAccess {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub give_up_notebook_edit_access: UpdateNotebookEditAccessResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
give_up_notebook_edit_access(GiveUpNotebookEditAccessVariables) -> GiveUpNotebookEditAccess;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
use crate::{
|
||||
notebook::{UpdateNotebookEditAccessInput, UpdateNotebookEditAccessResult},
|
||||
request_context::RequestContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GrabNotebookEditAccessVariables {
|
||||
pub input: UpdateNotebookEditAccessInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "GrabNotebookEditAccessVariables"
|
||||
)]
|
||||
pub struct GrabNotebookEditAccess {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub grab_notebook_edit_access: UpdateNotebookEditAccessResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
grab_notebook_edit_access(GrabNotebookEditAccessVariables) -> GrabNotebookEditAccess;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
scalars::Time, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct IssueTaskIdentityTokenVariables {
|
||||
pub input: IssueTaskIdentityTokenInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "IssueTaskIdentityTokenVariables"
|
||||
)]
|
||||
pub struct IssueTaskIdentityToken {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub issue_task_identity_token: IssueTaskIdentityTokenResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
issue_task_identity_token(IssueTaskIdentityTokenVariables) -> IssueTaskIdentityToken;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum IssueTaskIdentityTokenResult {
|
||||
IssueTaskIdentityTokenOutput(IssueTaskIdentityTokenOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct IssueTaskIdentityTokenOutput {
|
||||
pub token: String,
|
||||
pub expires_at: Time,
|
||||
pub issuer: String,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct IssueTaskIdentityTokenInput {
|
||||
pub audience: String,
|
||||
pub requested_duration_seconds: i32,
|
||||
pub subject_template: Option<Vec<String>>,
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation JoinTeamWithTeamDiscovery($input: JoinTeamWithTeamDiscoveryInput!, $requestContext: RequestContext!) {
|
||||
joinTeamWithTeamDiscovery(input: $input, requestContext: $requestContext) {
|
||||
... on JoinTeamWithTeamDiscoveryOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct JoinTeamWithTeamDiscoveryVariables {
|
||||
pub input: JoinTeamWithTeamDiscoveryInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "JoinTeamWithTeamDiscoveryVariables"
|
||||
)]
|
||||
pub struct JoinTeamWithTeamDiscovery {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub join_team_with_team_discovery: JoinTeamWithTeamDiscoveryResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
join_team_with_team_discovery(JoinTeamWithTeamDiscoveryVariables) -> JoinTeamWithTeamDiscovery;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct JoinTeamWithTeamDiscoveryOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum JoinTeamWithTeamDiscoveryResult {
|
||||
JoinTeamWithTeamDiscoveryOutput(JoinTeamWithTeamDiscoveryOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum TeamDiscoveryEntrypoint {
|
||||
#[cynic(rename = "TeamSettings")]
|
||||
TeamSettings,
|
||||
#[cynic(rename = "WebSignup")]
|
||||
WebSignup,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct JoinTeamWithTeamDiscoveryInput {
|
||||
pub entrypoint: TeamDiscoveryEntrypoint,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
use crate::{error::UserFacingError, request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct LeaveObjectVariables {
|
||||
pub input: LeaveObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "LeaveObjectVariables")]
|
||||
pub struct LeaveObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub leave_object: LeaveObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
leave_object(LeaveObjectVariables) -> LeaveObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct LeaveObjectOutput {
|
||||
pub object_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum LeaveObjectResult {
|
||||
LeaveObjectOutput(LeaveObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct LeaveObjectInput {
|
||||
pub object_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct MintCustomTokenVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "MintCustomTokenVariables")]
|
||||
pub struct MintCustomToken {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub mint_custom_token: MintCustomTokenResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
mint_custom_token(MintCustomTokenVariables) -> MintCustomToken;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct MintCustomTokenOutput {
|
||||
pub custom_token: String,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum MintCustomTokenResult {
|
||||
MintCustomTokenOutput(MintCustomTokenOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
pub mod add_invite_link_domain_restriction;
|
||||
pub mod add_object_guests;
|
||||
pub mod bulk_create_objects;
|
||||
pub mod confirm_file_artifact_upload;
|
||||
pub mod create_agent_task;
|
||||
pub mod create_anonymous_user;
|
||||
pub mod create_file_artifact_upload_target;
|
||||
pub mod create_folder;
|
||||
pub mod create_generic_string_object;
|
||||
pub mod create_managed_secret;
|
||||
pub mod create_notebook;
|
||||
pub mod create_simple_integration;
|
||||
pub mod create_team;
|
||||
pub mod create_workflow;
|
||||
pub mod delete_ai_conversation;
|
||||
pub mod delete_invite_link_domain_restriction;
|
||||
pub mod delete_managed_secret;
|
||||
pub mod delete_object;
|
||||
pub mod delete_team_invite;
|
||||
pub mod empty_trash;
|
||||
pub mod expire_api_key;
|
||||
pub mod generate_api_key;
|
||||
pub mod generate_code_embeddings;
|
||||
pub mod generate_commands;
|
||||
pub mod generate_dialogue;
|
||||
pub mod generate_metadata_for_command;
|
||||
pub mod give_up_notebook_edit_access;
|
||||
pub mod grab_notebook_edit_access;
|
||||
pub mod issue_task_identity_token;
|
||||
pub mod join_team_with_team_discovery;
|
||||
pub mod leave_object;
|
||||
pub mod mint_custom_token;
|
||||
pub mod move_object;
|
||||
pub mod populate_merkle_tree_cache;
|
||||
pub mod purchase_addon_credits;
|
||||
pub mod record_object_action;
|
||||
pub mod remove_object_guest;
|
||||
pub mod remove_object_link_permissions;
|
||||
pub mod remove_user_from_team;
|
||||
pub mod rename_team;
|
||||
pub mod request_bonus;
|
||||
pub mod reset_invite_links;
|
||||
pub mod send_referral_invite_emails;
|
||||
pub mod send_team_invite_email;
|
||||
pub mod set_is_invite_link_enabled;
|
||||
pub mod set_object_link_permissions;
|
||||
pub mod set_team_discoverability;
|
||||
pub mod set_team_member_role;
|
||||
pub mod set_user_is_onboarded;
|
||||
pub mod share_block;
|
||||
pub mod stripe_billing_portal;
|
||||
pub mod transfer_generic_string_object_owner;
|
||||
pub mod transfer_notebook_owner;
|
||||
pub mod transfer_team_ownership;
|
||||
pub mod transfer_workflow_owner;
|
||||
pub mod trash_object;
|
||||
pub mod unshare_block;
|
||||
pub mod untrash_object;
|
||||
pub mod update_agent_task;
|
||||
pub mod update_folder;
|
||||
pub mod update_generic_string_object;
|
||||
pub mod update_managed_secret;
|
||||
pub mod update_merkle_tree;
|
||||
pub mod update_notebook;
|
||||
pub mod update_object_guests;
|
||||
pub mod update_onboarding_survey_status;
|
||||
pub mod update_user_settings;
|
||||
pub mod update_workflow;
|
||||
pub mod update_workspace_settings;
|
||||
@@ -0,0 +1,47 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
object::{ObjectMetadata, ObjectType},
|
||||
object_permissions::Owner,
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct MoveObjectVariables {
|
||||
pub input: MoveObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "MoveObjectVariables")]
|
||||
pub struct MoveObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub move_object: MoveObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
move_object(MoveObjectVariables) -> MoveObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct MoveObjectOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
pub metadata: ObjectMetadata,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum MoveObjectResult {
|
||||
MoveObjectOutput(MoveObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct MoveObjectInput {
|
||||
pub new_folder_uid: Option<cynic::Id>,
|
||||
pub new_owner: Owner,
|
||||
pub object_type: ObjectType,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
full_source_code_embedding::{EmbeddingConfig, NodeHash, RepoMetadata},
|
||||
request_context::RequestContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct PopulateMerkleTreeCacheVariables {
|
||||
pub embedding_config: EmbeddingConfig,
|
||||
pub root_hash: NodeHash,
|
||||
pub repo_metadata: RepoMetadata,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "PopulateMerkleTreeCacheVariables"
|
||||
)]
|
||||
pub struct PopulateMerkleTreeCache {
|
||||
#[arguments(input: { embeddingConfig: $embedding_config, rootHash: $root_hash, repoMetadata: $repo_metadata }, requestContext: $request_context)]
|
||||
pub populate_merkle_tree_cache: PopulateMerkleTreeCacheResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
populate_merkle_tree_cache(PopulateMerkleTreeCacheVariables) -> PopulateMerkleTreeCache;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct PopulateMerkleTreeCacheOutput {
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum PopulateMerkleTreeCacheResult {
|
||||
UserFacingError(UserFacingError),
|
||||
PopulateMerkleTreeCacheOutput(PopulateMerkleTreeCacheOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct PurchaseAddonCreditsInput {
|
||||
pub credits: i32,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct PurchaseAddonCreditsVariables {
|
||||
pub input: PurchaseAddonCreditsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "PurchaseAddonCreditsVariables"
|
||||
)]
|
||||
pub struct PurchaseAddonCredits {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub purchase_addon_credits: PurchaseAddonCreditsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
purchase_addon_credits(PurchaseAddonCreditsVariables) -> PurchaseAddonCredits;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum PurchaseAddonCreditsResult {
|
||||
PurchaseAddonCreditsOutput(PurchaseAddonCreditsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct PurchaseAddonCreditsOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
object_actions::{ActionType, ObjectActionHistory},
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
scalars::Time,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation RecordObjectAction($input: RecordObjectActionInput!, $requestContext: RequestContext!) {
|
||||
recordObjectAction(input: $input, requestContext: $requestContext) {
|
||||
... on RecordObjectActionOutput {
|
||||
history {
|
||||
actions {
|
||||
... on BundledActions {
|
||||
actionType
|
||||
count
|
||||
latestProcessedAtTimestamp
|
||||
latestTimestamp
|
||||
oldestTimestamp
|
||||
}
|
||||
... on SingleAction {
|
||||
actionType
|
||||
processedAtTimestamp
|
||||
timestamp
|
||||
}
|
||||
}
|
||||
latestProcessedAtTimestamp
|
||||
latestTimestamp
|
||||
objectType
|
||||
uid
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct RecordObjectActionVariables {
|
||||
pub input: RecordObjectActionInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "RecordObjectActionVariables"
|
||||
)]
|
||||
pub struct RecordObjectAction {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub record_object_action: RecordObjectActionResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
record_object_action(RecordObjectActionVariables) -> RecordObjectAction;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RecordObjectActionOutput {
|
||||
pub history: ObjectActionHistory,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RecordObjectActionResult {
|
||||
RecordObjectActionOutput(RecordObjectActionOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RecordObjectActionInput {
|
||||
pub action: ActionType,
|
||||
pub json_data: Option<String>,
|
||||
pub timestamp: Time,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object_permissions::ObjectPermissions, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct RemoveObjectGuestVariables {
|
||||
pub input: RemoveObjectGuestInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "RemoveObjectGuestVariables"
|
||||
)]
|
||||
pub struct RemoveObjectGuest {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub remove_object_guest: RemoveObjectGuestResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
remove_object_guest(RemoveObjectGuestVariables) -> RemoveObjectGuest;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RemoveObjectGuestOutput {
|
||||
pub object_permissions: ObjectPermissions,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RemoveObjectGuestResult {
|
||||
RemoveObjectGuestOutput(RemoveObjectGuestOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RemoveObjectGuestInput {
|
||||
/// Email of the user or pending user to remove. One of email or team_uid must be provided.
|
||||
pub email: Option<String>,
|
||||
pub object_uid: cynic::Id,
|
||||
/// UID of the team to remove. One of email or team_uid must be provided.
|
||||
pub team_uid: Option<cynic::Id>,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct RemoveObjectLinkPermissionsVariables {
|
||||
pub input: RemoveObjectLinkPermissionsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "RemoveObjectLinkPermissionsVariables"
|
||||
)]
|
||||
pub struct RemoveObjectLinkPermissions {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub remove_object_link_permissions: RemoveObjectLinkPermissionsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
remove_object_link_permissions(RemoveObjectLinkPermissionsVariables) -> RemoveObjectLinkPermissions;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RemoveObjectLinkPermissionsOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RemoveObjectLinkPermissionsResult {
|
||||
RemoveObjectLinkPermissionsOutput(RemoveObjectLinkPermissionsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RemoveObjectLinkPermissionsInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::CloudObjectEventEntrypoint, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation RemoveUserFromTeam($input: RemoveUserFromTeamInput!, $requestContext: RequestContext!) {
|
||||
removeUserFromTeam(input: $input, requestContext: $requestContext) {
|
||||
... on RemoveUserFromTeamOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct RemoveUserFromTeamVariables {
|
||||
pub input: RemoveUserFromTeamInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "RemoveUserFromTeamVariables"
|
||||
)]
|
||||
pub struct RemoveUserFromTeam {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub remove_user_from_team: RemoveUserFromTeamResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
remove_user_from_team(RemoveUserFromTeamVariables) -> RemoveUserFromTeam;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RemoveUserFromTeamOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RemoveUserFromTeamResult {
|
||||
RemoveUserFromTeamOutput(RemoveUserFromTeamOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RemoveUserFromTeamInput {
|
||||
pub entrypoint: CloudObjectEventEntrypoint,
|
||||
pub team_uid: cynic::Id,
|
||||
pub user_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation RenameTeam($input: RenameTeamInput!, $requestContext: RequestContext!) {
|
||||
renameTeam(input: $input, requestContext: $requestContext) {
|
||||
... on RenameTeamOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct RenameTeamVariables {
|
||||
pub input: RenameTeamInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "RenameTeamVariables")]
|
||||
pub struct RenameTeam {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub rename_team: RenameTeamResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
rename_team(RenameTeamVariables) -> RenameTeam;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RenameTeamOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RenameTeamResult {
|
||||
RenameTeamOutput(RenameTeamOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RenameTeamInput {
|
||||
pub new_name: String,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation ProvideNegativeFeedbackResponseForAiConversation
|
||||
($input: ProvideNegativeFeedbackResponseForAiConversationInput!, $requestContext: RequestContext!) {
|
||||
provideNegativeFeedbackResponseForAiConversation(input: $input, requestContext: $requestContext) {
|
||||
... on RequestsRefundedOutput {
|
||||
requestsRefunded
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct ProvideNegativeFeedbackResponseForAiConversationInput {
|
||||
pub conversation_id: cynic::Id,
|
||||
pub request_ids: Vec<cynic::Id>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ProvideNegativeFeedbackResponseForAiConversationVariables {
|
||||
pub input: ProvideNegativeFeedbackResponseForAiConversationInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "ProvideNegativeFeedbackResponseForAiConversationVariables"
|
||||
)]
|
||||
pub struct ProvideNegativeFeedbackResponseForAiConversation {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub provide_negative_feedback_response_for_ai_conversation: RequestsRefundedResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
provide_negative_feedback_response_for_ai_conversation(ProvideNegativeFeedbackResponseForAiConversationVariables) -> ProvideNegativeFeedbackResponseForAiConversation;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum RequestsRefundedResult {
|
||||
RequestsRefundedOutput(RequestsRefundedOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RequestsRefundedOutput {
|
||||
pub requests_refunded: i32,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation ResetInviteLinks($input: ResetInviteLinksInput!, $requestContext: RequestContext!) {
|
||||
resetInviteLinks(input: $input, requestContext: $requestContext) {
|
||||
... on ResetInviteLinksOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ResetInviteLinksVariables {
|
||||
pub input: ResetInviteLinksInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "ResetInviteLinksVariables")]
|
||||
pub struct ResetInviteLinks {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub reset_invite_links: ResetInviteLinksResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
reset_invite_links(ResetInviteLinksVariables) -> ResetInviteLinks;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ResetInviteLinksOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ResetInviteLinksResult {
|
||||
ResetInviteLinksOutput(ResetInviteLinksOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct ResetInviteLinksInput {
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SendReferralInviteEmails($input: SendReferralInviteEmailsInput!, $requestContext: RequestContext!) {
|
||||
sendReferralInviteEmails(input: $input, requestContext: $requestContext) {
|
||||
... on SendReferralInviteEmailsOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
successfulEmails
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SendReferralInviteEmailsVariables {
|
||||
pub input: SendReferralInviteEmailsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SendReferralInviteEmailsInput {
|
||||
pub emails: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SendReferralInviteEmailsVariables"
|
||||
)]
|
||||
pub struct SendReferralInviteEmails {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub send_referral_invite_emails: SendReferralInviteEmailsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
send_referral_invite_emails(SendReferralInviteEmailsVariables) -> SendReferralInviteEmails;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SendReferralInviteEmailsOutput {
|
||||
pub successful_emails: Vec<String>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SendReferralInviteEmailsResult {
|
||||
SendReferralInviteEmailsOutput(SendReferralInviteEmailsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SendTeamInviteEmail($input: SendTeamInviteEmailInput!, $requestContext: RequestContext!) {
|
||||
sendTeamInviteEmail(input: $input, requestContext: $requestContext) {
|
||||
... on SendTeamInviteEmailOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SendTeamInviteEmailVariables {
|
||||
pub input: SendTeamInviteEmailInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SendTeamInviteEmailOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SendTeamInviteEmailVariables"
|
||||
)]
|
||||
pub struct SendTeamInviteEmail {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub send_team_invite_email: SendTeamInviteEmailResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
send_team_invite_email(SendTeamInviteEmailVariables) -> SendTeamInviteEmail;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SendTeamInviteEmailResult {
|
||||
SendTeamInviteEmailOutput(SendTeamInviteEmailOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SendTeamInviteEmailInput {
|
||||
pub email: String,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SetIsInviteLinkEnabled($input: SetIsInviteLinkEnabledInput!, $requestContext: RequestContext!) {
|
||||
setIsInviteLinkEnabled(input: $input, requestContext: $requestContext) {
|
||||
... on SetIsInviteLinkEnabledOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SetIsInviteLinkEnabledVariables {
|
||||
pub input: SetIsInviteLinkEnabledInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SetIsInviteLinkEnabledOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SetIsInviteLinkEnabledVariables"
|
||||
)]
|
||||
pub struct SetIsInviteLinkEnabled {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub set_is_invite_link_enabled: SetIsInviteLinkEnabledResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
set_is_invite_link_enabled(SetIsInviteLinkEnabledVariables) -> SetIsInviteLinkEnabled;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SetIsInviteLinkEnabledResult {
|
||||
SetIsInviteLinkEnabledOutput(SetIsInviteLinkEnabledOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SetIsInviteLinkEnabledInput {
|
||||
pub new_value: bool,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object_permissions::AccessLevel, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SetObjectLinkPermissionsVariables {
|
||||
pub input: SetObjectLinkPermissionsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SetObjectLinkPermissionsOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SetObjectLinkPermissionsVariables"
|
||||
)]
|
||||
pub struct SetObjectLinkPermissions {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub set_object_link_permissions: SetObjectLinkPermissionsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
set_object_link_permissions(SetObjectLinkPermissionsVariables) -> SetObjectLinkPermissions;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SetObjectLinkPermissionsResult {
|
||||
SetObjectLinkPermissionsOutput(SetObjectLinkPermissionsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SetObjectLinkPermissionsInput {
|
||||
pub access_level: AccessLevel,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SetTeamDiscoverability($input: SetTeamDiscoverabilityInput!, $requestContext: RequestContext!) {
|
||||
setTeamDiscoverability(input: $input, requestContext: $requestContext) {
|
||||
... on SetTeamDiscoverabilityOutput {
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SetTeamDiscoverabilityVariables {
|
||||
pub input: SetTeamDiscoverabilityInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SetTeamDiscoverabilityOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SetTeamDiscoverabilityVariables"
|
||||
)]
|
||||
pub struct SetTeamDiscoverability {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub set_team_discoverability: SetTeamDiscoverabilityResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
set_team_discoverability(SetTeamDiscoverabilityVariables) -> SetTeamDiscoverability;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SetTeamDiscoverabilityResult {
|
||||
SetTeamDiscoverabilityOutput(SetTeamDiscoverabilityOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SetTeamDiscoverabilityInput {
|
||||
pub discoverable: bool,
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema, workspace::MembershipRole,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SetTeamMemberRole($input: SetTeamMemberRoleInput!, $requestContext: RequestContext!) {
|
||||
setTeamMemberRole(input: $input, requestContext: $requestContext) {
|
||||
... on SetTeamMemberRoleOutput {
|
||||
__typename
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
__typename
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
error {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SetTeamMemberRoleInput {
|
||||
pub role: MembershipRole,
|
||||
pub team_uid: cynic::Id,
|
||||
pub user_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SetTeamMemberRoleVariables {
|
||||
pub input: SetTeamMemberRoleInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SetTeamMemberRoleOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SetTeamMemberRoleVariables"
|
||||
)]
|
||||
pub struct SetTeamMemberRole {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub set_team_member_role: SetTeamMemberRoleResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
set_team_member_role(SetTeamMemberRoleVariables) -> SetTeamMemberRole;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SetTeamMemberRoleResult {
|
||||
SetTeamMemberRoleOutput(SetTeamMemberRoleOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation SetUserIsOnboarded($requestContext: RequestContext!) {
|
||||
setUserIsOnboarded(requestContext: $requestContext) {
|
||||
... on SetUserIsOnboardedOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "SetUserIsOnboardedVariables"
|
||||
)]
|
||||
pub struct SetUserIsOnboarded {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub set_user_is_onboarded: SetUserIsOnboardedResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
set_user_is_onboarded(SetUserIsOnboardedVariables) -> SetUserIsOnboarded;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct SetUserIsOnboardedVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SetUserIsOnboardedOutput {
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum SetUserIsOnboardedResult {
|
||||
SetUserIsOnboardedOutput(SetUserIsOnboardedOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ShareBlockVariables<'a> {
|
||||
pub block: BlockInput<'a>,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ShareBlockOutput {
|
||||
pub url_ending: String,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "ShareBlockVariables")]
|
||||
pub struct ShareBlock {
|
||||
#[arguments(input: { block: $block }, requestContext: $request_context)]
|
||||
pub share_block: ShareBlockResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
['a] share_block(ShareBlockVariables<'a>) -> ShareBlock;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ShareBlockResult {
|
||||
ShareBlockOutput(ShareBlockOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum DisplaySetting {
|
||||
Command,
|
||||
CommandAndOutput,
|
||||
Output,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct BlockInput<'a> {
|
||||
pub command: Option<&'a str>,
|
||||
pub embed_display_setting: DisplaySetting,
|
||||
pub output: Option<&'a str>,
|
||||
pub show_prompt: bool,
|
||||
pub stylized_command: Option<&'a str>,
|
||||
pub stylized_output: Option<&'a str>,
|
||||
pub stylized_prompt: Option<&'a str>,
|
||||
pub stylized_prompt_and_command: Option<&'a str>,
|
||||
pub time_started_term: Option<Time>,
|
||||
pub title: Option<&'a str>,
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation stripeBillingPortal($input: StripeBillingPortalInput!, $requestContext: RequestContext!) {
|
||||
stripeBillingPortal(input: $input, requestContext: $requestContext) {
|
||||
... on StripeBillingPortalOutput {
|
||||
__typename
|
||||
url
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
__typename
|
||||
error
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct StripeBillingPortalVariables {
|
||||
pub input: StripeBillingPortalInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct StripeBillingPortalInput {
|
||||
pub team_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "StripeBillingPortalVariables"
|
||||
)]
|
||||
pub struct StripeBillingPortal {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub stripe_billing_portal: StripeBillingPortalResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
stripe_billing_portal(StripeBillingPortalVariables) -> StripeBillingPortal;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct StripeBillingPortalOutput {
|
||||
pub url: String,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum StripeBillingPortalResult {
|
||||
StripeBillingPortalOutput(StripeBillingPortalOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectMetadata, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct TransferGenericStringObjectOwnerVariables {
|
||||
pub input: TransferGenericStringObjectOwnerInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct TransferGenericStringObjectOwnerOutput {
|
||||
pub metadata: ObjectMetadata,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "TransferGenericStringObjectOwnerVariables"
|
||||
)]
|
||||
pub struct TransferGenericStringObjectOwner {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub transfer_generic_string_object_owner: TransferGenericStringObjectOwnerResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
transfer_generic_string_object_owner(TransferGenericStringObjectOwnerVariables) -> TransferGenericStringObjectOwner;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum TransferGenericStringObjectOwnerResult {
|
||||
TransferGenericStringObjectOwnerOutput(TransferGenericStringObjectOwnerOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TransferGenericStringObjectOwnerInput {
|
||||
pub owner: Owner,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectMetadata, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct TransferNotebookOwnerVariables {
|
||||
pub input: TransferNotebookOwnerInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct TransferNotebookOwnerOutput {
|
||||
pub metadata: ObjectMetadata,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "TransferNotebookOwnerVariables"
|
||||
)]
|
||||
pub struct TransferNotebookOwner {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub transfer_notebook_owner: TransferNotebookOwnerResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
transfer_notebook_owner(TransferNotebookOwnerVariables) -> TransferNotebookOwner;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum TransferNotebookOwnerResult {
|
||||
TransferNotebookOwnerOutput(TransferNotebookOwnerOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TransferNotebookOwnerInput {
|
||||
pub owner: Owner,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation TransferTeamOwnership($input: TransferTeamOwnershipInput!, $requestContext: RequestContext!) {
|
||||
transferTeamOwnership(input: $input, requestContext: $requestContext) {
|
||||
... on TransferTeamOwnershipOutput {
|
||||
__typename
|
||||
success
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
__typename
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
error {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TransferTeamOwnershipInput {
|
||||
pub new_owner_email: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct TransferTeamOwnershipVariables {
|
||||
pub input: TransferTeamOwnershipInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct TransferTeamOwnershipOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "TransferTeamOwnershipVariables"
|
||||
)]
|
||||
pub struct TransferTeamOwnership {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub transfer_team_ownership: TransferTeamOwnershipResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
transfer_team_ownership(TransferTeamOwnershipVariables) -> TransferTeamOwnership;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum TransferTeamOwnershipResult {
|
||||
TransferTeamOwnershipOutput(TransferTeamOwnershipOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectMetadata, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct TransferWorkflowOwnerVariables {
|
||||
pub input: TransferWorkflowOwnerInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct TransferWorkflowOwnerOutput {
|
||||
pub metadata: ObjectMetadata,
|
||||
pub response_context: ResponseContext,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "TransferWorkflowOwnerVariables"
|
||||
)]
|
||||
pub struct TransferWorkflowOwner {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub transfer_workflow_owner: TransferWorkflowOwnerResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
transfer_workflow_owner(TransferWorkflowOwnerVariables) -> TransferWorkflowOwner;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum TransferWorkflowOwnerResult {
|
||||
TransferWorkflowOwnerOutput(TransferWorkflowOwnerOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TransferWorkflowOwnerInput {
|
||||
pub owner: Owner,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct TrashObjectVariables {
|
||||
pub input: TrashObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct TrashObjectOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "TrashObjectVariables")]
|
||||
pub struct TrashObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub trash_object: TrashObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
trash_object(TrashObjectVariables) -> TrashObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum TrashObjectResult {
|
||||
TrashObjectOutput(TrashObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct TrashObjectInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UnshareBlockVariables {
|
||||
pub input: UnshareBlockInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UnshareBlockOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UnshareBlockVariables")]
|
||||
pub struct UnshareBlock {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub unshare_block: UnshareBlockResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
unshare_block(UnshareBlockVariables) -> UnshareBlock;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UnshareBlockResult {
|
||||
UnshareBlockOutput(UnshareBlockOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UnshareBlockInput {
|
||||
pub block_uid: String,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectMetadata, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UntrashObjectVariables {
|
||||
pub input: UntrashObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UntrashObjectOutput {
|
||||
pub success: bool,
|
||||
pub response_context: ResponseContext,
|
||||
pub metadata: ObjectMetadata,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UntrashObjectVariables")]
|
||||
pub struct UntrashObject {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub untrash_object: UntrashObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
untrash_object(UntrashObjectVariables) -> UntrashObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UntrashObjectResult {
|
||||
UntrashObjectOutput(UntrashObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UntrashObjectInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
use crate::{
|
||||
ai::{AgentTaskState, PlatformErrorCode},
|
||||
error::UserFacingError,
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateAgentTaskVariables {
|
||||
pub input: UpdateAgentTaskInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateAgentTaskInput {
|
||||
pub task_id: cynic::Id,
|
||||
|
||||
// Important: for our server-side changeset logic to work, any fields which we aren't trying to
|
||||
// update must be omitted, NOT set to null.
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub task_state: Option<AgentTaskState>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub session_id: Option<cynic::Id>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub conversation_id: Option<cynic::Id>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub status_message: Option<AgentTaskStatusMessageInput>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct AgentTaskStatusMessageInput {
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub error_code: Option<PlatformErrorCode>,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UpdateAgentTaskVariables")]
|
||||
pub struct UpdateAgentTask {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_agent_task: UpdateAgentTaskResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
update_agent_task(UpdateAgentTaskVariables) -> UpdateAgentTask;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateAgentTaskResult {
|
||||
UpdateAgentTaskOutput(UpdateAgentTaskOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateAgentTaskOutput {
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectUpdateSuccess, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation UpdateFolder($input: UpdateFolderInput!, $requestContext: RequestContext!) {
|
||||
updateFolder(input: $input, requestContext: $requestContext) {
|
||||
... on UpdateFolderOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
update {
|
||||
lastEditorUid
|
||||
revisionTs
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateFolderVariables {
|
||||
pub input: UpdateFolderInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateFolderOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub update: ObjectUpdateSuccess,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UpdateFolderVariables")]
|
||||
pub struct UpdateFolder {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_folder: UpdateFolderResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_folder(UpdateFolderVariables) -> UpdateFolder;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateFolderResult {
|
||||
UpdateFolderOutput(UpdateFolderOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateFolderInput {
|
||||
pub name: String,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, generic_string_object::GenericStringObject,
|
||||
object::ObjectUpdateSuccess, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateGenericStringObjectVariables {
|
||||
pub input: UpdateGenericStringObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateGenericStringObjectOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub update: GenericStringObjectUpdate,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateGenericStringObjectVariables"
|
||||
)]
|
||||
pub struct UpdateGenericStringObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_generic_string_object: UpdateGenericStringObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_generic_string_object(UpdateGenericStringObjectVariables) -> UpdateGenericStringObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GenericStringObjectUpdateRejected {
|
||||
pub conflicting_generic_string_object: GenericStringObject,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum GenericStringObjectUpdate {
|
||||
GenericStringObjectUpdateRejected(GenericStringObjectUpdateRejected),
|
||||
ObjectUpdateSuccess(ObjectUpdateSuccess),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum UpdateGenericStringObjectResult {
|
||||
UpdateGenericStringObjectOutput(UpdateGenericStringObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateGenericStringObjectInput {
|
||||
pub revision_ts: Option<Time>,
|
||||
pub serialized_model: String,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
use crate::{
|
||||
error::UserFacingError, managed_secrets::ManagedSecret, object_permissions::Owner,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateManagedSecretVariables {
|
||||
pub input: UpdateManagedSecretInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateManagedSecretVariables"
|
||||
)]
|
||||
pub struct UpdateManagedSecret {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_managed_secret: UpdateManagedSecretResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
update_managed_secret(UpdateManagedSecretVariables) -> UpdateManagedSecret;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateManagedSecretOutput {
|
||||
pub managed_secret: ManagedSecret,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateManagedSecretResult {
|
||||
UpdateManagedSecretOutput(UpdateManagedSecretOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateManagedSecretInput {
|
||||
pub owner: Owner,
|
||||
pub name: String,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub encrypted_value: Option<String>,
|
||||
#[cynic(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
full_source_code_embedding::{EmbeddingConfig, NodeHash},
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateMerkleTreeVariables {
|
||||
pub input: UpdateMerkleTreeInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateMerkleTreeInput {
|
||||
pub embedding_config: EmbeddingConfig,
|
||||
pub nodes: Vec<MerkleTreeNode>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct MerkleTreeNode {
|
||||
pub hash: NodeHash,
|
||||
pub children: Vec<NodeHash>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UpdateMerkleTreeVariables")]
|
||||
pub struct UpdateMerkleTree {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_merkle_tree: UpdateMerkleTreeResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_merkle_tree(UpdateMerkleTreeVariables) -> UpdateMerkleTree;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateMerkleTreeError {
|
||||
pub error: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateMerkleTreeOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub results: Vec<UpdateMerkleTreeNodeResult>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateMerkleTreeNodeResult {
|
||||
pub hash: NodeHash,
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateMerkleTreeResult {
|
||||
UpdateMerkleTreeOutput(UpdateMerkleTreeOutput),
|
||||
UpdateMerkleTreeError(UpdateMerkleTreeError),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, notebook::Notebook, object::ObjectUpdateSuccess,
|
||||
request_context::RequestContext, response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateNotebookVariables {
|
||||
pub input: UpdateNotebookInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateNotebookOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub update: NotebookUpdate,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UpdateNotebookVariables")]
|
||||
pub struct UpdateNotebook {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_notebook: UpdateNotebookResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_notebook(UpdateNotebookVariables) -> UpdateNotebook;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct NotebookUpdateRejected {
|
||||
pub conflicting_notebook: Notebook,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum NotebookUpdate {
|
||||
NotebookUpdateRejected(NotebookUpdateRejected),
|
||||
ObjectUpdateSuccess(ObjectUpdateSuccess),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum UpdateNotebookResult {
|
||||
UpdateNotebookOutput(UpdateNotebookOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateNotebookInput {
|
||||
pub data: Option<String>,
|
||||
pub revision_ts: Option<Time>,
|
||||
pub title: Option<String>,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
object_permissions::{AccessLevel, ObjectPermissions},
|
||||
request_context::RequestContext,
|
||||
response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateObjectGuestsVariables {
|
||||
pub input: UpdateObjectGuestsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateObjectGuestsOutput {
|
||||
pub object_permissions: ObjectPermissions,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateObjectGuestsVariables"
|
||||
)]
|
||||
pub struct UpdateObjectGuests {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_object_guests: UpdateObjectGuestsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_object_guests(UpdateObjectGuestsVariables) -> UpdateObjectGuests;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateObjectGuestsResult {
|
||||
UpdateObjectGuestsOutput(UpdateObjectGuestsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateObjectGuestsInput {
|
||||
pub access_level: AccessLevel,
|
||||
pub emails: Option<Vec<String>>,
|
||||
pub object_uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation updateOnboardingSurveyStatus($input: UpdateOnboardingSurveyStatusInput!, $clientContext: ClientContext!, $osContext: OSContext!) {
|
||||
updateOnboardingSurveyStatus(
|
||||
input: $input
|
||||
requestContext: {clientContext: $clientContext, osContext: $osContext}
|
||||
) {
|
||||
... on UpdateOnboardingSurveyStatusOutput {
|
||||
status
|
||||
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateOnboardingSurveyStatusVariables {
|
||||
pub input: UpdateOnboardingSurveyStatusInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateOnboardingSurveyStatusOutput {
|
||||
pub status: OnboardingSurveyStatus,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateOnboardingSurveyStatusVariables"
|
||||
)]
|
||||
pub struct UpdateOnboardingSurveyStatus {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_onboarding_survey_status: UpdateOnboardingSurveyStatusResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateOnboardingSurveyStatusResult {
|
||||
UpdateOnboardingSurveyStatusOutput(UpdateOnboardingSurveyStatusOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum AcquisitionChannelSurveyResponse {
|
||||
Friend,
|
||||
Internet,
|
||||
InTheWild,
|
||||
Teammate,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum OnboardingSurveyStatus {
|
||||
Completed,
|
||||
Shown,
|
||||
Skipped,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum RoleSurveyResponse {
|
||||
BackendEngineer,
|
||||
BusinessAnalyst,
|
||||
Data,
|
||||
DevopsSre,
|
||||
EngineeringManager,
|
||||
FrontendEngineer,
|
||||
FullstackEngineer,
|
||||
Marketer,
|
||||
MobileEngineer,
|
||||
Other,
|
||||
ProductDesigner,
|
||||
ProductManager,
|
||||
SalesBusinessDev,
|
||||
Student,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum UsagePlanSurveyResponse {
|
||||
AiCodeProduction,
|
||||
AiPersonalProjects,
|
||||
ExploringTool,
|
||||
Other,
|
||||
ReplaceTerminal,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateOnboardingSurveyStatusInput {
|
||||
pub responses: Option<SurveyResponsesInput>,
|
||||
pub status: OnboardingSurveyStatus,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct SurveyResponsesInput {
|
||||
#[cynic(rename = "ACQUISITION_CHANNEL")]
|
||||
pub acquisition_channel: Option<AcquisitionChannelQuestionResponseInput>,
|
||||
#[cynic(rename = "ROLE")]
|
||||
pub role: Option<RoleQuestionResponseInput>,
|
||||
#[cynic(rename = "USAGE_PLAN")]
|
||||
pub usage_plan: Option<UsagePlanQuestionResponseInput>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct AcquisitionChannelQuestionResponseInput {
|
||||
pub answer: AcquisitionChannelSurveyResponse,
|
||||
pub details: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct RoleQuestionResponseInput {
|
||||
pub answer: RoleSurveyResponse,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UsagePlanQuestionResponseInput {
|
||||
pub answer: UsagePlanSurveyResponse,
|
||||
pub details: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
mutation UpdateUserSettings($input: UpdateUserSettingsInput!, $requestContext: RequestContext!) {
|
||||
updateUserSettings(input: $input, requestContext: $requestContext) {
|
||||
... on UpdateUserSettingsOutput {
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
responseContext {
|
||||
serverVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateUserSettingsVariables"
|
||||
)]
|
||||
pub struct UpdateUserSettings {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_user_settings: UpdateUserSettingsResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
update_user_settings(UpdateUserSettingsVariables) -> UpdateUserSettings;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateUserSettingsVariables {
|
||||
pub input: UpdateUserSettingsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug, Default)]
|
||||
pub struct UpdateUserSettingsInput {
|
||||
pub cloud_conversation_storage_enabled: Option<bool>,
|
||||
pub crash_reporting_enabled: Option<bool>,
|
||||
pub telemetry_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateUserSettingsOutput {
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateUserSettingsResult {
|
||||
UpdateUserSettingsOutput(UpdateUserSettingsOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
use crate::scalars::Time;
|
||||
use crate::{
|
||||
error::UserFacingError, object::ObjectUpdateSuccess, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema, workflow::Workflow,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateWorkflowVariables {
|
||||
pub input: UpdateWorkflowInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct WorkflowUpdateRejected {
|
||||
pub conflicting_workflow: Workflow,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateWorkflowOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub update: WorkflowUpdate,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootMutation", variables = "UpdateWorkflowVariables")]
|
||||
pub struct UpdateWorkflow {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_workflow: UpdateWorkflowResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_workflow(UpdateWorkflowVariables) -> UpdateWorkflow;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum UpdateWorkflowResult {
|
||||
UpdateWorkflowOutput(UpdateWorkflowOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum WorkflowUpdate {
|
||||
ObjectUpdateSuccess(ObjectUpdateSuccess),
|
||||
WorkflowUpdateRejected(WorkflowUpdateRejected),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateWorkflowInput {
|
||||
pub data: String,
|
||||
pub revision_ts: Option<Time>,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
schema, workspace::WorkspaceSettings,
|
||||
};
|
||||
|
||||
// Note that `isInviteLinkEnabled` and `IsDiscoverable` aren't fetchable from this mutation;
|
||||
// they don't come from the same code path as fetching org settings. We could change this
|
||||
// but it's not something the server will populate at the moment.
|
||||
|
||||
/*
|
||||
mutation UpdateWorkspaceSettings($input: UpdateWorkspaceSettingsInput!, $requestContext: RequestContext!) {
|
||||
updateWorkspaceSettings(requestContext: $requestContext, input: $input) {
|
||||
... on UpdateWorkspaceSettingsOutput {
|
||||
workspaceSettings {
|
||||
llmSettings {
|
||||
enabled
|
||||
}
|
||||
telemetrySettings {
|
||||
forceEnabled
|
||||
}
|
||||
ugcCollectionSettings {
|
||||
setting
|
||||
}
|
||||
linkSharingSettings {
|
||||
anyoneWithLinkSharingEnabled
|
||||
directLinkSharingEnabled
|
||||
}
|
||||
secretRedactionSettings {
|
||||
enabled
|
||||
regexList
|
||||
}
|
||||
aiPermissionsSettings {
|
||||
allowAiInRemoteSessions
|
||||
remoteSessionRegexList
|
||||
}
|
||||
aiAutonomySettings {
|
||||
applyCodeDiffsSetting
|
||||
readFilesSetting
|
||||
readFilesAllowlist
|
||||
createPlansSetting
|
||||
executeCommandsSetting
|
||||
executeCommandsAllowlist
|
||||
executeCommandsDenylist
|
||||
writeToPtySetting
|
||||
}
|
||||
usageBasedPricingSettings {
|
||||
enabled
|
||||
maxMonthlySpendCents
|
||||
}
|
||||
addonCreditsSettings {
|
||||
autoReloadEnabled
|
||||
maxMonthlySpendCents
|
||||
selectedAutoReloadCreditDenomination
|
||||
}
|
||||
codebaseContextSettings {
|
||||
enabled
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootMutation",
|
||||
variables = "UpdateWorkspaceSettingsVariables"
|
||||
)]
|
||||
pub struct UpdateWorkspaceSettings {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub update_workspace_settings: UpdateWorkspaceSettingsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
update_workspace_settings(UpdateWorkspaceSettingsVariables) -> UpdateWorkspaceSettings;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct UpdateWorkspaceSettingsVariables {
|
||||
pub input: UpdateWorkspaceSettingsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateWorkspaceSettingsInput {
|
||||
pub workspace_uid: String,
|
||||
pub set_usage_based_pricing_settings: Option<UsageBasedPricingSettingsInput>,
|
||||
pub set_addon_credits_settings: Option<AddonCreditsSettingsInput>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UsageBasedPricingSettingsInput {
|
||||
pub enabled: Option<bool>,
|
||||
pub max_monthly_spend_cents: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct AddonCreditsSettingsInput {
|
||||
pub auto_reload_enabled: Option<bool>,
|
||||
pub max_monthly_spend_cents: Option<i32>,
|
||||
pub selected_auto_reload_credit_denomination: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateWorkspaceSettingsOutput {
|
||||
pub response_context: ResponseContext,
|
||||
pub workspace_settings: WorkspaceSettings,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateWorkspaceSettingsResult {
|
||||
UpdateWorkspaceSettingsOutput(Box<UpdateWorkspaceSettingsOutput>),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
use super::{
|
||||
error::UserFacingError, object::ObjectMetadata, object_permissions::ObjectPermissions,
|
||||
response_context::ResponseContext,
|
||||
};
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct Notebook {
|
||||
pub data: String,
|
||||
pub title: String,
|
||||
pub ai_document_id: Option<String>,
|
||||
pub metadata: ObjectMetadata,
|
||||
pub permissions: ObjectPermissions,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct UpdateNotebookEditAccessInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UpdateNotebookEditAccessOutput {
|
||||
pub accepted: bool,
|
||||
pub metadata: ObjectMetadata,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UpdateNotebookEditAccessResult {
|
||||
UpdateNotebookEditAccessOutput(UpdateNotebookEditAccessOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
use crate::{
|
||||
ai::AIConversation,
|
||||
folder::{Folder, FolderWithDescendants},
|
||||
generic_string_object::GenericStringObject,
|
||||
notebook::Notebook,
|
||||
scalars::Time,
|
||||
schema,
|
||||
workflow::Workflow,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ObjectMetadata {
|
||||
pub creator_uid: Option<cynic::Id>,
|
||||
pub current_editor_uid: Option<cynic::Id>,
|
||||
pub is_welcome_object: bool,
|
||||
pub last_editor_uid: Option<cynic::Id>,
|
||||
pub metadata_last_updated_ts: Time,
|
||||
pub parent: Container,
|
||||
pub revision_ts: Time,
|
||||
pub trashed_ts: Option<Time>,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum ObjectType {
|
||||
#[cynic(rename = "AIConversation")]
|
||||
AIConversation,
|
||||
#[cynic(rename = "Folder")]
|
||||
Folder,
|
||||
#[cynic(rename = "GenericStringObject")]
|
||||
GenericStringObject,
|
||||
#[cynic(rename = "Notebook")]
|
||||
Notebook,
|
||||
#[cynic(rename = "Workflow")]
|
||||
Workflow,
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ObjectUpdateSuccess {
|
||||
pub last_editor_uid: cynic::Id,
|
||||
pub revision_ts: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug, Clone)]
|
||||
pub enum CloudObject {
|
||||
AIConversation(AIConversation),
|
||||
Folder(Folder),
|
||||
GenericStringObject(GenericStringObject),
|
||||
Notebook(Notebook),
|
||||
Workflow(Workflow),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug, Clone)]
|
||||
pub enum CloudObjectWithDescendants {
|
||||
AIConversation(AIConversation),
|
||||
FolderWithDescendants(FolderWithDescendants),
|
||||
GenericStringObject(GenericStringObject),
|
||||
Notebook(Notebook),
|
||||
Workflow(Workflow),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum CloudObjectEventEntrypoint {
|
||||
#[cynic(rename = "Blocklist")]
|
||||
Blocklist,
|
||||
#[cynic(rename = "DriveIndex")]
|
||||
DriveIndex,
|
||||
#[cynic(rename = "ImportModal")]
|
||||
ImportModal,
|
||||
#[cynic(rename = "Onboarding")]
|
||||
Onboarding,
|
||||
#[cynic(rename = "ResourceCenter")]
|
||||
ResourceCenter,
|
||||
#[cynic(rename = "TeamSettings")]
|
||||
TeamSettings,
|
||||
#[cynic(rename = "UniversalSearch")]
|
||||
UniversalSearch,
|
||||
#[cynic(rename = "Unknown")]
|
||||
Unknown,
|
||||
#[cynic(rename = "UpgradePage")]
|
||||
UpgradePage,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct Space {
|
||||
pub uid: cynic::Id,
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: SpaceType,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum SpaceType {
|
||||
#[cynic(rename = "Team")]
|
||||
Team,
|
||||
#[cynic(rename = "User")]
|
||||
User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct FolderContainer {
|
||||
pub folder_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug, Clone)]
|
||||
pub enum Container {
|
||||
FolderContainer(FolderContainer),
|
||||
Space(Space),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
use super::object::ObjectType;
|
||||
use crate::scalars::Time;
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum ActionType {
|
||||
Executed,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ObjectActionHistory {
|
||||
pub actions: Option<Vec<ActionRecord>>,
|
||||
pub latest_processed_at_timestamp: Option<Time>,
|
||||
pub latest_timestamp: Option<Time>,
|
||||
pub object_type: ObjectType,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct BundledActions {
|
||||
pub action_type: ActionType,
|
||||
pub count: i32,
|
||||
pub latest_processed_at_timestamp: Time,
|
||||
pub latest_timestamp: Time,
|
||||
pub oldest_timestamp: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct SingleAction {
|
||||
pub action_type: ActionType,
|
||||
pub processed_at_timestamp: Time,
|
||||
pub timestamp: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ActionRecord {
|
||||
BundledActions(BundledActions),
|
||||
SingleAction(SingleAction),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
use super::object::{Container, Space};
|
||||
use crate::scalars::Time;
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ObjectPermissions {
|
||||
pub guests: Vec<ObjectGuest>,
|
||||
pub last_updated_ts: Time,
|
||||
pub anyone_link_sharing: Option<LinkSharing>,
|
||||
pub space: Space,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ObjectGuest {
|
||||
pub access_level: AccessLevel,
|
||||
pub source: Option<Container>,
|
||||
pub subject: GuestSubject,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct Owner {
|
||||
pub uid: Option<cynic::Id>,
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: OwnerType,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum OwnerType {
|
||||
#[cynic(rename = "Team")]
|
||||
Team,
|
||||
#[cynic(rename = "User")]
|
||||
User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct UserGuest {
|
||||
pub firebase_uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct PendingUserGuest {
|
||||
pub email: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct TeamGuest {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug, Clone)]
|
||||
pub enum GuestSubject {
|
||||
UserGuest(UserGuest),
|
||||
PendingUserGuest(PendingUserGuest),
|
||||
TeamGuest(TeamGuest),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug, PartialEq)]
|
||||
pub enum AccessLevel {
|
||||
#[cynic(rename = "Editor")]
|
||||
Editor,
|
||||
#[cynic(rename = "Full")]
|
||||
Full,
|
||||
#[cynic(rename = "Viewer")]
|
||||
Viewer,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct LinkSharing {
|
||||
pub access_level: AccessLevel,
|
||||
pub source: Option<Container>,
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
use crate::{
|
||||
api::object_permissions::OwnerType, error::UserFacingError, request_context::RequestContext,
|
||||
response_context::ResponseContext, scalars::Time, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct ApiKeysVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "APIKeyPropertiesOutput")]
|
||||
pub struct ApiKeyPropertiesOutput {
|
||||
pub api_keys: Vec<ApiKeyProperties>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "APIKeyProperties")]
|
||||
pub struct ApiKeyProperties {
|
||||
pub uid: cynic::Id,
|
||||
pub name: String,
|
||||
pub key_suffix: String,
|
||||
pub owner_type: OwnerType,
|
||||
pub expires_at: Option<Time>,
|
||||
pub last_used_at: Option<Time>,
|
||||
pub created_at: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[cynic(graphql_type = "APIKeyPropertiesResult")]
|
||||
pub enum ApiKeyPropertiesResult {
|
||||
ApiKeyPropertiesOutput(ApiKeyPropertiesOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "ApiKeysVariables")]
|
||||
pub struct ApiKeys {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub api_keys: ApiKeyPropertiesResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
api_keys(ApiKeysVariables) -> ApiKeys;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
use crate::{
|
||||
error::UserFacingError, full_source_code_embedding::EmbeddingConfig,
|
||||
request_context::RequestContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct CodebaseContextConfigVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "CodebaseContextConfigVariables"
|
||||
)]
|
||||
pub struct CodebaseContextConfigQuery {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub codebase_context_config: CodebaseContextConfigResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
codebase_context_config(CodebaseContextConfigVariables) -> CodebaseContextConfigQuery;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CodebaseContextConfigOutput {
|
||||
pub embedding_cadence: i32,
|
||||
pub embedding_config: EmbeddingConfig,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum CodebaseContextConfigResult {
|
||||
CodebaseContextConfigOutput(CodebaseContextConfigOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
use crate::{
|
||||
api::queries::get_feature_model_choices::FeatureModelChoice, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct FreeAvailableModelsVariables {
|
||||
pub input: FreeAvailableModelsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct FreeAvailableModelsInput {
|
||||
pub referrer: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "FreeAvailableModelsVariables")]
|
||||
pub struct FreeAvailableModels {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub free_available_models: FreeAvailableModelsResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
free_available_models(FreeAvailableModelsVariables) -> FreeAvailableModels;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum FreeAvailableModelsResult {
|
||||
FreeAvailableModelsOutput(FreeAvailableModelsOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct FreeAvailableModelsOutput {
|
||||
pub feature_model_choice: FeatureModelChoice,
|
||||
#[allow(dead_code)]
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
use crate::{
|
||||
ai::AIConversationFormat, error::UserFacingError, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
use super::list_ai_conversations::ListAIConversationsInput;
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetAIConversationFormatVariables {
|
||||
pub input: ListAIConversationsInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
/// A minimal fragment that only selects the `format` field from an AIConversation.
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
#[cynic(graphql_type = "AIConversation")]
|
||||
pub struct AIConversationFormatOnly {
|
||||
pub conversation_id: cynic::Id,
|
||||
pub format: AIConversationFormat,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "ListAIConversationsOutput")]
|
||||
pub struct GetAIConversationFormatOutput {
|
||||
pub conversations: Vec<AIConversationFormatOnly>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[cynic(graphql_type = "ListAIConversationsResult")]
|
||||
pub enum GetAIConversationFormatResult {
|
||||
ListAIConversationsOutput(GetAIConversationFormatOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetAIConversationFormatVariables"
|
||||
)]
|
||||
pub struct GetAIConversationFormat {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
#[cynic(rename = "listAIConversations")]
|
||||
pub list_ai_conversations: GetAIConversationFormatResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
get_ai_conversation_format(GetAIConversationFormatVariables) -> GetAIConversationFormat;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
use crate::{billing::BillingMetadata, request_context::RequestContext, schema};
|
||||
|
||||
/*
|
||||
query GetAiOveragesForWorkspace($requestContext: RequestContext!) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
workspaces {
|
||||
billingMetadata {
|
||||
aiOverages {
|
||||
currentMonthlyRequestCostCents
|
||||
currentMonthlyRequestsUsed
|
||||
currentPeriodEnd
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetAiOveragesForWorkspaceVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub workspaces: Vec<Workspace>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "Workspace")]
|
||||
pub struct Workspace {
|
||||
pub billing_metadata: BillingMetadata,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetAiOveragesForWorkspaceVariables"
|
||||
)]
|
||||
pub struct GetAiOveragesForWorkspace {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_ai_overages_for_workspace(GetAiOveragesForWorkspaceVariables) -> GetAiOveragesForWorkspace;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
use crate::request_context::RequestContext;
|
||||
use crate::scalars::Time;
|
||||
use crate::schema;
|
||||
|
||||
/*
|
||||
query GetBlocksForUser($requestContext: RequestContext!) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
blocks {
|
||||
uid
|
||||
timeStartedTerm
|
||||
command
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetBlocksForUserVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "GetBlocksForUserVariables")]
|
||||
pub struct GetBlocksForUser {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_blocks_for_user(GetBlocksForUserVariables) -> GetBlocksForUser;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub blocks: Vec<Block>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct Block {
|
||||
pub uid: cynic::Id,
|
||||
pub time_started_term: Option<Time>,
|
||||
pub command: Option<String>,
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
use crate::error::UserFacingError;
|
||||
use crate::request_context::RequestContext;
|
||||
use crate::scalars::Time;
|
||||
use crate::schema;
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetCloudEnvironmentsQueryVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetCloudEnvironmentsQueryVariables"
|
||||
)]
|
||||
pub struct GetCloudEnvironmentsQuery {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub get_cloud_environments: GetCloudEnvironmentsResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GetCloudEnvironmentsOutput {
|
||||
pub __typename: String,
|
||||
pub cloud_environments: Vec<CloudEnvironment>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ResponseContext {
|
||||
pub server_version: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CloudEnvironment {
|
||||
pub config: CloudEnvironmentConfig,
|
||||
pub last_editor: Option<PublicUserProfile>,
|
||||
pub creator: Option<PublicUserProfile2>,
|
||||
pub last_task_created: Option<AgentTask>,
|
||||
pub last_updated: Time,
|
||||
pub uid: cynic::Id,
|
||||
pub scope: Space,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "AgentTask")]
|
||||
pub struct AgentTask {
|
||||
pub created_at: Time,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct Space {
|
||||
#[cynic(rename = "type")]
|
||||
pub type_: SpaceType,
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "PublicUserProfile")]
|
||||
pub struct PublicUserProfile2 {
|
||||
pub uid: String,
|
||||
pub email: Option<String>,
|
||||
pub photo_url: Option<String>,
|
||||
pub display_name: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct PublicUserProfile {
|
||||
pub uid: String,
|
||||
pub photo_url: Option<String>,
|
||||
pub email: Option<String>,
|
||||
pub display_name: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CloudEnvironmentConfig {
|
||||
pub setup_commands: Option<Vec<String>>,
|
||||
pub name: String,
|
||||
pub github_repos: Vec<GitHubRepo>,
|
||||
pub docker_image: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GitHubRepo {
|
||||
pub repo: String,
|
||||
pub owner: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GetCloudEnvironmentsResult {
|
||||
UserFacingError(UserFacingError),
|
||||
GetCloudEnvironmentsOutput(GetCloudEnvironmentsOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
pub enum SpaceType {
|
||||
#[cynic(rename = "Team")]
|
||||
Team,
|
||||
#[cynic(rename = "User")]
|
||||
User,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct ClientContext<'a> {
|
||||
pub version: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
#[cynic(graphql_type = "OSContext")]
|
||||
pub struct Oscontext<'a> {
|
||||
pub category: Option<&'a str>,
|
||||
pub linux_kernel_version: Option<&'a str>,
|
||||
pub name: Option<&'a str>,
|
||||
pub version: Option<&'a str>,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
get_cloud_environments(GetCloudEnvironmentsQueryVariables) -> GetCloudEnvironmentsQuery;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
use crate::{
|
||||
error::UserFacingError, object::CloudObjectWithDescendants,
|
||||
object_actions::ObjectActionHistory, request_context::RequestContext,
|
||||
response_context::ResponseContext, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetCloudObjectVariables {
|
||||
pub input: CloudObjectInput,
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "GetCloudObjectVariables")]
|
||||
pub struct GetCloudObject {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
pub cloud_object: CloudObjectResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_cloud_object(GetCloudObjectVariables) -> GetCloudObject;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct CloudObjectOutput {
|
||||
pub object: CloudObjectWithDescendants,
|
||||
pub action_histories: Option<Vec<ObjectActionHistory>>,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum CloudObjectResult {
|
||||
CloudObjectOutput(CloudObjectOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct CloudObjectInput {
|
||||
pub uid: cynic::Id,
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::{request_context::RequestContext, scalars::Time, schema};
|
||||
|
||||
/*
|
||||
query GetConversationUsage(
|
||||
$requestContext: RequestContext!,
|
||||
$days: Int,
|
||||
$limit: Int,
|
||||
$lastUpdatedEndTimestamp: Time
|
||||
) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
conversationUsage(
|
||||
days: $days,
|
||||
limit: $limit,
|
||||
lastUpdatedEndTimestamp: $lastUpdatedEndTimestamp
|
||||
) {
|
||||
conversationId
|
||||
title
|
||||
lastUpdated
|
||||
usageMetadata {
|
||||
contextWindowUsage
|
||||
creditsSpent
|
||||
summarized
|
||||
tokenUsage { modelId totalTokens }
|
||||
warpTokenUsage { modelId totalTokens tokenUsageByCategory { category tokens } }
|
||||
byokTokenUsage { modelId totalTokens tokenUsageByCategory { category tokens } }
|
||||
toolUsageMetadata {
|
||||
runCommandStats { count }
|
||||
runCommandsExecuted
|
||||
readFilesStats { count }
|
||||
searchCodebaseStats { count }
|
||||
grepStats { count }
|
||||
fileGlobStats { count }
|
||||
callMcpToolStats { count }
|
||||
readMcpResourceStats { count }
|
||||
suggestPlanStats { count }
|
||||
suggestCreatePlanStats { count }
|
||||
writeToLongRunningShellCommandStats { count }
|
||||
applyFileDiffStats { count linesAdded linesRemoved filesChanged }
|
||||
readShellCommandOutputStats { count }
|
||||
useComputerStats { count }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetConversationUsageVariables {
|
||||
pub request_context: RequestContext,
|
||||
pub days: Option<i32>,
|
||||
pub limit: Option<i32>,
|
||||
pub last_updated_end_timestamp: Option<Time>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetConversationUsageVariables"
|
||||
)]
|
||||
pub struct GetConversationUsage {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_conversation_usage_history(GetConversationUsageVariables) -> GetConversationUsage;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
#[cynic(variables = "GetConversationUsageVariables")]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "UserOutput",
|
||||
variables = "GetConversationUsageVariables"
|
||||
)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "User", variables = "GetConversationUsageVariables")]
|
||||
pub struct User {
|
||||
#[arguments(
|
||||
days: $days,
|
||||
limit: $limit,
|
||||
lastUpdatedEndTimestamp: $last_updated_end_timestamp
|
||||
)]
|
||||
pub conversation_usage: Vec<ConversationUsage>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ConversationUsage {
|
||||
pub conversation_id: String,
|
||||
pub last_updated: Time,
|
||||
pub title: String,
|
||||
pub usage_metadata: ConversationUsageMetadata,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ConversationUsageMetadata {
|
||||
pub context_window_usage: f64,
|
||||
pub credits_spent: f64,
|
||||
pub summarized: bool,
|
||||
pub token_usage: Vec<ModelTokenUsage>,
|
||||
pub warp_token_usage: Vec<TokenUsage>,
|
||||
pub byok_token_usage: Vec<TokenUsage>,
|
||||
pub tool_usage_metadata: ToolUsageMetadata,
|
||||
}
|
||||
|
||||
fn convert_token_usage(
|
||||
warp_token_usage: &[TokenUsage],
|
||||
byok_token_usage: &[TokenUsage],
|
||||
) -> Vec<persistence::model::ModelTokenUsage> {
|
||||
let mut usage_by_model: HashMap<String, persistence::model::ModelTokenUsage> = HashMap::new();
|
||||
|
||||
for usage in warp_token_usage {
|
||||
let entry = usage_by_model
|
||||
.entry(usage.model_id.clone())
|
||||
.or_insert_with(|| persistence::model::ModelTokenUsage {
|
||||
model_id: usage.model_id.clone(),
|
||||
..Default::default()
|
||||
});
|
||||
entry.warp_tokens += u32::try_from(usage.total_tokens).unwrap_or_default();
|
||||
for category_breakdown in &usage.token_usage_by_category {
|
||||
*entry
|
||||
.warp_token_usage_by_category
|
||||
.entry(category_breakdown.category.clone())
|
||||
.or_default() += u32::try_from(category_breakdown.tokens).unwrap_or_default();
|
||||
}
|
||||
}
|
||||
|
||||
for usage in byok_token_usage {
|
||||
let entry = usage_by_model
|
||||
.entry(usage.model_id.clone())
|
||||
.or_insert_with(|| persistence::model::ModelTokenUsage {
|
||||
model_id: usage.model_id.clone(),
|
||||
..Default::default()
|
||||
});
|
||||
entry.byok_tokens += u32::try_from(usage.total_tokens).unwrap_or_default();
|
||||
for category_breakdown in &usage.token_usage_by_category {
|
||||
*entry
|
||||
.byok_token_usage_by_category
|
||||
.entry(category_breakdown.category.clone())
|
||||
.or_default() += u32::try_from(category_breakdown.tokens).unwrap_or_default();
|
||||
}
|
||||
}
|
||||
|
||||
let mut result: Vec<_> = usage_by_model.into_values().collect();
|
||||
result.sort_by(|a, b| a.model_id.cmp(&b.model_id));
|
||||
result
|
||||
}
|
||||
|
||||
impl From<&ConversationUsageMetadata> for persistence::model::ConversationUsageMetadata {
|
||||
fn from(gql: &ConversationUsageMetadata) -> Self {
|
||||
Self {
|
||||
was_summarized: gql.summarized,
|
||||
context_window_usage: gql.context_window_usage as f32,
|
||||
credits_spent: gql.credits_spent as f32,
|
||||
credits_spent_for_last_block: None,
|
||||
token_usage: convert_token_usage(&gql.warp_token_usage, &gql.byok_token_usage),
|
||||
tool_usage_metadata: (&gql.tool_usage_metadata).into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ModelTokenUsage {
|
||||
pub model_id: String,
|
||||
pub total_tokens: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct TokenUsage {
|
||||
pub model_id: String,
|
||||
pub total_tokens: i32,
|
||||
pub token_usage_by_category: Vec<CategoryTokenBreakdown>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct CategoryTokenBreakdown {
|
||||
pub category: String,
|
||||
pub tokens: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ToolCallStats {
|
||||
pub count: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ApplyFileDiffStats {
|
||||
pub count: i32,
|
||||
pub lines_added: i32,
|
||||
pub lines_removed: i32,
|
||||
pub files_changed: i32,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct ToolUsageMetadata {
|
||||
pub run_command_stats: ToolCallStats,
|
||||
pub run_commands_executed: i32,
|
||||
pub read_files_stats: ToolCallStats,
|
||||
pub search_codebase_stats: ToolCallStats,
|
||||
pub grep_stats: ToolCallStats,
|
||||
pub file_glob_stats: ToolCallStats,
|
||||
pub call_mcp_tool_stats: ToolCallStats,
|
||||
pub read_mcp_resource_stats: ToolCallStats,
|
||||
pub suggest_plan_stats: ToolCallStats,
|
||||
pub suggest_create_plan_stats: ToolCallStats,
|
||||
pub write_to_long_running_shell_command_stats: ToolCallStats,
|
||||
pub apply_file_diff_stats: ApplyFileDiffStats,
|
||||
pub read_shell_command_output_stats: ToolCallStats,
|
||||
pub use_computer_stats: ToolCallStats,
|
||||
}
|
||||
|
||||
impl From<&ToolUsageMetadata> for persistence::model::ToolUsageMetadata {
|
||||
fn from(gql: &ToolUsageMetadata) -> Self {
|
||||
Self {
|
||||
run_command_stats: persistence::model::RunCommandStats {
|
||||
count: gql.run_command_stats.count,
|
||||
commands_executed: gql.run_commands_executed,
|
||||
},
|
||||
read_files_stats: persistence::model::ToolCallStats {
|
||||
count: gql.read_files_stats.count,
|
||||
},
|
||||
search_codebase_stats: persistence::model::ToolCallStats {
|
||||
count: gql.search_codebase_stats.count,
|
||||
},
|
||||
grep_stats: persistence::model::ToolCallStats {
|
||||
count: gql.grep_stats.count,
|
||||
},
|
||||
file_glob_stats: persistence::model::ToolCallStats {
|
||||
count: gql.file_glob_stats.count,
|
||||
},
|
||||
apply_file_diff_stats: persistence::model::ApplyFileDiffStats {
|
||||
count: gql.apply_file_diff_stats.count,
|
||||
lines_added: gql.apply_file_diff_stats.lines_added,
|
||||
lines_removed: gql.apply_file_diff_stats.lines_removed,
|
||||
files_changed: gql.apply_file_diff_stats.files_changed,
|
||||
},
|
||||
write_to_long_running_shell_command_stats: persistence::model::ToolCallStats {
|
||||
count: gql.write_to_long_running_shell_command_stats.count,
|
||||
},
|
||||
read_mcp_resource_stats: persistence::model::ToolCallStats {
|
||||
count: gql.read_mcp_resource_stats.count,
|
||||
},
|
||||
call_mcp_tool_stats: persistence::model::ToolCallStats {
|
||||
count: gql.call_mcp_tool_stats.count,
|
||||
},
|
||||
suggest_plan_stats: persistence::model::ToolCallStats {
|
||||
count: gql.suggest_plan_stats.count,
|
||||
},
|
||||
suggest_create_plan_stats: persistence::model::ToolCallStats {
|
||||
count: gql.suggest_create_plan_stats.count,
|
||||
},
|
||||
read_shell_command_output_stats: persistence::model::ToolCallStats {
|
||||
count: gql.read_shell_command_output_stats.count,
|
||||
},
|
||||
use_computer_stats: persistence::model::ToolCallStats {
|
||||
count: gql.use_computer_stats.count,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, schema, user::DiscoverableTeamData,
|
||||
};
|
||||
|
||||
/*
|
||||
query GetDiscoverableTeams($requestContext: RequestContext!) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
discoverableTeams {
|
||||
name
|
||||
numMembers
|
||||
teamAcceptingInvites
|
||||
teamUid
|
||||
}
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetDiscoverableTeamsVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub discoverable_teams: Vec<DiscoverableTeamData>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetDiscoverableTeamsVariables"
|
||||
)]
|
||||
pub struct GetDiscoverableTeams {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_discoverable_teams(GetDiscoverableTeamsVariables) -> GetDiscoverableTeams;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
use crate::{request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetFeatureModelChoicesVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetFeatureModelChoicesVariables"
|
||||
)]
|
||||
pub struct GetFeatureModelChoices {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_feature_model_choices(GetFeatureModelChoicesVariables) -> GetFeatureModelChoices;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub workspaces: Vec<Workspace>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct Workspace {
|
||||
pub feature_model_choice: FeatureModelChoice,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct FeatureModelChoice {
|
||||
pub agent_mode: AvailableLlms,
|
||||
pub planning: AvailableLlms,
|
||||
pub coding: AvailableLlms,
|
||||
pub cli_agent: AvailableLlms,
|
||||
pub computer_use_agent: AvailableLlms,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct AvailableLlms {
|
||||
pub default_id: String,
|
||||
pub choices: Vec<LlmInfo>,
|
||||
pub preferred_codex_model_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum DisableReason {
|
||||
AdminDisabled,
|
||||
OutOfRequests,
|
||||
ProviderOutage,
|
||||
RequiresUpgrade,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum LlmModelHost {
|
||||
AwsBedrock,
|
||||
DirectApi,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct RoutingHostConfig {
|
||||
pub enabled: bool,
|
||||
pub model_routing_host: LlmModelHost,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct LlmInfo {
|
||||
pub display_name: String,
|
||||
pub base_model_name: String,
|
||||
pub id: String,
|
||||
pub reasoning_level: Option<String>,
|
||||
pub usage_metadata: LlmUsageMetadata,
|
||||
pub description: Option<String>,
|
||||
pub disable_reason: Option<DisableReason>,
|
||||
pub vision_supported: bool,
|
||||
pub spec: Option<LlmSpec>,
|
||||
pub provider: LlmProvider,
|
||||
pub host_configs: Vec<RoutingHostConfig>,
|
||||
pub pricing: LlmPricing,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct LlmPricing {
|
||||
pub discount_percentage: Option<f64>,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Debug)]
|
||||
pub enum LlmProvider {
|
||||
Openai,
|
||||
Anthropic,
|
||||
Google,
|
||||
Xai,
|
||||
Unknown,
|
||||
#[cynic(fallback)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct LlmSpec {
|
||||
pub cost: f64,
|
||||
pub quality: f64,
|
||||
pub speed: f64,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct LlmUsageMetadata {
|
||||
pub credit_multiplier: Option<f64>,
|
||||
pub request_multiplier: i32,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
use crate::{error::UserFacingError, request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetIntegrationsUsingEnvironmentVariables {
|
||||
pub request_context: RequestContext,
|
||||
pub input: GetIntegrationsUsingEnvironmentInput,
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GetIntegrationsUsingEnvironmentInput {
|
||||
pub environment_id: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetIntegrationsUsingEnvironmentVariables"
|
||||
)]
|
||||
pub struct GetIntegrationsUsingEnvironment {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
#[cynic(rename = "getIntegrationsUsingEnvironment")]
|
||||
pub get_integrations_using_environment: GetIntegrationsUsingEnvironmentResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug, Clone)]
|
||||
pub struct GetIntegrationsUsingEnvironmentOutput {
|
||||
pub provider_names: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GetIntegrationsUsingEnvironmentResult {
|
||||
GetIntegrationsUsingEnvironmentOutput(GetIntegrationsUsingEnvironmentOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
GetIntegrationsUsingEnvironment(GetIntegrationsUsingEnvironmentVariables) -> GetIntegrationsUsingEnvironment;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
use crate::{error::UserFacingError, request_context::RequestContext, schema};
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct GetOAuthConnectTxStatusInput {
|
||||
#[cynic(rename = "txId")]
|
||||
pub tx_id: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetOAuthConnectTxStatusVariables {
|
||||
pub request_context: RequestContext,
|
||||
pub input: GetOAuthConnectTxStatusInput,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetOAuthConnectTxStatusVariables"
|
||||
)]
|
||||
pub struct GetOAuthConnectTxStatus {
|
||||
#[arguments(input: $input, requestContext: $request_context)]
|
||||
#[cynic(rename = "getOAuthConnectTxStatus")]
|
||||
pub get_oauth_connect_tx_status: GetOAuthConnectTxStatusResult,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GetOAuthConnectTxStatusOutput {
|
||||
pub __typename: String,
|
||||
pub status: OauthConnectTxStatus,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GetOAuthConnectTxStatusResult {
|
||||
GetOAuthConnectTxStatusOutput(GetOAuthConnectTxStatusOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::Enum, Clone, Copy, Debug)]
|
||||
#[cynic(graphql_type = "OAuthConnectTxStatus")]
|
||||
pub enum OauthConnectTxStatus {
|
||||
Completed,
|
||||
Expired,
|
||||
Failed,
|
||||
InProgress,
|
||||
Pending,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
get_oauth_connect_tx_status(GetOAuthConnectTxStatusVariables) -> GetOAuthConnectTxStatus;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
use crate::{request_context::RequestContext, schema};
|
||||
|
||||
/*
|
||||
query GetReferralInfo($requestContext: RequestContext!) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
referrals {
|
||||
referralCode
|
||||
numberClaimed
|
||||
isReferred
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetReferralInfoVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub referrals: ReferralInfo,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "GetReferralInfoVariables")]
|
||||
pub struct GetReferralInfo {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_referral_info(GetReferralInfoVariables) -> GetReferralInfo;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ReferralInfo {
|
||||
pub referral_code: String,
|
||||
pub number_claimed: i32,
|
||||
pub is_referred: bool,
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
use crate::{
|
||||
error::UserFacingError,
|
||||
full_source_code_embedding::{ContentHash, EmbeddingConfig, NodeHash, RepoMetadata},
|
||||
request_context::RequestContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetRelevantFragmentsVariables {
|
||||
pub embedding_config: EmbeddingConfig,
|
||||
pub repo_metadata: RepoMetadata,
|
||||
pub query: String,
|
||||
pub request_context: RequestContext,
|
||||
pub root_hash: NodeHash,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetRelevantFragmentsVariables"
|
||||
)]
|
||||
pub struct GetRelevantFragmentsQuery {
|
||||
#[arguments(input: { embeddingConfig: $embedding_config, query: $query, rootHash: $root_hash, repoMetadata: $repo_metadata }, requestContext: $request_context)]
|
||||
pub get_relevant_fragments: GetRelevantFragmentsResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_relevant_fragments(GetRelevantFragmentsVariables) -> GetRelevantFragmentsQuery;
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GetRelevantFragmentsError {
|
||||
pub error: String,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct GetRelevantFragmentsOutput {
|
||||
pub candidate_hashes: Vec<ContentHash>,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum GetRelevantFragmentsResult {
|
||||
GetRelevantFragmentsOutput(GetRelevantFragmentsOutput),
|
||||
GetRelevantFragmentsError(GetRelevantFragmentsError),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
use crate::{
|
||||
ai::RequestLimitInfo,
|
||||
billing::{BonusGrant, BonusGrantsInfo},
|
||||
error::UserFacingError,
|
||||
request_context::RequestContext,
|
||||
schema,
|
||||
};
|
||||
|
||||
/*
|
||||
query GetRequestLimitInfo($requestContext: RequestContext!) {
|
||||
user(requestContext: $requestContext) {
|
||||
... on UserOutput {
|
||||
user {
|
||||
workspaces {
|
||||
uid
|
||||
bonusGrantsInfo {
|
||||
grants {
|
||||
createdAt
|
||||
costCents
|
||||
expiration
|
||||
grantType
|
||||
reason
|
||||
userFacingMessage
|
||||
requestCreditsGranted
|
||||
requestCreditsRemaining
|
||||
}
|
||||
spendingInfo {
|
||||
currentMonthCreditsPurchased
|
||||
currentMonthPeriodEnd
|
||||
currentMonthSpendCents
|
||||
}
|
||||
}
|
||||
}
|
||||
requestLimitInfo {
|
||||
isUnlimited
|
||||
requestsUsedSinceLastRefresh
|
||||
requestLimit
|
||||
nextRefreshTime
|
||||
requestLimitRefreshDuration
|
||||
}
|
||||
bonusGrants {
|
||||
createdAt
|
||||
costCents
|
||||
expiration
|
||||
grantType
|
||||
reason
|
||||
userFacingMessage
|
||||
requestCreditsGranted
|
||||
requestCreditsRemaining
|
||||
}
|
||||
}
|
||||
}
|
||||
... on UserFacingError {
|
||||
error {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetRequestLimitInfoVariables {
|
||||
pub request_context: RequestContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct UserOutput {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "Workspace")]
|
||||
pub struct WorkspaceInfo {
|
||||
pub uid: cynic::Id,
|
||||
pub bonus_grants_info: BonusGrantsInfo,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct User {
|
||||
pub workspaces: Vec<WorkspaceInfo>,
|
||||
pub request_limit_info: RequestLimitInfo,
|
||||
pub bonus_grants: Vec<BonusGrant>,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(graphql_type = "RootQuery", variables = "GetRequestLimitInfoVariables")]
|
||||
pub struct GetRequestLimitInfo {
|
||||
#[arguments(requestContext: $request_context)]
|
||||
pub user: UserResult,
|
||||
}
|
||||
crate::client::define_operation! {
|
||||
get_request_limit_info(GetRequestLimitInfoVariables) -> GetRequestLimitInfo;
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum UserResult {
|
||||
UserOutput(UserOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
use crate::{
|
||||
error::UserFacingError, request_context::RequestContext, response_context::ResponseContext,
|
||||
scalars::Time, schema,
|
||||
};
|
||||
|
||||
#[derive(cynic::QueryVariables, Debug)]
|
||||
pub struct GetScheduledAgentHistoryVariables {
|
||||
pub request_context: RequestContext,
|
||||
pub input: ScheduledAgentHistoryInput,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
#[cynic(
|
||||
graphql_type = "RootQuery",
|
||||
variables = "GetScheduledAgentHistoryVariables"
|
||||
)]
|
||||
pub struct GetScheduledAgentHistory {
|
||||
#[arguments(requestContext: $request_context, input: $input)]
|
||||
pub scheduled_agent_history: ScheduledAgentHistoryResult,
|
||||
}
|
||||
|
||||
crate::client::define_operation! {
|
||||
get_scheduled_agent_history(GetScheduledAgentHistoryVariables) -> GetScheduledAgentHistory;
|
||||
}
|
||||
|
||||
#[derive(cynic::InputObject, Debug)]
|
||||
pub struct ScheduledAgentHistoryInput {
|
||||
pub schedule_id: cynic::Id,
|
||||
}
|
||||
|
||||
#[derive(cynic::InlineFragments, Debug)]
|
||||
pub enum ScheduledAgentHistoryResult {
|
||||
ScheduledAgentHistoryOutput(ScheduledAgentHistoryOutput),
|
||||
UserFacingError(UserFacingError),
|
||||
#[cynic(fallback)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ScheduledAgentHistoryOutput {
|
||||
pub history: ScheduledAgentHistory,
|
||||
pub response_context: ResponseContext,
|
||||
}
|
||||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
pub struct ScheduledAgentHistory {
|
||||
pub last_ran: Option<Time>,
|
||||
pub next_run: Option<Time>,
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user