export type HttpWorkflowStatus = 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'TIMED_OUT' | 'BLOCKED_NONDETERMINISTIC'; export interface HttpProblem { schema_version: 1; code: string; retryable: boolean; scope: string; safe_message: string; retry_after_ms?: number | null; violations?: Array<{ field: string; description: string; }>; } export interface HttpStartWorkflowRequest { workflow_id: string; workflow_type: string; task_queue: string; input_base64?: string | null; request_id?: string | null; priority?: number; search_attributes?: Record; trace_context?: Record; } export interface HttpStartWorkflowResponse { workflow_id: string; run_id: string; } export interface HttpWorkflowResult { workflow_id: string; run_id: string; status: HttpWorkflowStatus; output_base64?: string | null; error?: string | null; } export interface HttpWorkflowSummary { namespace: string; workflow_id: string; run_id: string; workflow_type: string; status: HttpWorkflowStatus; task_queue: string; created_at: string; updated_at: string; build_id?: string | null; workflow_task_generation: number; } export type HttpControlResourceStatus = 'ACTIVE' | 'DISABLED' | 'DELETED'; export interface HttpOrganization { organization_id: string; slug: string; display_name: string; labels: Record; status: HttpControlResourceStatus; created_at: string; updated_at: string; } export interface HttpProject { project_id: string; organization_id: string; slug: string; display_name: string; labels: Record; status: HttpControlResourceStatus; created_at: string; updated_at: string; } export interface HttpEnvironment { environment_id: string; project_id: string; slug: string; display_name: string; labels: Record; status: HttpControlResourceStatus; namespace: string; created_at: string; updated_at: string; } export interface HttpServiceAccount { principal_id: string; organization_id: string; slug: string; display_name: string; description?: string | null; status: HttpControlResourceStatus; created_at: string; updated_at: string; } export interface HttpServiceAccountCredential { credential_id: string; principal_id: string; key_prefix: string; created_at: string; last_used_at?: string | null; expires_at?: string | null; revoked_at?: string | null; rotated_from_credential_id?: string | null; } export interface HttpIssuedServiceAccount { service_account: HttpServiceAccount; credential: HttpServiceAccountCredential; secret: string; } export interface HttpIssuedServiceAccountCredential { credential: HttpServiceAccountCredential; secret: string; } export type HttpBuiltInRole = 'organization-admin' | 'project-admin' | 'operator' | 'developer' | 'viewer' | 'approver' | 'workload'; export type HttpAuthorizationAction = 'organization.manage' | 'project.manage' | 'environment.manage' | 'workflow.read' | 'workflow.start' | 'workflow.signal' | 'workflow.cancel' | 'workflow.operate' | 'worker.connect' | 'approval.resolve'; export interface HttpEffectiveScope { kind: 'global' | 'organization' | 'project' | 'environment' | 'namespace'; id: string; } export interface HttpEffectiveGrant { role: string; scope: HttpEffectiveScope; actions: HttpAuthorizationAction[]; reachable_scopes: HttpEffectiveScope[]; namespaces: string[]; } export interface HttpCurrentPrincipal { identity_kind: 'human' | 'service-account' | 'legacy-api-key' | 'insecure-local'; principal_id: string | null; organization_id: string | null; credential_id: string | null; grants: HttpEffectiveGrant[]; } export interface HttpRoleBinding { binding_id: string; principal_id: string; role: HttpBuiltInRole; organization_id?: string | null; project_id?: string | null; environment_id?: string | null; status: HttpControlResourceStatus; created_at: string; updated_at: string; } export interface HttpRoleBindingList { items: HttpRoleBinding[]; } export interface HttpResourceList { items: T[]; next_page_token: string; } export type HttpApprovalStatus = 'PENDING' | 'CLAIMED' | 'APPROVED' | 'REJECTED' | 'EXPIRED' | 'CANCELLED'; export type HttpApprovalAssigneeKind = 'ANY_AUTHENTICATED' | 'PRINCIPAL' | 'GROUP'; export type HttpApprovalActorKind = 'HUMAN' | 'SERVICE_ACCOUNT' | 'SYSTEM'; export interface HttpApprovalActor { kind: HttpApprovalActorKind; principal_id: string | null; } export interface HttpApprovalPolicy { schema_version: 1; assignee_kind: HttpApprovalAssigneeKind; assignee_id: string | null; require_claim: boolean; escalation_after_seconds: number | null; escalation_assignee_kind: HttpApprovalAssigneeKind | null; escalation_assignee_id: string | null; } export interface HttpApprovalWorkItem { approval_id: string; namespace: string; workflow_id: string; run_id: string; name: string; step_seq: number; task_generation: number; policy: HttpApprovalPolicy; status: HttpApprovalStatus; created_at: string; due_at: string | null; expires_at: string | null; claimed_by: HttpApprovalActor | null; claimed_at: string | null; decided_by: HttpApprovalActor | null; decided_at: string | null; decision: boolean | null; comment_sha256: string | null; comment_ref: string | null; decision_sha256: string | null; escalation_count: number; last_escalated_at: string | null; create_idempotency_key: string; claim_idempotency_key: string | null; decision_idempotency_key: string | null; } export interface HttpApprovalList { approvals: HttpApprovalWorkItem[]; next_page_token: string | null; } export interface HttpClaimApprovalRequest { request_id: string; occurred_at: string; } export interface HttpDecideApprovalRequest extends HttpClaimApprovalRequest { approved: boolean; comment_sha256?: string | null; comment_ref?: string | null; } export interface HttpApprovalMutation { approval: HttpApprovalWorkItem; duplicate: boolean; audit_id: string; } export interface HttpEvaluationScore { dimension: string; score_micros: number; } export interface HttpWorkflowEvaluation { schema_version: 1; evaluation_id: string; namespace: string; workflow_id: string; source_run_id: string; candidate_run_id: string; evaluator_kind: 'human' | 'service-account' | 'system'; evaluator_principal_id: string | null; evaluator_session_id: string | null; rubric_id: string; rubric_version: string; scores: HttpEvaluationScore[]; evidence_sha256: string; result_ref: string | null; created_at: string; idempotency_key: string; } export interface HttpCreateWorkflowEvaluationRequest { source_run_id: string; candidate_run_id: string; rubric_id: string; rubric_version: string; scores: HttpEvaluationScore[]; evidence_sha256: string; request_id: string; occurred_at: string; } export interface HttpWorkflowEvaluationList { evaluations: HttpWorkflowEvaluation[]; next_page_token: string | null; } export interface HttpWorkflowEvaluationMutation { evaluation: HttpWorkflowEvaluation; duplicate: boolean; audit_id: string; }