@gravity-rail/sdk 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent_team-CeErHy0t.d.ts → agent_team-C4ZYR_m1.d.ts} +4 -363
- package/dist/{agent_team-J0TyZPkg.d.cts → agent_team-C6FdNgYH.d.cts} +4 -363
- package/dist/{chunk-AMJ2MMBM.js → chunk-7LQYEV5Y.js} +8 -1
- package/dist/chunk-7LQYEV5Y.js.map +1 -0
- package/dist/{client-CO1hYs43.d.cts → client-DVF3qwNq.d.ts} +148 -20
- package/dist/{client-xtsG-YOi.d.ts → client-DwslF70Y.d.cts} +148 -20
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/internal.cjs +7 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +7 -79
- package/dist/internal.d.ts +7 -79
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-q5-fCvfV.d.ts → member-import-BpcX-swC.d.ts} +2 -2
- package/dist/{member-import-CzGVMtgv.d.cts → member-import-CA9YWv3Y.d.cts} +2 -2
- package/dist/schemas.d.cts +11 -11
- package/dist/schemas.d.ts +11 -11
- package/dist/{tasks-Dc89D2Gu.d.ts → tasks-BGLfmf5y.d.ts} +2 -0
- package/dist/{tasks-BM3pb5W6.d.cts → tasks-BZb3rt5m.d.cts} +2 -0
- package/package.json +8 -7
- package/dist/chunk-AMJ2MMBM.js.map +0 -1
package/dist/internal.js
CHANGED
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/generated/session.ts","../src/types/generated/customer_activity.ts","../src/types/generated/phi_posture.ts","../src/types/generated/workspace.ts","../src/types/generated/v3_file.ts","../src/types/generated/v3_folder.ts","../src/types/generated/v3_grant.ts","../src/types/generated/v3_upload.ts","../src/types/generated/metric_record_definition.ts","../src/types/generated/metric.ts","../src/types/generated/enrollment_inquiry.ts","../src/types/generated/support_request_participant.ts","../src/types/generated/pilot_program.ts","../src/types/generated/bot_admin_chat.ts"],"sourcesContent":["/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: session\n */\n\n\n/**\n * ``{token, sessionKind, expiresAt}`` as sign-in and exchange responses carry it.\n */\nexport interface MintedSessionFields {\n token: string;\n sessionKind: SessionKind;\n expiresAt: string;\n}\n\n/**\n * What ``describe_session_token`` reports about a presented session.\n *\n * ``accountUuid`` / ``switchedFromAccountUuid`` let the frontend check that an\n * account-switch stash belongs to the account that switched (the restore in\n * ``/api/auth/end-temp-session``). Both describe a token the caller already\n * holds.\n */\nexport interface SessionDescription {\n sessionKind: SessionKind;\n expiresAt: string;\n accountUuid?: string | null;\n switchedFromAccountUuid?: string | null;\n}\n\n/**\n * The kind of session a cookie carries, and the kind of host that reads it.\n */\nexport type SessionKind = typeof SessionKind[keyof typeof SessionKind];\n\n\nexport const SessionKind = {\n account: 'account',\n site: 'site',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: customer_activity\n */\n\n\n/**\n * PHI-free aggregate over ALL rows matching the filters (not a page).\n *\n * Counts, ages in hours, thresholds and identifiers only — no titles, review\n * notes, classifier feedback, subject labels, member data or message content\n * is read or returned.\n */\nexport interface CustomerActivityBacklogSummaryResponse {\n generatedAt: string;\n queryVersion: string;\n filters: CustomerActivitySummaryFilters;\n totalCount: number;\n backlogCount: number;\n reviewedCount: number;\n unclassifiedCount?: number;\n oldestBacklogCreatedAt?: string | null;\n oldestBacklogAgeHours?: number | null;\n byStatus: CustomerActivityStatusBucket[];\n bySeverity: CustomerActivitySeverityBucket[];\n bySource: CustomerActivitySourceBucket[];\n throughput: CustomerActivityThroughputWindow[];\n sla: CustomerActivitySlaSummary;\n}\n\n/**\n * What the blind sample of one detector version holds.\n *\n * All three counts leave out events whose outcome is test activity.\n * ``sampleRecorded`` counts the events the detector recorded for a subject it\n * judged clean. ``sampleReviewed`` counts those that carry a reviewer verdict\n * on the ``labels`` claim. ``sampleWithMiss`` counts the reviewed ones where\n * the reviewer added at least one label.\n */\nexport interface CustomerActivityClassifierBlindSample {\n detectorVersion?: string | null;\n sampleRecorded: number;\n sampleReviewed: number;\n sampleWithMiss: number;\n}\n\nexport interface CustomerActivityClassifierDefinitionResponse {\n detectorName: CustomerActivityClassifierDetectorName;\n subjectType: string;\n labels: CustomerActivityClassifierLabel[];\n}\n\nexport type CustomerActivityClassifierDetectorName = typeof CustomerActivityClassifierDetectorName[keyof typeof CustomerActivityClassifierDetectorName];\n\n\nexport const CustomerActivityClassifierDetectorName = {\n assignment_chat_classifier: 'assignment_chat_classifier',\n manager_chat_classifier: 'manager_chat_classifier',\n concierge_chat_classifier: 'concierge_chat_classifier',\n chat_review: 'chat_review',\n a2p_agent_inferred_stop: 'a2p_agent_inferred_stop',\n voice_spoken_opt_out: 'voice_spoken_opt_out',\n} as const;\n\nexport type CustomerActivityClassifierLabel = typeof CustomerActivityClassifierLabel[keyof typeof CustomerActivityClassifierLabel];\n\n\nexport const CustomerActivityClassifierLabel = {\n user_distress: 'user_distress',\n user_confusion: 'user_confusion',\n health_topic_mentioned: 'health_topic_mentioned',\n health_advice_given: 'health_advice_given',\n escalation_failure: 'escalation_failure',\n repeated_tool_failure: 'repeated_tool_failure',\n transcription_quality: 'transcription_quality',\n repetitive_loop: 'repetitive_loop',\n manager_no_response: 'manager_no_response',\n manager_incomplete_task: 'manager_incomplete_task',\n stalled_progress: 'stalled_progress',\n step_limit_reached: 'step_limit_reached',\n docs_or_skill_gap: 'docs_or_skill_gap',\n discovery_thrash: 'discovery_thrash',\n manager_language_mismatch: 'manager_language_mismatch',\n} as const;\n\n/**\n * Reviewer verdicts on one label, for one detector version.\n *\n * ``flagged`` counts events the classifier recorded with the label.\n * ``reviewed`` counts the flagged events that carry a reviewer verdict on the\n * ``labels`` claim (test activity excluded); each of those is either\n * ``confirmed`` (the reviewer kept the label) or ``rejected`` (the reviewer\n * removed it). ``addedByReviewer`` counts judged events where the reviewer\n * added a label the classifier did not predict.\n *\n * ``precision`` is ``confirmed / (confirmed + rejected)`` with a Wilson 95%\n * interval; all three are ``None`` when no flagged event has a verdict, which\n * is a different fact from a precision of zero.\n *\n * ``addedOnSample`` is the part of ``addedByReviewer`` that sits on\n * blind-sample events. ``estimatedMissed`` is ``addedOnSample`` times the\n * response's ``blindSampleRateN``, and ``recall`` is\n * ``confirmed / (confirmed + estimatedMissed)``. Both are ``None`` when the\n * version has no blind-sample event with a verdict, and ``recall`` is also\n * ``None`` when ``confirmed + estimatedMissed`` is zero.\n */\nexport interface CustomerActivityClassifierLabelQuality {\n detectorVersion?: string | null;\n label: CustomerActivityClassifierLabel;\n flagged: number;\n reviewed: number;\n confirmed: number;\n rejected: number;\n addedByReviewer: number;\n precision?: number | null;\n precisionLow?: number | null;\n precisionHigh?: number | null;\n addedOnSample: number;\n estimatedMissed?: number | null;\n recall?: number | null;\n}\n\n/**\n * PHI-free reviewer-verdict aggregate for one classifier detector.\n *\n * Counts, ratios, closed-vocabulary labels and detector versions only — no\n * event id, title, review note or feedback note is returned.\n * ``eventsReviewed`` counts every event with a reviewer verdict on the\n * ``labels`` claim, test activity excluded. A row's ``reviewed`` applies that\n * same test and also requires the row's label among the predicted labels, so\n * a judged event with no predicted label is in ``eventsReviewed`` and in no\n * row's ``reviewed``.\n *\n * ``blindSampleRateN`` is the one-in-N rate at which the detector records the\n * subjects it judges clean, ``None`` for a detector that records no such\n * sample. ``blindSample`` has one entry per detector version that recorded a\n * sample event other than test activity.\n */\nexport interface CustomerActivityClassifierQualityResponse {\n generatedAt: string;\n detectorName: CustomerActivityClassifierDetectorName;\n createdAfter?: string | null;\n eventsTotal: number;\n eventsReviewed: number;\n blindSampleRateN?: number | null;\n blindSample: CustomerActivityClassifierBlindSample[];\n rows: CustomerActivityClassifierLabelQuality[];\n}\n\nexport interface CustomerActivityClassifiersResponse {\n assignmentChatClassifier: CustomerActivityClassifierDefinitionResponse;\n managerChatClassifier: CustomerActivityClassifierDefinitionResponse;\n conciergeChatClassifier: CustomerActivityClassifierDefinitionResponse;\n}\n\nexport interface CustomerActivityEventListResponse {\n items: CustomerActivityEventResponse[];\n total: number;\n page: number;\n pageSize: number;\n totalPages: number;\n}\n\n/**\n * Admin/operator view of one customer-activity event.\n *\n * The list response remains free of operator-authored text. The single-event\n * detail response may include ``reviewNote`` and ``classifierFeedback`` for the\n * internal review workflow.\n */\nexport interface CustomerActivityEventResponse {\n id: number;\n uuid: string;\n accountId?: number | null;\n accountName?: string | null;\n organizationId?: number | null;\n organizationName?: string | null;\n workspaceId?: number | null;\n workspaceName?: string | null;\n subjectType: string;\n subjectRef: string;\n subjectMessageRef?: string | null;\n scopeRef?: string | null;\n evidence?: CustomerActivityTurnEvidence | null;\n title?: string | null;\n labels: string[];\n severity: CustomerActivitySeverity;\n confidence?: number | null;\n score?: number | null;\n source: CustomerActivityEventSource;\n dedupeKey?: string | null;\n detectorName?: CustomerActivityClassifierDetectorName | null;\n detectorVersion?: string | null;\n modelId?: string | null;\n promptVersion?: string | null;\n traceId?: string | null;\n status: CustomerActivityEventStatus;\n reviewOutcome?: CustomerActivityReviewOutcome | null;\n reviewNote?: string | null;\n classifierFeedback?: CustomerActivityEventResponseClassifierFeedback;\n linkUrl?: string | null;\n reviewedByAccountId?: number | null;\n reviewedByName?: string | null;\n reviewedAt?: string | null;\n supportRequestId?: number | null;\n resourceId?: number | null;\n workspaceUuid?: string | null;\n chatClassifierPrompt?: string | null;\n subjectTitle?: string | null;\n subjectSubtitle?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type CustomerActivityEventResponseClassifierFeedback = { [key: string]: unknown } | null;\n\nexport type CustomerActivityEventSource = typeof CustomerActivityEventSource[keyof typeof CustomerActivityEventSource];\n\n\nexport const CustomerActivityEventSource = {\n system: 'system',\n customer: 'customer',\n classifier: 'classifier',\n operator: 'operator',\n} as const;\n\nexport type CustomerActivityEventStatus = typeof CustomerActivityEventStatus[keyof typeof CustomerActivityEventStatus];\n\n\nexport const CustomerActivityEventStatus = {\n new: 'new',\n reviewed: 'reviewed',\n} as const;\n\nexport type CustomerActivityReviewOutcome = typeof CustomerActivityReviewOutcome[keyof typeof CustomerActivityReviewOutcome];\n\n\nexport const CustomerActivityReviewOutcome = {\n no_action_needed: 'no_action_needed',\n support_request_created: 'support_request_created',\n bug_filed: 'bug_filed',\n linked_existing_work: 'linked_existing_work',\n classifier_feedback: 'classifier_feedback',\n test_activity: 'test_activity',\n a2p_suppression_reversed: 'a2p_suppression_reversed',\n} as const;\n\nexport type CustomerActivitySeverity = typeof CustomerActivitySeverity[keyof typeof CustomerActivitySeverity];\n\n\nexport const CustomerActivitySeverity = {\n none: 'none',\n minimal: 'minimal',\n low: 'low',\n medium: 'medium',\n high: 'high',\n critical: 'critical',\n} as const;\n\nexport interface CustomerActivitySeverityBucket {\n severity: CustomerActivitySeverity;\n backlogCount: number;\n reviewedCount: number;\n oldestBacklogAgeHours?: number | null;\n}\n\n/**\n * Open (unreviewed) events at one severity past their review threshold.\n *\n * ``thresholdSource`` travels with the threshold it describes: a breach count\n * must never be readable without both the number that produced it and whether\n * that number is ratified policy or a provisional default.\n */\nexport interface CustomerActivitySlaBucket {\n severity: CustomerActivitySeverity;\n thresholdHours: number;\n thresholdSource: CustomerActivitySlaThresholdSource;\n breachCount: number;\n oldestBacklogAgeHours?: number | null;\n}\n\nexport interface CustomerActivitySlaSummary {\n buckets: CustomerActivitySlaBucket[];\n totalBreachCount: number;\n}\n\n/**\n * Where ONE severity's SLA threshold came from.\n *\n * ``default`` = the provisional in-repo default (see\n * ``lib/services/customer_activity_metrics.py``); ``request`` = the caller\n * supplied it. Tracked per severity rather than per response so that\n * overriding one threshold cannot make the other read as caller-supplied\n * policy when it is still an unratified default.\n */\nexport type CustomerActivitySlaThresholdSource = typeof CustomerActivitySlaThresholdSource[keyof typeof CustomerActivitySlaThresholdSource];\n\n\nexport const CustomerActivitySlaThresholdSource = {\n default: 'default',\n request: 'request',\n} as const;\n\nexport interface CustomerActivitySourceBucket {\n source: CustomerActivityEventSource;\n backlogCount: number;\n reviewedCount: number;\n}\n\nexport interface CustomerActivityStatusBucket {\n status: CustomerActivityEventStatus;\n count: number;\n}\n\n/**\n * Echo of the filters the aggregate was computed under.\n *\n * Identifiers, closed-vocabulary enums and the open-vocabulary\n * ``subjectType`` only — so an exported aggregate carries its own scope and\n * can never be mistaken for a whole-queue figure.\n */\nexport interface CustomerActivitySummaryFilters {\n status?: CustomerActivityEventStatus | null;\n subjectType?: string | null;\n source?: CustomerActivityEventSource | null;\n severity?: CustomerActivitySeverity | null;\n reviewOutcome?: CustomerActivityReviewOutcome | null;\n detectorName?: CustomerActivityClassifierDetectorName | null;\n workspaceId?: number | null;\n organizationId?: number | null;\n accountId?: number | null;\n}\n\n/**\n * Adjudication throughput over a trailing window.\n *\n * ``recordedCount`` counts events created in the window; ``reviewedCount``\n * counts events whose review verdict was recorded in it (``reviewed_at``).\n * Reopening an event clears ``reviewed_at``, so the pair reads as \"arrived vs\n * currently-adjudicated\", and arrival outpacing adjudication is exactly the\n * growing-backlog signal.\n */\nexport interface CustomerActivityThroughputWindow {\n windowHours: number;\n recordedCount: number;\n reviewedCount: number;\n}\n\n/**\n * The facts one judged turn's labels were decided from.\n *\n * Stored in ``customer_activity_events.evidence`` by field name; served by\n * the API in camelCase. Both spellings validate.\n */\nexport interface CustomerActivityTurnEvidence {\n graph: CustomerActivityTurnEvidenceGraph;\n /** @minimum 0 */\n toolCalls: number;\n /** @minimum 0 */\n failedToolCalls: number;\n /** @minimum 0 */\n redundantToolResults: number;\n /** @maxItems 5 */\n topTools: ToolCallCount[];\n runSignal?: CustomerActivityTurnEvidenceRunSignal;\n}\n\nexport type CustomerActivityTurnEvidenceGraph = typeof CustomerActivityTurnEvidenceGraph[keyof typeof CustomerActivityTurnEvidenceGraph];\n\n\nexport const CustomerActivityTurnEvidenceGraph = {\n manager: 'manager',\n agent: 'agent',\n} as const;\n\nexport type CustomerActivityTurnEvidenceRunSignal = typeof CustomerActivityTurnEvidenceRunSignal[keyof typeof CustomerActivityTurnEvidenceRunSignal] | null;\n\n\nexport const CustomerActivityTurnEvidenceRunSignal = {\n step_budget_closeout: 'step_budget_closeout',\n step_limit_error: 'step_limit_error',\n} as const;\n\nexport interface ToolCallCount {\n /** @pattern ^[A-Za-z0-9_.:-]{1,64}$ */\n name: string;\n /** @minimum 1 */\n count: number;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: phi_posture\n */\n\nimport type { DeclaredDataUse } from './organization';\nimport type { PhiDataPolicy, PhiPostureDecision, PhiPostureReasonCode } from './workspace';\n\n/**\n * Whether an ``App`` has been reviewed as fit to carry PHI (ADR-18 §2a).\n *\n * Distinct from ``Builder.is_verified``, which is a display badge on the\n * consent screen: \"we know who published this\" is a weaker claim than \"this\n * app may carry patient data\". Superuser-set and provenance-carrying (a\n * non-:attr:`UNREVIEWED` row must name a reviewer and a review time — the\n * same CHECK-constraint discipline as the workspace posture columns).\n *\n * :attr:`UNREVIEWED` is the system default and means only \"no approval on\n * file\"; :attr:`PHI_DENIED` is an active decision that the app must not carry\n * PHI even where a customer attestation would otherwise lift the restriction.\n */\nexport type AppPhiReviewStatus = typeof AppPhiReviewStatus[keyof typeof AppPhiReviewStatus];\n\n\nexport const AppPhiReviewStatus = {\n unreviewed: 'unreviewed',\n phi_approved: 'phi_approved',\n phi_denied: 'phi_denied',\n} as const;\n\nexport type PhiPolicyReason = typeof PhiPolicyReason[keyof typeof PhiPolicyReason];\n\n\nexport const PhiPolicyReason = {\n initial_classification: 'initial_classification',\n customer_confirmation: 'customer_confirmation',\n agreement_verified: 'agreement_verified',\n scope_change: 'scope_change',\n periodic_review: 'periodic_review',\n correction: 'correction',\n incident_response: 'incident_response',\n} as const;\n\nexport type PhiPolicySource = typeof PhiPolicySource[keyof typeof PhiPolicySource];\n\n\nexport const PhiPolicySource = {\n customer_attestation: 'customer_attestation',\n contract_review: 'contract_review',\n staff_review: 'staff_review',\n legacy_inventory: 'legacy_inventory',\n platform_default: 'platform_default',\n} as const;\n\nexport interface PhiPostureFinding {\n reasonCode: PhiPostureReasonCode;\n organizationId: number;\n workspaceId?: number | null;\n workspaceUuid?: string | null;\n decision: PhiPostureDecision;\n}\n\nexport interface PhiPostureReportResponse {\n generatedAt: string;\n organizationCount: number;\n workspaceCount: number;\n findingCount: number;\n offset: number;\n limit: number;\n nextOffset?: number | null;\n findings: PhiPostureFinding[];\n truncated: boolean;\n}\n\nexport interface PhiPostureTransitionResponse {\n targetType: PhiPostureTransitionResponseTargetType;\n organizationId: number;\n workspaceId?: number | null;\n workspaceUuid?: string | null;\n declaredDataUse?: DeclaredDataUse | null;\n phiDataPolicy?: PhiDataPolicy | null;\n decision?: PhiPostureDecision | null;\n reasonCode?: PhiPostureReasonCode | null;\n policyVersion: string;\n source: string;\n reason: string;\n reviewedAt: string;\n reviewedByAccountId: number;\n reviewDueAt: string;\n}\n\nexport type PhiPostureTransitionResponseTargetType = typeof PhiPostureTransitionResponseTargetType[keyof typeof PhiPostureTransitionResponseTargetType];\n\n\nexport const PhiPostureTransitionResponseTargetType = {\n organization: 'organization',\n workspace: 'workspace',\n} as const;\n\nexport interface UpdateOrganizationPhiPostureRequest {\n /**\n * @minLength 1\n * @maxLength 64\n */\n policyVersion: string;\n source: PhiPolicySource;\n reason: PhiPolicyReason;\n reviewDueAt: string;\n declaredDataUse: DeclaredDataUse;\n}\n\nexport interface UpdateWorkspacePhiPolicyRequest {\n /**\n * @minLength 1\n * @maxLength 64\n */\n policyVersion: string;\n source: PhiPolicySource;\n reason: PhiPolicyReason;\n reviewDueAt: string;\n phiDataPolicy: PhiDataPolicy;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: workspace\n */\n\nimport type { Query } from './ir';\nimport type { ConditionTaskRouting, MatchTaskRouting, OtherwiseTaskRouting, OutcomeTaskRouting } from './task';\n\n/**\n * Organization metadata available through an account's existing memberships.\n */\nexport interface AccountOrganizationDirectoryEntryResponse {\n organizationId: number;\n organizationUuid: string;\n organizationName: string;\n organizationSlug: string;\n organizationLogoUrl: string | null;\n role: string | null;\n hasBillingAccess: boolean;\n matchesOrganizationSearch: boolean;\n}\n\n/**\n * Superuser request to bring a workspace's seeded roles to canonical form.\n *\n * The body is required even for a dry run, and is deliberately not a query\n * parameter: a cookie-authenticated POST with no body is forgeable by a\n * cross-site HTML form (see ``tests/lint/test_csrf_bodyless_mutation_lint.py``),\n * and requiring a JSON body forces a forgery into a 422.\n */\nexport interface AdminCanonicalizeMemberRolesRequest {\n apply?: boolean;\n}\n\n/**\n * Admin request to create a user's membership in a workspace.\n */\nexport interface AdminCreateWorkspaceMemberRequest {\n memberRoleId?: number | null;\n}\n\n/**\n * Request model for admin workspace operations.\n */\nexport interface AdminCreateWorkspaceRequest {\n organizationId: number;\n workspaceUuid?: string | null;\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n resellerId?: number | null;\n templateWorkspaceUuid?: string | null;\n locale?: string | null;\n features?: string[] | null;\n chatClassifierPrompt?: string | null;\n}\n\n/**\n * Admin request to map a site to a workspace.\n */\nexport interface AdminMapSiteRequest {\n workspaceId?: number | null;\n siteUuid: string;\n name?: string | null;\n siteSlug?: string | null;\n externalDomain?: string | null;\n ownerId?: number | null;\n allowSignup?: boolean;\n}\n\n/**\n * Response model for site mappings.\n */\nexport interface AdminSiteMappingResponse {\n id: number;\n siteId: number;\n siteUuid: string;\n siteName: string;\n siteSlug: string;\n externalDomain?: string | null;\n workspaceId: number;\n workspaceUuid: string;\n workspaceName: string;\n workspaceSlug: string;\n createdAt: string;\n updatedAt: string;\n}\n\n/**\n * Admin request to update a user's membership in a workspace.\n */\nexport interface AdminUpdateWorkspaceMemberRequest {\n tosAccepted?: boolean | null;\n memberRoleId?: number | null;\n}\n\n/**\n * Request model for admin workspace operations.\n */\nexport interface AdminUpdateWorkspaceRequest {\n organizationId?: number | null;\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n resellerId?: number | null;\n creatorId?: number | null;\n features?: string[] | null;\n featuresOverride?: AdminUpdateWorkspaceRequestFeaturesOverride;\n themes?: string[] | null;\n locale?: string | null;\n timezone?: string | null;\n chatClassifierPrompt?: string | null;\n}\n\nexport type AdminUpdateWorkspaceRequestFeaturesOverride = {[key: string]: boolean} | null;\n\nexport interface AdminWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n organizationLogoUrl?: string | null;\n signupCode?: string | null;\n createdAt: string;\n userRole: string | null;\n teammateScopes?: string[] | null;\n teammateId?: number | null;\n canManageBundles?: boolean;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n themes?: string[];\n features?: string[] | null;\n featureStatus?: AdminWorkspaceResponseFeatureStatus;\n signupRequestStatus?: string | null;\n status?: number | null;\n templateWorkspaceUuid?: string | null;\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n locale?: string | null;\n timezone?: string | null;\n requiresOrgAuth?: boolean | null;\n authUrl?: string | null;\n creatorId?: number | null;\n creatorName?: string | null;\n dbId?: number | null;\n featuresOverride?: AdminWorkspaceResponseFeaturesOverride;\n billingOwnerId?: number | null;\n billingOwnerName?: string | null;\n subscriptionProductId?: number | null;\n subscriptionProductName?: string | null;\n chatClassifierPrompt?: string | null;\n phiDataPolicy?: PhiDataPolicy;\n phiPostureDecision?: PhiPostureDecision;\n phiPostureReasonCode?: PhiPostureReasonCode;\n phiPolicyVersion?: string | null;\n phiPolicySource?: string | null;\n phiPolicyReason?: string | null;\n phiPolicyReviewedAt?: string | null;\n phiPolicyReviewedByAccountId?: number | null;\n phiPolicyReviewDueAt?: string | null;\n}\n\nexport type AdminWorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\nexport type AdminWorkspaceResponseFeaturesOverride = {[key: string]: boolean} | null;\n\n/**\n * One day of the weekly schedule. Times are wall-clock ``HH:MM``.\n */\nexport interface BusinessHoursDay {\n day: BusinessHoursDayDay;\n enabled: boolean;\n start: string | null;\n end: string | null;\n}\n\nexport type BusinessHoursDayDay = typeof BusinessHoursDayDay[keyof typeof BusinessHoursDayDay];\n\n\nexport const BusinessHoursDayDay = {\n monday: 'monday',\n tuesday: 'tuesday',\n wednesday: 'wednesday',\n thursday: 'thursday',\n friday: 'friday',\n saturday: 'saturday',\n sunday: 'sunday',\n} as const;\n\nexport interface BusinessHoursStatusResponse {\n isBusinessHours: boolean;\n}\n\n/**\n * Typed body for the CLI-facing ``change-org`` / ``change-org/preview``\n * admin endpoints.\n *\n * Typing ``targetOrganizationId`` / ``newCreatorId`` as ``int`` makes FastAPI\n * return 422 on a non-numeric body field instead of letting a string value\n * reach the DB driver. Mirrors the superuser\n * ``WorkspaceMigrationRequest`` model used by the sibling\n * ``POST /admin/org-migration/workspace`` endpoint.\n */\nexport interface ChangeWorkspaceOrgRequest {\n /**\n * ID of the target organization\n * @exclusiveMinimum 0\n */\n targetOrganizationId: number;\n /**\n * Account ID to set as the workspace creator (created or promoted to OWNER in the target org)\n * @exclusiveMinimum 0\n */\n newCreatorId: number;\n}\n\nexport interface ClassifyPhoneResponse {\n phoneType?: string | null;\n}\n\n/**\n * Minimal workspace row for pickers that only need to switch (Lantern).\n *\n * Served by ``GET /api/v2/w/?can_use_device=1``. Deliberately carries no\n * feature map, role, or settings — a companion device chooses a workspace\n * from identity plus the org step-up pair below, and everything else it\n * discovers from inside the workspace it chose. The step-up contract is the\n * same as ``WorkspaceResponse``: ``requiresOrgAuth`` states the org's\n * policy (a definite True/False on every row this route builds); a device\n * can never hold org-session evidence, so ``True`` means \"this switch\n * strands until someone completes org SSO\".\n */\nexport interface CompactWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n requiresOrgAuth?: boolean;\n authUrl?: string | null;\n}\n\nexport interface CostInfo {\n score: number;\n budget: number;\n}\n\n/**\n * Request model for associating data records with assignments.\n */\nexport interface DataRecordAssociationRequest {\n id: number;\n accessMode?: number;\n}\n\nexport interface DeleteMembershipResponse {\n message: string;\n}\n\nexport interface DeleteWorkspaceResponse {\n status: string;\n}\n\nexport interface FirstRunState {\n mode?: string;\n statuses?: FirstRunStateStatuses;\n collapsed?: boolean | null;\n}\n\nexport type FirstRunStateStatuses = {[key: string]: string} | null;\n\n/**\n * Create request for org-scoped workspace creation.\n *\n * Only allows fields appropriate for org admins.\n * Does NOT allow: resellerId, features, featuresOverride, isPublic, allowSignup.\n */\nexport interface OrgCreateWorkspaceRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n name: string;\n slug?: string | null;\n templateWorkspaceUuid?: string | null;\n setupPurpose?: OrgCreateWorkspaceRequestSetupPurpose;\n /** @maxItems 8 */\n setupPurposes?: OrgCreateWorkspaceRequestSetupPurposesItem[];\n bundleUuid?: string | null;\n installBundleUuid?: string | null;\n}\n\nexport type OrgCreateWorkspaceRequestSetupPurpose = typeof OrgCreateWorkspaceRequestSetupPurpose[keyof typeof OrgCreateWorkspaceRequestSetupPurpose] | null;\n\n\nexport const OrgCreateWorkspaceRequestSetupPurpose = {\n patient_enrollment: 'patient_enrollment',\n wellness_checks: 'wellness_checks',\n care_gaps: 'care_gaps',\n post_discharge: 'post_discharge',\n patient_requests: 'patient_requests',\n developer: 'developer',\n just_curious: 'just_curious',\n other: 'other',\n} as const;\n\nexport type OrgCreateWorkspaceRequestSetupPurposesItem = typeof OrgCreateWorkspaceRequestSetupPurposesItem[keyof typeof OrgCreateWorkspaceRequestSetupPurposesItem];\n\n\nexport const OrgCreateWorkspaceRequestSetupPurposesItem = {\n patient_enrollment: 'patient_enrollment',\n wellness_checks: 'wellness_checks',\n care_gaps: 'care_gaps',\n post_discharge: 'post_discharge',\n patient_requests: 'patient_requests',\n developer: 'developer',\n just_curious: 'just_curious',\n other: 'other',\n} as const;\n\n/**\n * Request to join a workspace as an org admin.\n */\nexport interface OrgJoinWorkspaceRequest {\n memberRoleId: number;\n}\n\n/**\n * Response after joining a workspace.\n */\nexport interface OrgJoinWorkspaceResponse {\n memberId: number;\n memberRoleId: number;\n message: string;\n}\n\n/**\n * Organization settings an **org admin** may change.\n *\n * Name, slug, contact details, logo, security contact and MFA requirement.\n *\n * Deliberately a separate model from :class:`UpdateOrganizationRequest`\n * rather than a subset enforced at the route: the privileged field\n * ``enforceCreditLimit`` is *absent from the schema*, so an org admin\n * cannot set it even by crafting the request body. Pydantic ignores\n * unknown keys, and there is no code path from here to that column.\n *\n * It remains superuser-only, on ``PUT /api/v2/admin/organizations/{id}``\n * behind ``Depends(get_superuser)``: ``enforceCreditLimit`` decides whether\n * a customer is hard-blocked (402) at zero credits or merely alerted, i.e.\n * whether they can keep spending.\n *\n * SSO is not here either — it has its own admin-scoped endpoint\n * (``PUT /api/v2/o/{org_uuid}/sso``) with its own audit trail.\n */\nexport interface OrgSettingsUpdateRequest {\n name?: string | null;\n slug?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n logoUrl?: string | null;\n requireMfa?: boolean | null;\n securityContactEmail?: string | null;\n securityContactName?: string | null;\n}\n\n/**\n * Update request for org-scoped workspace updates.\n *\n * Only allows fields that org admins should be able to change.\n * Does NOT allow: features, featuresOverride, organizationId, resellerId,\n * creatorId, themes.\n */\nexport interface OrgUpdateWorkspaceRequest {\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n locale?: string | null;\n timezone?: string | null;\n}\n\n/**\n * Workspace response for org context.\n *\n * Similar to AdminWorkspaceResponse but without superuser-only fields\n * like dbId, featuresOverride, billingOwnerId, etc.\n */\nexport interface OrgWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n signupCode?: string | null;\n createdAt: string;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n status: number;\n features?: string[] | null;\n featureStatus?: OrgWorkspaceResponseFeatureStatus;\n creatorId?: number | null;\n creatorName?: string | null;\n locale?: string | null;\n timezone?: string | null;\n isMember?: boolean;\n labels?: WorkspaceLabelSummary[];\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n}\n\nexport type OrgWorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\n/**\n * One workspace card's expensive half: workspace-schema aggregates.\n *\n * ``myRoleName`` is about the requesting account and is returned to any org\n * member who belongs to the workspace. The counts are org-administrative\n * information and are populated only for ``org:read`` holders; everyone else\n * gets ``None`` (rendered as \"—\" rather than zero, so the UI never implies\n * an empty workspace when it simply may not look).\n *\n * ``schemaReady`` is False while the workspace is still provisioning — its\n * tables do not exist yet, so the counts are absent for a reason the card\n * can explain instead of showing a failure.\n */\nexport interface OrgWorkspaceStatsResponse {\n workspaceUuid: string;\n /** False while the workspace is still provisioning, or when its schema could not be read. The counts are absent in that case. */\n schemaReady?: boolean;\n /** The REQUESTING account's member-role name in this workspace. Null when they have no member row there. */\n myRoleName?: string | null;\n /** Non-archived members in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n memberCount?: number | null;\n /** Published and draft sites in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n siteCount?: number | null;\n /** Email inboxes in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n inboxCount?: number | null;\n /** Non-archived phone numbers in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n phoneNumberCount?: number | null;\n}\n\n/**\n * One workspace card's cheap half: identity plus a GLB-side count.\n *\n * ``orgMemberCount`` joins workspace membership to org membership. A separate\n * \"all accounts\" tally was tried and dropped: the\n * ``enforce_org_membership_before_workspace`` trigger refuses a workspace\n * membership for an account with no org membership, so the two numbers are\n * equal except in the transient state after an org membership is revoked —\n * a distinction no card was showing.\n */\nexport interface OrgWorkspaceSummaryResponse {\n uuid: string;\n name: string;\n slug: string;\n /** WorkspaceProvisionStatus. 2 = AVAILABLE; anything else means the workspace is still being provisioned. */\n status: number;\n createdAt: string;\n isPublic?: boolean;\n allowSignup?: boolean;\n /** Whether the requesting account has a workspace membership here. */\n isMember?: boolean;\n /** Accounts with access to this workspace who are also members of this organization. */\n orgMemberCount?: number;\n /** The organization's workspace labels on this workspace; empty for a reader without org:read or org:webhooks. */\n labels?: WorkspaceLabelSummary[];\n}\n\n/**\n * Page 1 for each requested organization, from one directory read.\n */\nexport interface OrganizationWorkspaceDirectoryResponse {\n groups: OrganizationWorkspacePageResponse[];\n}\n\n/**\n * First admitted page of one organization's account workspace directory.\n *\n * ``total`` counts ready GLB membership candidates, the same contract as\n * ``PaginatedResponse`` on ``GET /api/v2/w/``. Admission may leave ``items``\n * empty while ``total`` is still positive.\n */\nexport interface OrganizationWorkspacePageResponse {\n organizationUuid: string;\n items: WorkspaceResponse[];\n total: number;\n page: number;\n pageSize: number;\n totalPages: number;\n}\n\nexport type PhiDataPolicy = typeof PhiDataPolicy[keyof typeof PhiDataPolicy];\n\n\nexport const PhiDataPolicy = {\n unclassified: 'unclassified',\n phi_prohibited: 'phi_prohibited',\n phi_permitted: 'phi_permitted',\n} as const;\n\nexport type PhiPostureDecision = typeof PhiPostureDecision[keyof typeof PhiPostureDecision];\n\n\nexport const PhiPostureDecision = {\n allow_non_phi: 'allow_non_phi',\n warn_non_phi: 'warn_non_phi',\n review_required: 'review_required',\n authorization_required: 'authorization_required',\n conflict: 'conflict',\n} as const;\n\nexport type PhiPostureReasonCode = typeof PhiPostureReasonCode[keyof typeof PhiPostureReasonCode];\n\n\nexport const PhiPostureReasonCode = {\n org_unclassified: 'org_unclassified',\n workspace_unclassified: 'workspace_unclassified',\n non_phi_policy_aligned: 'non_phi_policy_aligned',\n phi_expected_workspace_prohibited: 'phi_expected_workspace_prohibited',\n phi_authorization_not_evaluated: 'phi_authorization_not_evaluated',\n phi_coverage_satisfied: 'phi_coverage_satisfied',\n phi_coverage_missing: 'phi_coverage_missing',\n phi_coverage_expired: 'phi_coverage_expired',\n non_phi_org_workspace_permitted: 'non_phi_org_workspace_permitted',\n phi_permitted_org_not_expected: 'phi_permitted_org_not_expected',\n organization_review_expired: 'organization_review_expired',\n workspace_review_expired: 'workspace_review_expired',\n invalid_state: 'invalid_state',\n} as const;\n\nexport interface PublicWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n createdAt: string;\n allowSignup?: boolean;\n resellerId?: number | null;\n memberRole?: string | null;\n signupRequestStatus?: string | null;\n}\n\nexport interface QueryDataTypeInfo {\n id: number;\n slug: string;\n name: string;\n isCollection: boolean;\n recordFields: RecordFieldInfo[];\n}\n\n/**\n * A labeled choice for a field whose raw values are ids/codes.\n */\nexport interface QueryEnumOption {\n value: unknown;\n label: string;\n color?: string | null;\n}\n\nexport interface QueryFieldInfo {\n path: string;\n type: string;\n operators: string[];\n sortable?: boolean;\n selectable?: boolean;\n enumValues?: unknown[] | null;\n enumOptions?: QueryEnumOption[] | null;\n displayName?: string | null;\n category?: string | null;\n}\n\nexport interface QueryFieldsResponse {\n entities: QueryFieldsResponseEntities;\n aggregateSources: QueryFieldsResponseAggregateSources;\n dataTypes: QueryDataTypeInfo[];\n recordSystemFields: QueryFieldInfo[];\n relations?: QueryFieldsResponseRelations;\n aggregateSourceCategories?: QueryFieldsResponseAggregateSourceCategories;\n}\n\nexport type QueryFieldsResponseAggregateSourceCategories = {[key: string]: {[key: string]: string}};\n\nexport type QueryFieldsResponseAggregateSources = {[key: string]: string[]};\n\nexport type QueryFieldsResponseEntities = {[key: string]: QueryFieldInfo[]};\n\nexport type QueryFieldsResponseRelations = {[key: string]: {[key: string]: QueryFieldInfo[]}};\n\nexport interface QuerySourceFax {\n id: number;\n pdfFileId: number | null;\n receivedAt: string | null;\n}\n\nexport interface RecordFieldInfo {\n slug: string;\n name: string;\n type: string;\n groupable: boolean;\n operators: string[];\n enumValues?: unknown[] | null;\n enumOptions?: QueryEnumOption[] | null;\n}\n\nexport interface RunQueryRequest {\n query: Query;\n mode?: RunQueryRequestMode;\n sourceFaxId?: number | null;\n}\n\nexport type RunQueryRequestMode = typeof RunQueryRequestMode[keyof typeof RunQueryRequestMode] | null;\n\n\nexport const RunQueryRequestMode = {\n rows: 'rows',\n count: 'count',\n aggregate: 'aggregate',\n} as const;\n\nexport interface RunQueryResponse {\n mode: string;\n items?: RunQueryResponseItems;\n nextCursor?: string | null;\n count?: number | null;\n rows?: RunQueryResponseRows;\n warnings?: string[];\n cost?: CostInfo | null;\n sourceFax?: QuerySourceFax | null;\n}\n\nexport type RunQueryResponseItems = { [key: string]: unknown }[] | null;\n\nexport type RunQueryResponseRows = { [key: string]: unknown }[] | null;\n\n/**\n * How the install a workspace was created to make ended.\n *\n * A closed vocabulary, stored in ``workspaces.setup_bundle_outcome`` (its\n * CHECK constraint lists the same values) and returned to clients, so it\n * carries codes and never a message. No value means the install has not\n * finished: setup is still running, or setup itself failed, which the\n * workspace's own status says.\n */\nexport type SetupBundleOutcome = typeof SetupBundleOutcome[keyof typeof SetupBundleOutcome];\n\n\nexport const SetupBundleOutcome = {\n installed: 'installed',\n install_failed: 'install_failed',\n bundle_unavailable: 'bundle_unavailable',\n permission_denied: 'permission_denied',\n release_not_installable: 'release_not_installable',\n} as const;\n\n/**\n * Request model for associating child tasks (parent-child relationships).\n *\n * ``order`` is optional and backward-compatible: when omitted, callers\n * that build associations from a UI-style ``childTasks`` list keep the\n * historical array-index ordering. When provided (e.g. by the workspace\n * transfer importer), it preserves the authored routing order so that\n * automatic routing still selects the lower-order matching child after\n * transfer.\n *\n * The legacy transport names remain compatible. ``celCondition`` describes\n * Path availability; ``choicePrompt`` guides Agent selection. ``autoNext``\n * and ``required`` jointly encode automatic selection when CEL is present.\n * ``required`` is not a Task exit requirement.\n */\nexport interface TaskAssociationRequest {\n taskId: number;\n autoNext: boolean;\n required: boolean;\n choicePrompt?: string | null;\n celCondition?: string | null;\n order?: number | null;\n routing?: OutcomeTaskRouting | MatchTaskRouting | ConditionTaskRouting | OtherwiseTaskRouting | null;\n}\n\n/**\n * Update workspace defaults.\n */\nexport interface UpdateWorkspaceDefaultsRequest {\n defaultPhoneNumberId?: number | null;\n escalationBusinessHours?: BusinessHoursDay[] | null;\n escalationOnlineMessageTemplate?: string | null;\n escalationOfflineMessageTemplate?: string | null;\n escalationNotifiedMessageTemplate?: string | null;\n escalationPausedMessageTemplate?: string | null;\n emailFooter?: string | null;\n defaultReplyToInboxId?: number | null;\n pauseOnEscalate?: boolean | null;\n enableAudioRecording?: boolean | null;\n enableVoicemailDetection?: boolean | null;\n allowDevices?: boolean;\n shortenUrls?: boolean | null;\n transcriptionModel?: string | null;\n}\n\n/**\n * Feature choices from Workspace settings, as ``{slug: enabled}``.\n */\nexport interface UpdateWorkspaceFeaturesRequest {\n features: UpdateWorkspaceFeaturesRequestFeatures;\n}\n\nexport type UpdateWorkspaceFeaturesRequestFeatures = {[key: string]: boolean};\n\n/**\n * Update a workspace.\n */\nexport interface UpdateWorkspaceRequest {\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n locale?: string | null;\n timezone?: string | null;\n}\n\nexport interface ValidateQueryResponse {\n valid: boolean;\n cost: CostInfo;\n warnings?: string[];\n errors?: string[];\n}\n\n/**\n * A Workspace an Operator Tools widget session reaches, by name.\n */\nexport interface WidgetWorkspaceResponse {\n uuid: string;\n name: string;\n}\n\n/**\n * Slim view of an OrgDomain for selection in workspace forms.\n *\n * Intentionally smaller than `OrgDomainResponse` — workspace members\n * don't need ownership tokens, DNS records, last-checked timestamps,\n * etc. Just enough to populate a dropdown, pass the uuid back as a\n * foreign reference (e.g. `orgDomainUuid` on inbox creation), and\n * let the UI mark non-verified entries as disabled with a reason.\n */\nexport interface WorkspaceAvailableDomain {\n uuid: string;\n domain: string;\n ownershipStatus: string;\n emailStatus?: string | null;\n siteStatus?: string | null;\n isChildHost?: boolean;\n}\n\nexport interface WorkspaceAvailableDomainsResponse {\n items: WorkspaceAvailableDomain[];\n total: number;\n}\n\n/**\n * Response model for workspace counts.\n */\nexport interface WorkspaceCountsResponse {\n humans: number;\n tasks: number;\n workflows: number;\n inboxes: number;\n phoneNumbers: number;\n chats: number;\n files: number;\n sites: number;\n forms: number;\n}\n\n/**\n * One feature as Workspace settings shows it.\n */\nexport interface WorkspaceFeatureState {\n slug: string;\n name: string;\n description: string;\n category: string;\n icon?: string | null;\n enabled: boolean;\n editable: boolean;\n}\n\n/**\n * Every feature this workspace's plan allows, and whether it is on.\n */\nexport interface WorkspaceFeaturesResponse {\n features: WorkspaceFeatureState[];\n}\n\n/**\n * Request model for joining a workspace.\n */\nexport interface WorkspaceJoinRequest {\n memberRoleId: number;\n orgRole?: string | null;\n}\n\n/**\n * Response model for joining a workspace.\n */\nexport interface WorkspaceJoinResponse {\n success: boolean;\n memberUuid: string;\n memberId: number;\n workspaceUuid: string;\n workspaceName: string;\n memberRoleName: string;\n message: string;\n}\n\n/**\n * A label as it appears on a workspace or in a selector.\n */\nexport interface WorkspaceLabelSummary {\n uuid: string;\n slug: string;\n name: string;\n color: string;\n}\n\nexport interface WorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n organizationLogoUrl?: string | null;\n signupCode?: string | null;\n createdAt: string;\n userRole: string | null;\n teammateScopes?: string[] | null;\n teammateId?: number | null;\n canManageBundles?: boolean;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n themes?: string[];\n features?: string[] | null;\n featureStatus?: WorkspaceResponseFeatureStatus;\n signupRequestStatus?: string | null;\n status?: number | null;\n templateWorkspaceUuid?: string | null;\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n locale?: string | null;\n timezone?: string | null;\n requiresOrgAuth?: boolean | null;\n authUrl?: string | null;\n}\n\nexport type WorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\n/**\n * Individual scope metadata.\n */\nexport interface WorkspaceScopeResponse {\n name: string;\n category: string;\n description: string;\n implies?: string[];\n dangerous?: boolean;\n}\n\n/**\n * Response containing all workspace-grantable scopes.\n */\nexport interface WorkspaceScopesListResponse {\n items: WorkspaceScopeResponse[];\n categories: string[];\n}\n\nexport interface WorkspaceSettingsResponse {\n id: number;\n slug: string;\n defaultPhoneNumberId: number | null;\n workspaceFolderId?: number | null;\n escalationBusinessHours: BusinessHoursDay[] | null;\n escalationOnlineMessageTemplate: string | null;\n escalationOfflineMessageTemplate: string | null;\n escalationNotifiedMessageTemplate: string | null;\n escalationPausedMessageTemplate: string | null;\n emailFooter: string | null;\n defaultReplyToInboxId: number | null;\n pauseOnEscalate: boolean;\n sesDomain: string;\n enableAudioRecording: boolean;\n enableVoicemailDetection: boolean;\n allowDevices: boolean;\n shortenUrls: boolean;\n shortenUrlsExampleUrl: string;\n shortenUrlsAvailable: boolean;\n transcriptionModel?: string | null;\n defaultChatModel: string;\n defaultRealtimeModel: string;\n defaultInferenceModel: string;\n defaultVoiceModel: string;\n firstRunMode?: string | null;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_file\n */\n\n\n/**\n * Approve the current revision of a skill, exactly as the reviewer read it.\n */\nexport interface ApproveFileRequest {\n /** The revision the reviewer read. It must be the current revision. */\n revisionId: string;\n /**\n * The SHA-256 of the content the reviewer read, as lowercase hex.\n * @pattern ^[a-f0-9]{64}$\n */\n contentHash: string;\n /** The etag of the file the reviewer saw. */\n etag: string;\n}\n\n/**\n * Content given as bytes.\n */\nexport interface BytesFileContent {\n /** The content is bytes. */\n kind: 'BYTES';\n /**\n * The bytes of the file, base64-encoded (RFC 4648, with padding), at most 7 MiB decoded on a workspace. Send larger content through an Upload (up to 100 MiB).\n * @maxLength 9786712\n */\n data: string;\n}\n\n/**\n * The current content of another File in the same workspace, written as this file's content.\n *\n * A Create with this arm makes a copy of that File. Workspace Files only.\n */\nexport interface CopyFileContent {\n /** The content is another file's. */\n kind: 'FILE';\n /** The File whose current content is copied. The caller must be able to read it; a File the caller cannot see fails with 404. */\n fileId: string;\n}\n\n/**\n * A file in a workspace, or a file or skill of an organization Bot.\n *\n * Create takes this schema. Update takes it as a JSON merge patch: the fields\n * present change, and the others keep their values.\n */\nexport interface File {\n /** The unique identifier of the file. Create takes it as the fileId query parameter. */\n readonly id?: string | null;\n /**\n * The file name, with its extension.\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** What the file is for. A workspace File is always FILE, and a Bot file's kind is the kind of its immediate folder. A Skill package's references, assets and scripts subfolders hold ordinary FILE entries. Ignored on input; an Update cannot change it. */\n readonly kind?: FileKind;\n /**\n * The media type of the content.\n * @minLength 1\n * @maxLength 255\n */\n mimeType: string;\n /** Who can read the File. A workspace File defaults to PRIVATE on Create. A Bot File defaults to the selected folder's access, whether selected by id or path. Only an organization admin can create a team File. */\n access?: FileAccess | null;\n /** A short description of the file. Workspace Files only. Null clears it. */\n description?: string | null;\n /** The ids of the file's labels (file-labels), sorted by label name on output. Workspace Files only. On Create an absent value means no labels; on Update the list replaces all labels. An id that names no label fails with 400 and the code INVALID_FIELD. */\n labelIds?: string[] | null;\n /** The folder that holds the File. Required on a Create in both scopes: name the folder here or in folderPath. Update cannot set it to null: v3 never moves a File out of the folder tree. Absent on output for a File that is in no folder (a workspace chat attachment, for example). */\n folderId?: string | null;\n /** The folder that holds the new File, named as a path instead of folderId: `/Bot/Skills` is the team's Skills folder and `/Me/Skills` is the caller's own. An organization Bot only. Send it or folderId, not both. Never returned. */\n folderPath?: string | null;\n /** Whether the people the file is shared with may share it on. Workspace Files only. Changing it needs the same authority as changing access (capabilities.share). */\n shareable?: boolean | null;\n /** The number of grants on the file, member grants and role grants together. Workspace Files only. */\n readonly grantCount?: number | null;\n /** The content to write. Create with no content makes an empty file; Update with no content keeps the current revision. Never returned. */\n content?: TextFileContent | BytesFileContent | RevisionFileContent | UploadFileContent | CopyFileContent | null;\n /** Whether the file is in use. */\n readonly state?: FileState | null;\n /** The size of the current content in bytes. */\n readonly sizeBytes?: number | null;\n /** The current revision. Absent for a workspace File saved before revisions were kept. */\n readonly revisionId?: string | null;\n /** The number of the current revision; the first revision is 1. */\n readonly revisionNumber?: number | null;\n /** The SHA-256 of the current revision's content, as lowercase hex. Absent when the service did not record it. */\n readonly contentHash?: string | null;\n /** The time the file was created. */\n readonly createTime?: string | null;\n /** The time the file's fields or content last changed. */\n readonly updateTime?: string | null;\n /** Who created the file. Absent when the service did not record it. */\n readonly createdBy?: FileAuthor | null;\n /** Who wrote the current revision. Absent when the service did not record it. */\n readonly updatedBy?: FileAuthor | null;\n /** The package identity and review state of a skill. Present only when kind is SKILL. */\n readonly skill?: FileSkill | null;\n /** What the caller may do to the file. */\n readonly capabilities?: FileCallerCapabilities | null;\n /** True when the caller may ask for this personal file to become the organization's. Organization Bot files only. */\n readonly promotable?: boolean | null;\n /** The caller's open request to share this file, when there is one. Organization Bot files only. */\n readonly pendingRequestUuid?: string | null;\n /** The workspaces whose data this file drew on, sorted. Organization Bot files only; empty when it drew on none. */\n readonly sourceWorkspaceUuids?: string[] | null;\n /** The file's row id in `/api/v2`. Organization Bot files only, and only until the knowledge-request endpoints (which still name a row) move to `/api/v3`. Never send it back. */\n readonly legacyArtifactId?: number | null;\n /** A value that changes whenever the file changes. Send it on Update, Delete, restore and approve; a stale value fails with 409 and the code ETAG_MISMATCH. */\n etag?: string | null;\n}\n\n/**\n * Who can read a file.\n *\n * A workspace File is ``PRIVATE`` (its owner and the people it is shared with),\n * ``WORKSPACE`` or ``PUBLIC``. An organization Bot's file is ``PRIVATE`` (one\n * teammate), ``ORGANIZATION`` or ``AUDIENCE`` (a fixed set of teammates that a\n * Job captured; never set by a caller).\n */\nexport type FileAccess = typeof FileAccess[keyof typeof FileAccess];\n\n\nexport const FileAccess = {\n PRIVATE: 'PRIVATE',\n WORKSPACE: 'WORKSPACE',\n PUBLIC: 'PUBLIC',\n ORGANIZATION: 'ORGANIZATION',\n AUDIENCE: 'AUDIENCE',\n} as const;\n\n/**\n * The person or Bot that wrote a revision.\n */\nexport interface FileAuthor {\n /** Whether a person or a Bot wrote the revision. */\n kind: FileAuthorKind;\n /** The name to show for the author. */\n displayName: string;\n /** The workspace Member who wrote the revision. Absent for a Bot, and for an organization teammate, who has no Member. */\n memberId?: string | null;\n /** The Bot that wrote the revision. Absent when a person wrote it. */\n agentId?: string | null;\n}\n\n/**\n * Who wrote a revision.\n */\nexport type FileAuthorKind = typeof FileAuthorKind[keyof typeof FileAuthorKind];\n\n\nexport const FileAuthorKind = {\n MEMBER: 'MEMBER',\n AGENT: 'AGENT',\n} as const;\n\n/**\n * What the caller may do to the file.\n */\nexport interface FileCallerCapabilities {\n /** True when the caller may change the file's fields or content. */\n update: boolean;\n /** True when the caller may delete the file; for an organization Bot's file, archive it. */\n delete: boolean;\n /** True when the caller may restore the archived file. */\n restore: boolean;\n /** True when the caller may approve the skill's current revision. */\n approve: boolean;\n /** True when the caller may change the file's access and shareable flag, and its grants. Present only on a workspace File; absent on an organization Bot's file. */\n share?: boolean | null;\n}\n\n/**\n * What a file is for. A workspace File is always ``FILE``.\n */\nexport type FileKind = typeof FileKind[keyof typeof FileKind];\n\n\nexport const FileKind = {\n FILE: 'FILE',\n SKILL: 'SKILL',\n} as const;\n\n/**\n * A label that a workspace puts on its Files.\n *\n * Create takes this schema.\n */\nexport interface FileLabel {\n /** The unique identifier of the label. Create takes it as the fileLabelId query parameter. */\n readonly id?: string | null;\n /**\n * The label name. Names are unique in a workspace; a Create whose name is taken receives a numeric suffix, as in /api/v2.\n * @minLength 1\n * @maxLength 64\n */\n name: string;\n /**\n * The label color as six hexadecimal digits, with or without a leading #. The response has the digits in uppercase and no #.\n * @pattern ^#?[0-9a-fA-F]{6}$\n */\n color: string;\n /** A short description of the label. */\n description?: string | null;\n /** The time the label was created. */\n readonly createTime?: string | null;\n /** The time the label last changed. */\n readonly updateTime?: string | null;\n /** A value that changes whenever the label changes. */\n readonly etag?: string | null;\n}\n\n/**\n * The order of a List of files. ``_DESC`` reverses it.\n */\nexport type FileOrder = typeof FileOrder[keyof typeof FileOrder];\n\n\nexport const FileOrder = {\n NAME: 'NAME',\n NAME_DESC: 'NAME_DESC',\n CREATE_TIME: 'CREATE_TIME',\n CREATE_TIME_DESC: 'CREATE_TIME_DESC',\n UPDATE_TIME: 'UPDATE_TIME',\n UPDATE_TIME_DESC: 'UPDATE_TIME_DESC',\n} as const;\n\n/**\n * One saved state of a file's content. A revision never changes.\n */\nexport interface FileRevision {\n /** The unique identifier of the revision. */\n id: string;\n /**\n * The number of the revision within its file; the first is 1.\n * @minimum 1\n */\n number: number;\n /** The media type of the revision's content. */\n mimeType: string;\n /**\n * The size of the revision's content in bytes.\n * @minimum 0\n */\n sizeBytes: number;\n /** The SHA-256 of the content, as lowercase hex. Absent when the service did not record it. */\n contentHash?: string | null;\n /** The time the revision was written. */\n createTime: string;\n /** Who wrote the revision. Absent when the service did not record it. */\n author?: FileAuthor | null;\n}\n\n/**\n * Package identity and review state. Present only on a file whose kind is ``SKILL``.\n */\nexport interface FileSkill {\n /** The package slug, present for a skill stored in a package. */\n packageName?: string | null;\n /** The package document path, present for a skill stored in a package. */\n packagePath?: string | null;\n /** The revision the Bot uses. Absent when no revision is approved yet. */\n approvedRevisionId?: string | null;\n /** True when the current revision waits for a person to approve it. */\n pendingReview: boolean;\n /** What the scanner found in the current revision. Empty when it found nothing. Present only in the FULL view: the scan reads the content. */\n warnings?: FileSkillWarning[] | null;\n /** The scanner's names for the prompt-injection patterns it matched in the current revision, such as ROLE_OVERRIDE. A documented string, because the set grows. Present only in the FULL view. */\n signals?: string[] | null;\n /** The version of the scanner that read the current revision. Present only in the FULL view, and absent when no scanner read it. */\n scannerVersion?: string | null;\n /** The current revision as the reviewer reads it, with invisible characters written out. Present only in the FULL view. */\n reviewText?: string | null;\n}\n\n/**\n * What the skill scanner found in the current revision.\n */\nexport type FileSkillWarning = typeof FileSkillWarning[keyof typeof FileSkillWarning];\n\n\nexport const FileSkillWarning = {\n INVISIBLE_UNICODE: 'INVISIBLE_UNICODE',\n PROMPT_INJECTION_SIGNALS: 'PROMPT_INJECTION_SIGNALS',\n} as const;\n\n/**\n * Whether a file is in use. Only an organization Bot's file is ever ``ARCHIVED``.\n */\nexport type FileState = typeof FileState[keyof typeof FileState];\n\n\nexport const FileState = {\n ACTIVE: 'ACTIVE',\n ARCHIVED: 'ARCHIVED',\n} as const;\n\n/**\n * How much of a file a Get returns.\n *\n * ``FULL`` adds the content scan of a skill: ``skill.warnings``, ``skill.signals``,\n * ``skill.scannerVersion`` and ``skill.reviewText``.\n */\nexport type FileView = typeof FileView[keyof typeof FileView];\n\n\nexport const FileView = {\n BASIC: 'BASIC',\n FULL: 'FULL',\n} as const;\n\n/**\n * One page of file labels.\n */\nexport interface ListFileLabelsResponse {\n /** The labels on this page. */\n fileLabels: FileLabel[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * One page of a file's revisions, newest first.\n */\nexport interface ListFileRevisionsResponse {\n /** The revisions on this page. */\n revisions: FileRevision[];\n /** The token that reads older revisions. Absent when there are none. */\n nextPageToken?: string | null;\n}\n\n/**\n * One page of files.\n */\nexport interface ListFilesResponse {\n /** The files on this page. */\n files: File[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * Restore an archived organization Bot's file.\n */\nexport interface RestoreFileRequest {\n /** The etag of the file the caller saw. */\n etag: string;\n}\n\n/**\n * The content of an earlier revision of the same file, written as a new revision.\n */\nexport interface RevisionFileContent {\n /** The content is an earlier revision's. */\n kind: 'REVISION';\n /** The revision whose content becomes the new revision. */\n revisionId: string;\n}\n\n/**\n * Content given as text, stored as UTF-8.\n */\nexport interface TextFileContent {\n /** The content is text. */\n kind: 'TEXT';\n /**\n * The text of the file, at most 7 MiB once encoded as UTF-8 on a workspace. Send larger content through an Upload (up to 100 MiB).\n * @maxLength 7340032\n */\n text: string;\n}\n\n/**\n * The bytes the caller uploaded through an Upload. Workspace Files only.\n */\nexport interface UploadFileContent {\n /** The content is an uploaded object. */\n kind: 'UPLOAD';\n /** The Upload that holds the bytes. It must be RECEIVED and belong to the caller; an Upload that is not RECEIVED fails with 400 and the code UPLOAD_NOT_RECEIVED. */\n uploadId: string;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_folder\n */\n\nimport type { File, FileAccess, FileAuthor, FileKind } from './v3_file';\n\nexport type BotFolderRole = typeof BotFolderRole[keyof typeof BotFolderRole];\n\n\nexport const BotFolderRole = {\n ROOT: 'ROOT',\n SKILLS: 'SKILLS',\n FOLDER: 'FOLDER',\n} as const;\n\n/**\n * A folder of files and folders.\n *\n * Create takes this schema; ``name`` is required and the parent is ``parentId``\n * (or, for an organization Bot, ``parentPath``). Update takes it as a JSON\n * merge patch: the fields present change, and the others keep their values.\n */\nexport interface Folder {\n /** The unique identifier of the folder. Create takes it as the folderId query parameter. */\n readonly id?: string | null;\n /**\n * The folder name. It is unique among the folders in the same parent.\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** The folder that holds this folder. Absent on a folder with no parent, such as the workspace root. Required on Create. Update moves the folder; a move into the folder's own subtree fails with 400 and the code FOLDER_CYCLE. */\n parentId?: string | null;\n /** The folder that holds the new folder, named as a path instead of parentId. An organization Bot only. Send it or parentId, not both. */\n parentPath?: string | null;\n /** What makes the folder a root. Absent on every other folder. */\n readonly root?: FolderRoot | null;\n /** The role of a Bot folder. ROOT and SKILLS are system roles. */\n readonly botRole?: BotFolderRole | null;\n /** The kind of File held directly by this Bot folder. A Skill package holds its SKILL document, and its references, assets and scripts folders hold ordinary FILEs. Workspace Folders omit this field. */\n readonly contentKind?: FileKind | null;\n /** Free text about the folder. Workspace folders only. */\n description?: string | null;\n /** For workspace folders, PRIVATE covers the owner and the people it is shared with. WORKSPACE and PUBLIC cover wider audiences. A Bot folder reports its filesystem's access and cannot change it. */\n access?: FileAccess | null;\n /** Whether the people the folder is shared with may share it on. Workspace folders only; changing it needs the share capability. */\n shareable?: boolean | null;\n /** Whether the folder's files are indexed for search. Workspace folders only. */\n indexing?: FolderIndexing | null;\n /** The folders directly inside this folder that the caller can read. */\n readonly childCount?: number | null;\n /** The files directly inside this folder that the caller can read. */\n readonly fileCount?: number | null;\n /** The number of Member grants and role grants on a workspace folder. */\n readonly grantCount?: number | null;\n /** The folders from the root down to this folder's parent, in that order. Present only in the FULL view. */\n readonly ancestors?: FolderAncestor[] | null;\n /** The Member who owns a workspace folder. Absent when the owner was removed. */\n readonly createdBy?: FileAuthor | null;\n /** The time a workspace folder was created. */\n readonly createTime?: string | null;\n /** The time a workspace folder's fields last changed. */\n readonly updateTime?: string | null;\n /** What the caller may do to the folder. */\n readonly capabilities?: FolderCallerCapabilities | null;\n /** A value that changes whenever one of the folder's own fields changes. It does not change when files or folders are added to it, so childCount and fileCount can be newer than the etag. Send it on Update, Delete and reindex; a stale value fails with 409 and the code ETAG_MISMATCH. */\n etag?: string | null;\n}\n\n/**\n * One folder on the way from a root down to a folder.\n */\nexport interface FolderAncestor {\n /** The unique identifier of the ancestor folder. */\n id: string;\n /** The name of the ancestor folder. */\n name: string;\n}\n\n/**\n * What the caller may do to the folder.\n */\nexport interface FolderCallerCapabilities {\n /** True when the caller may rename, move or describe the folder. */\n update: boolean;\n /** True when the caller may delete the folder. A Bot folder must also be empty. */\n delete: boolean;\n /** True when the caller may change the folder's access, shareable flag and grants. */\n share: boolean;\n /** True when the caller may create folders and files in the folder. */\n createChildren: boolean;\n}\n\n/**\n * Where a folder's search index is.\n */\nexport type FolderIndexState = typeof FolderIndexState[keyof typeof FolderIndexState];\n\n\nexport const FolderIndexState = {\n NOT_INDEXED: 'NOT_INDEXED',\n INDEXING: 'INDEXING',\n INDEXED: 'INDEXED',\n} as const;\n\n/**\n * Whether a folder's files are searchable, and where the index run is.\n *\n * Only ``enabled`` is writable. Turning it off clears ``state`` to NOT_INDEXED.\n */\nexport interface FolderIndexing {\n /** True when the files in the folder are indexed for search. */\n enabled: boolean;\n /** Where the index is. A reindex starts a run; read the folder again to see it end. */\n readonly state?: FolderIndexState | null;\n /** The time the latest index run started. Absent when none has. */\n readonly startTime?: string | null;\n /** The time the latest index run finished. Absent when none has. */\n readonly completeTime?: string | null;\n}\n\n/**\n * What makes a folder a root of the tree. A root cannot be deleted or moved.\n *\n * These are the folders the workspace or the Bot creates and points at; no other\n * folder has a ``root`` value. A workspace's roots are ``WORKSPACE``, ``HOME``,\n * ``MEMORY``, ``SITE`` and ``WORKFLOW``. An organization Bot's are ``BOT``\n * (the team's files), ``ME`` (the caller's own) and ``AUDIENCE`` (one standing\n * audience's), which are the ``/Bot``, ``/Me`` and audience filesystems.\n */\nexport type FolderRoot = typeof FolderRoot[keyof typeof FolderRoot];\n\n\nexport const FolderRoot = {\n WORKSPACE: 'WORKSPACE',\n HOME: 'HOME',\n MEMORY: 'MEMORY',\n SITE: 'SITE',\n WORKFLOW: 'WORKFLOW',\n BOT: 'BOT',\n ME: 'ME',\n AUDIENCE: 'AUDIENCE',\n} as const;\n\n/**\n * One file that matched a search.\n */\nexport interface FolderSearchResult {\n /** The file that matched, in the BASIC view the caller may read. */\n file: File;\n /** The passage of the file that matched, at most 500 characters. */\n snippet: string;\n /** How well the passage matched; higher is better. */\n score: number;\n}\n\n/**\n * The results of a folder search, best first.\n */\nexport interface FolderSearchResults {\n /** The matches, best first. Empty when nothing matched. */\n results: FolderSearchResult[];\n}\n\n/**\n * How much of a folder a Get or List returns. ``FULL`` adds ``ancestors``.\n */\nexport type FolderView = typeof FolderView[keyof typeof FolderView];\n\n\nexport const FolderView = {\n BASIC: 'BASIC',\n FULL: 'FULL',\n} as const;\n\n/**\n * One page of folders.\n */\nexport interface ListFoldersResponse {\n /** The folders on this page. */\n folders: Folder[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * Open a Bot's own filesystems. Empty, because the caller names nothing.\n */\nexport interface OpenBotFoldersRequest { [key: string]: unknown }\n\n/**\n * The path of the folder to read.\n */\nexport interface ReadFolderByPathRequest {\n /**\n * The folder to read: `/Bot` and `/Me` are the filesystems' roots, and each segment below them is a folder name.\n * @minLength 1\n * @maxLength 4096\n */\n path: string;\n}\n\n/**\n * Start a new search index run for a folder.\n */\nexport interface ReindexFolderRequest {\n /** The etag of the folder the caller saw. */\n etag: string;\n}\n\n/**\n * Find the file a wiki-style path names.\n */\nexport interface ResolveFolderRequest {\n /**\n * A path relative to the folder. It may use .. and . segments, and a last segment with no extension also tries a .md file. A path that starts with /gr/workspace/ or /gr/home/ resolves from that root, whatever folder the request names.\n * @minLength 1\n * @maxLength 4096\n */\n path: string;\n}\n\n/**\n * Search the files in a folder.\n */\nexport interface SearchFolderRequest {\n /**\n * The words to search for.\n * @minLength 1\n * @maxLength 500\n */\n query: string;\n /**\n * The most results to return.\n * @minimum 1\n * @maximum 50\n */\n pageSize?: number;\n /** True searches the folder and every folder below it; false searches the folder's own files only. */\n recursive?: boolean;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_grant\n */\n\nimport type { FileAuthor } from './v3_file';\n\n/**\n * Access to one file or folder for one Member, or for every Member with one role.\n */\nexport interface Grant {\n /** The id of the grant, derived from the file or folder id and the Member or role. It is the same for as long as the grantee has access, and a mode change keeps it. */\n readonly id?: string | null;\n /** Who the grant is for: one Member, or every Member with one role. It cannot change; delete the grant and make another. */\n grantee: MemberGrantee | RoleGrantee;\n /** What the grantee may do. */\n mode: GrantMode;\n /** The name of the Member or of the role. */\n readonly displayName?: string | null;\n /** The Member who granted the access. Absent for a role grant. */\n readonly createdBy?: FileAuthor | null;\n /** When the grant was made. Absent for a role grant. */\n readonly createTime?: string | null;\n}\n\n/**\n * What the grantee may do. WRITE includes READ.\n */\nexport type GrantMode = typeof GrantMode[keyof typeof GrantMode];\n\n\nexport const GrantMode = {\n READ: 'READ',\n WRITE: 'WRITE',\n} as const;\n\n/**\n * One page of the grants on a file or folder.\n */\nexport interface ListGrantsResponse {\n /** The grants on this page. */\n grants: Grant[];\n /** Send as pageToken for the next page. Absent on the last page. */\n nextPageToken?: string | null;\n}\n\n/**\n * A grant for one Member.\n */\nexport interface MemberGrantee {\n /** The grant is for one Member. */\n kind: 'MEMBER';\n /** The Member the grant is for. It cannot change. */\n memberId: string;\n}\n\n/**\n * A grant for every Member with one role.\n */\nexport interface RoleGrantee {\n /** The grant is for every Member with one role. */\n kind: 'ROLE';\n /** The role whose Members the grant is for. It cannot change. */\n memberRoleId: string;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_upload\n */\n\n\n/**\n * A presigned POST to object storage, and later the bytes it received.\n */\nexport interface Upload {\n /** The id of the upload, chosen by the caller in the Create `uploadId` query parameter. */\n readonly id?: string | null;\n /** The media type of the bytes. Must be one the workspace accepts for uploads. The POST must send the same value as its Content-Type field. */\n mimeType: string;\n /**\n * On Create, the most bytes the POST may send (1 to 100 MiB). On Get, the real size of the received object.\n * @minimum 1\n * @maximum 104857600\n */\n sizeBytes: number;\n /** The file extension without a dot, from the workspace's allow-list, such as `pdf`. */\n fileExtension: string;\n /** PENDING until the object exists in storage, then RECEIVED. */\n readonly state?: UploadState | null;\n /** The address to POST the form to. Present on Create only. */\n readonly url?: string | null;\n /** The form fields to send with the POST, in this order and before the `file` part. Present on Create only. Their names and values are set by object storage. */\n readonly fields?: UploadFormField[] | null;\n /** When the POST stops being accepted. Present on Create only. */\n readonly expireTime?: string | null;\n}\n\n/**\n * One form field of the presigned POST.\n */\nexport interface UploadFormField {\n /** The form field name, such as `key` or `policy`. */\n name: string;\n /** The value to send for the field, unchanged. */\n value: string;\n}\n\n/**\n * Whether the bytes reached storage.\n */\nexport type UploadState = typeof UploadState[keyof typeof UploadState];\n\n\nexport const UploadState = {\n PENDING: 'PENDING',\n RECEIVED: 'RECEIVED',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: metric_record_definition\n */\n\nimport type { AggregatePredicate, And, Compare, MatchAll, Not, Or, RecordMatch, RelationMatch, SavedFilterRef, SubQueryRef } from './ir';\n\n/**\n * What a record Metric measures.\n */\nexport interface RecordMetricDefinition {\n dataType: number | string;\n where?: And | Or | Not | MatchAll | Compare | RecordMatch | RelationMatch | AggregatePredicate | SubQueryRef | SavedFilterRef | null;\n aggregation: RecordMetricDefinitionAggregation;\n field?: string | null;\n /**\n * @minLength 8\n * @maxLength 200\n * @pattern ^record\\.[A-Za-z_][\\w:\\-]*$\n */\n dateField?: string;\n groupBy?: string | null;\n}\n\nexport type RecordMetricDefinitionAggregation = typeof RecordMetricDefinitionAggregation[keyof typeof RecordMetricDefinitionAggregation];\n\n\nexport const RecordMetricDefinitionAggregation = {\n count: 'count',\n countDistinct: 'countDistinct',\n sum: 'sum',\n avg: 'avg',\n min: 'min',\n max: 'max',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: metric\n */\n\nimport type { RecordMetricDefinition } from './metric_record_definition';\n\n/**\n * On-demand compute of enabled chat-source metrics for one chat.\n */\nexport interface ComputeChatMetricsRequest {\n /**\n * Chat id to evaluate\n * @minimum 1\n */\n chatId: number;\n}\n\n/**\n * Result of an on-demand chat metrics compute.\n */\nexport interface ComputeChatMetricsResponse {\n chatId: number;\n observationCount: number;\n}\n\n/**\n * Create a workspace metric definition.\n */\nexport interface CreateMetricRequest {\n /**\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** Stable identifier; auto-derived from name when omitted. When given, use lowercase letters and digits in words separated by single hyphens (for example 'member-count'). */\n slug?: string | null;\n description?: string | null;\n metricType: MetricType;\n source?: MetricSource;\n kind?: MetricKind;\n unit?: MetricUnit;\n celExpression?: string | null;\n evaluationPrompt?: string | null;\n /**\n * @minimum 0\n * @maximum 1\n */\n passingThreshold?: number;\n sourceConfig?: MetricSourceConfig | null;\n denominator?: MetricDenominator;\n attributionWindowSeconds?: number | null;\n enabled?: boolean;\n chatType?: MetricChatType;\n /** Workflows this chat metric measures. Required for chat metrics — pass [] to mean every workflow, deliberately. Omitting it is an error, so a scope is never chosen by accident. */\n workflowIds?: number[] | null;\n /** Optional goal for this metric — 'reach this value'. */\n targetValue?: number | null;\n /** Optional due date for targetValue. */\n targetDate?: string | null;\n}\n\n/**\n * Which conversation surface a chat metric measures.\n *\n * One metric measures one surface, deliberately. An assignment chat, a\n * sidebar DM and a contributor-input chat are different populations with\n * different success conditions; averaging them yields a number that\n * describes nothing. Want resolution rate for DMs too? That is a second\n * metric, and the two are legitimately comparable side by side.\n *\n * ``manager`` is absent on purpose — workspace-management chats are the\n * operator talking to the product, never a customer outcome.\n */\nexport type MetricChatType = typeof MetricChatType[keyof typeof MetricChatType];\n\n\nexport const MetricChatType = {\n assignment: 'assignment',\n dm: 'dm',\n contributor: 'contributor',\n} as const;\n\n/**\n * Explicit rate denominator — stored on the definition, not a convention.\n *\n * Read it as \"count once per\": what the rate divides by.\n *\n * * ``OBSERVATIONS`` — each observation counts once. For every metric\n * that can exist today that is one per conversation, because a\n * conversation yields exactly one observation.\n * * ``UNIQUE_MEMBERS`` — each Member counts once no matter how many\n * chats they had in the window. Required by pilot agreements written\n * as \"unique clients who respond… multiple responses from the same\n * client count as a single engagement\": a member in a multi-touch\n * journey has several chats, so averaging over observations\n * double-counts them and produces a defensible number that is not the\n * number in the contract.\n *\n * There was briefly a third value, ``CHATS``, reserved so a future\n * message-sourced metric could distinguish \"per observation\" (per\n * message) from \"per conversation\". It computed an identical number to\n * ``OBSERVATIONS`` for every metric that can exist today, so it reached\n * the UI as two buttons producing the same result. Reintroduce it with\n * the ``CHAT_MESSAGE`` source (#22474), when the distinction is real.\n */\nexport type MetricDenominator = typeof MetricDenominator[keyof typeof MetricDenominator];\n\n\nexport const MetricDenominator = {\n observations: 'observations',\n unique_members: 'unique_members',\n} as const;\n\n/**\n * Aggregation semantics for stored values.\n *\n * * ``OBSERVATION`` — one row per subject (chat/message/member/record).\n * Aggregate with avg/sum/count over a window. Must not be last-valued.\n * * ``GAUGE`` — point-in-time count of matching rows. Last-value only;\n * must not be summed across a window. Computed by the ``member_filter``\n * source.\n */\nexport type MetricKind = typeof MetricKind[keyof typeof MetricKind];\n\n\nexport const MetricKind = {\n observation: 'observation',\n gauge: 'gauge',\n} as const;\n\n/**\n * One observation — reason may be PHI; gated by analytics scope.\n */\nexport interface MetricObservationResponse {\n id: number;\n uuid: string;\n metricId: number;\n value: number;\n observedAt: string;\n chatId: number | null;\n memberId: number | null;\n messageId: number | null;\n /** Rubric grader free text — PHI-bearing; omit from aggregate export */\n reason?: string | null;\n modelId?: string | null;\n modelVersion?: string | null;\n evaluationData?: MetricObservationResponseEvaluationData;\n createdAt: string;\n}\n\nexport type MetricObservationResponseEvaluationData = { [key: string]: unknown } | null;\n\n/**\n * API shape for a Metric definition.\n */\nexport interface MetricResponse {\n id: number;\n uuid: string;\n name: string;\n slug: string;\n description: string | null;\n metricType: string;\n source: string;\n kind: string;\n unit: string;\n celExpression: string | null;\n evaluationPrompt: string | null;\n passingThreshold: number;\n sourceConfig: MetricResponseSourceConfig;\n denominator: string;\n attributionWindowSeconds: number | null;\n chatType: string;\n workflowIds: number[];\n targetValue: number | null;\n targetDate: string | null;\n enabled: boolean;\n archived: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type MetricResponseSourceConfig = { [key: string]: unknown } | null;\n\n/**\n * One Metric's outcome in a batch read, so a failure is not mistaken for no data.\n *\n * * ``ok`` — ``series`` holds readings.\n * * ``no_data`` — the Metric was read and the window holds nothing.\n * * ``denied`` — the caller may not read it; ``requiredScope`` names the scope\n * when the denial was a scope gate (closed vocabulary, never PHI).\n * * ``invalid`` — its stored definition or its Form no longer allows a series.\n * * ``unavailable`` — the read timed out or the service was unavailable.\n */\nexport interface MetricSeriesBatchItem {\n metricId: number;\n status: MetricSeriesBatchItemStatus;\n series?: MetricSeriesResponse | null;\n requiredScope?: string | null;\n}\n\nexport type MetricSeriesBatchItemStatus = typeof MetricSeriesBatchItemStatus[keyof typeof MetricSeriesBatchItemStatus];\n\n\nexport const MetricSeriesBatchItemStatus = {\n ok: 'ok',\n no_data: 'no_data',\n denied: 'denied',\n invalid: 'invalid',\n unavailable: 'unavailable',\n} as const;\n\n/**\n * One entry per requested Metric, in the order the ids were requested.\n */\nexport interface MetricSeriesBatchResponse {\n items: MetricSeriesBatchItem[];\n}\n\n/**\n * One time-bucket of aggregated observations.\n */\nexport interface MetricSeriesBucket {\n bucketStart: string;\n value: number | null;\n count: number;\n}\n\n/**\n * The series for one value of a record Metric's group-by field.\n */\nexport interface MetricSeriesGroup {\n /** The group-by field's value for this series — a record value, so PHI-bearing. Null for records with no value in that field. */\n key: string | null;\n buckets: MetricSeriesBucket[];\n overallValue: number | null;\n overallCount: number;\n}\n\n/**\n * Time-series readout for a metric.\n */\nexport interface MetricSeriesResponse {\n metricId: number;\n metricUuid: string;\n metricName: string;\n unit: string;\n kind: string;\n denominator: string;\n aggregation: string;\n bucket: string;\n start: string;\n end: string;\n buckets: MetricSeriesBucket[];\n overallValue: number | null;\n overallCount: number;\n targetValue?: number | null;\n targetDate?: string | null;\n groups?: MetricSeriesGroup[] | null;\n}\n\n/**\n * What triggers computation of a metric observation.\n *\n * * ``CHAT`` — rides ``ChatPostProcessingWorkflow`` after a chat goes quiet.\n * * ``MEMBER_FILTER`` — point-in-time count of Members matching a\n * :class:`~lib.models.workspace.member_filter.MemberFilter`. This is the\n * source that subsumed the former ``MilestoneGoal`` (a named target over a\n * Member cohort at a date); ``source_config`` carries\n * ``{\"member_filter_id\": <id>}``.\n * * ``DATA_RECORD`` — an aggregate over a Form's records, computed through\n * the Query Engine when the series is read. Nothing triggers it and\n * nothing is stored; ``source_config`` carries ``{\"record\": {...}}``.\n *\n * Other sources are reserved for follow-on work.\n */\nexport type MetricSource = typeof MetricSource[keyof typeof MetricSource];\n\n\nexport const MetricSource = {\n chat: 'chat',\n member_filter: 'member_filter',\n data_record: 'data_record',\n} as const;\n\n/**\n * Per-source parameters for a metric definition.\n *\n * Typed rather than a bare ``dict[str, Any]`` because the values are\n * load-bearing at compute time and failure is silent. A chat metric whose\n * ``minMessages`` arrives as ``\"10\"`` was previously ignored outright —\n * ``metric_meets_min_messages`` only honours the key when it is already an\n * ``int`` — so the metric graded conversations the author meant to exclude\n * and nothing said so. ``extra=\"forbid\"`` gives the same treatment to a\n * typo'd key, which used to be stored and quietly do nothing.\n *\n * API keys are camelCase per the naming convention; the persisted JSONB\n * keeps snake_case because that is what ``metric_eval_service`` reads.\n * ``to_storage`` is the only place that translation happens.\n *\n * ``record`` is the exception to the key translation: it is stored under the\n * same key, in the model's own JSON, after\n * ``metric_record_source_service.validate_record_metric_definition`` has\n * checked it against the Form and normalized it.\n */\nexport interface MetricSourceConfig {\n memberFilterId?: number | null;\n minMessages?: number | null;\n record?: RecordMetricDefinition | null;\n}\n\n/**\n * How a metric value is computed.\n *\n * ``EXPRESSION`` is CEL-evaluated (synchronous, deterministic).\n * ``RUBRIC`` is LLM-evaluated (async, probabilistic). Those two mirror\n * :class:`~lib.models.workspace.qualification.CriterionType`.\n *\n * ``FILTER_COUNT`` has no authored expression at all — the value is the\n * number of rows matching a saved filter named in ``source_config``. It\n * pairs with ``source=member_filter`` + ``kind=gauge`` and is what the\n * retired MilestoneGoal computed.\n *\n * ``RECORD_AGGREGATE`` has no authored expression either — the value is an\n * aggregate over a Form's records, defined by\n * :class:`~lib.models.workspace.metric_record_definition.RecordMetricDefinition`\n * in ``source_config[\"record\"]``. It pairs with ``source=data_record`` +\n * ``kind=observation``.\n */\nexport type MetricType = typeof MetricType[keyof typeof MetricType];\n\n\nexport const MetricType = {\n expression: 'expression',\n rubric: 'rubric',\n filter_count: 'filter_count',\n record_aggregate: 'record_aggregate',\n} as const;\n\n/**\n * Display/aggregation hint for the metric's values.\n */\nexport type MetricUnit = typeof MetricUnit[keyof typeof MetricUnit];\n\n\nexport const MetricUnit = {\n rate: 'rate',\n score: 'score',\n count: 'count',\n custom: 'custom',\n} as const;\n\n/**\n * Partial update of a metric definition.\n *\n * ``metricType`` is immutable after create (same rule as ScenarioCriterion).\n */\nexport interface UpdateMetricRequest {\n name?: string | null;\n description?: string | null;\n unit?: MetricUnit | null;\n celExpression?: string | null;\n evaluationPrompt?: string | null;\n passingThreshold?: number | null;\n sourceConfig?: MetricSourceConfig | null;\n denominator?: MetricDenominator | null;\n attributionWindowSeconds?: number | null;\n enabled?: boolean | null;\n archived?: boolean | null;\n workflowIds?: number[] | null;\n targetValue?: number | null;\n targetDate?: string | null;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: enrollment_inquiry\n */\n\n\n/**\n * What the Site's verify step submits when the call-back box is ticked.\n *\n * ``birthday`` is free text on purpose: the Site's own date input accepts the\n * formats :func:`parse_entered_date` accepts, and what the visitor typed is\n * what a coordinator needs to see.\n */\nexport interface CosanEnrollmentInquiryRequest {\n /**\n * @minLength 1\n * @maxLength 256\n */\n fullName: string;\n /**\n * @minLength 1\n * @maxLength 32\n */\n birthday: string;\n /**\n * @minLength 1\n * @maxLength 32\n */\n phone: string;\n email?: string | null;\n recaptchaToken?: string | null;\n}\n\n/**\n * What happened, in closed vocabulary and with no submitted value echoed.\n *\n * ``captured`` — the details matched no Member and one anonymous submission\n * was stored; the page can thank the visitor and stop.\n *\n * ``identity_verified`` — the details DID match, so **nothing was stored**.\n * The visitor edited their way into a successful verification, and the page\n * should send them back through ``POST .../auth/name-dob`` to collect the\n * Site session and continue to scheduling.\n */\nexport interface CosanEnrollmentInquiryResponse {\n outcome: CosanEnrollmentInquiryResponseOutcome;\n}\n\nexport type CosanEnrollmentInquiryResponseOutcome = typeof CosanEnrollmentInquiryResponseOutcome[keyof typeof CosanEnrollmentInquiryResponseOutcome];\n\n\nexport const CosanEnrollmentInquiryResponseOutcome = {\n captured: 'captured',\n identity_verified: 'identity_verified',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: support_request_participant\n */\n\n\n/**\n * Why an account is on a support request.\n *\n * ``recipient`` — an outbound request is addressed to this account.\n * ``cc`` — the account was copied in to follow and reply.\n *\n * Both roles read and reply the same way; the role only says why the\n * account is there.\n */\nexport type SupportRequestParticipantRole = typeof SupportRequestParticipantRole[keyof typeof SupportRequestParticipantRole];\n\n\nexport const SupportRequestParticipantRole = {\n recipient: 'recipient',\n cc: 'cc',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: pilot_program\n */\n\n\n/**\n * All pilot-program config rows the operator asked for.\n */\nexport interface PilotProgramListResponse {\n programs: PilotProgramResponse[];\n total: number;\n includesInactive: boolean;\n}\n\n/**\n * One ``pilot_programs`` config row.\n */\nexport interface PilotProgramResponse {\n id: number;\n uuid: string;\n label: string;\n organizationId?: number | null;\n coveredWorkspaceIds: number[];\n relationshipType: PilotRelationshipType;\n lifecycleStage: PilotStage;\n stageEnteredAt: string;\n allocationMinutes?: number | null;\n allocationPeriodStart?: string | null;\n notifyThresholdPct: number;\n notifyContactLabel?: string | null;\n stalenessThresholdDays: number;\n active: boolean;\n createdAt?: string | null;\n updatedAt?: string | null;\n}\n\n/**\n * How this pilot relates to us commercially.\n *\n * Drives the staleness read: a ``DIRECT_PILOT`` is healthy when its own\n * workspaces are active; a ``PARTNER_CHANNEL`` (co-sale partner / reseller) is\n * healthy on deal + integration activity even with low own-workspace volume.\n */\nexport type PilotRelationshipType = typeof PilotRelationshipType[keyof typeof PilotRelationshipType];\n\n\nexport const PilotRelationshipType = {\n direct_pilot: 'direct_pilot',\n partner_channel: 'partner_channel',\n} as const;\n\n/**\n * The pilot funnel stage (distinct from the churn-risk\n * ``CustomerHealthLifecycleStage`` in the customer-health read model —\n * that answers \"how healthy?\", this answers \"how far through the pilot?\").\n *\n * ``SIGNED``/``LIVE``/``VALUE_EVIDENCED`` are the in-flight stages a staleness\n * watcher covers; ``ON_HOLD`` is a deliberate pause (never paged on); and\n * ``CONVERTED``/``CHURNED`` are terminal outcomes (no staleness signal).\n */\nexport type PilotStage = typeof PilotStage[keyof typeof PilotStage];\n\n\nexport const PilotStage = {\n signed: 'signed',\n live: 'live',\n value_evidenced: 'value_evidenced',\n converted: 'converted',\n on_hold: 'on_hold',\n churned: 'churned',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: bot_admin_chat\n */\n\nimport type { BotChatAttachmentSummary } from './bot_chat_attachment';\nimport type { ChatApprovalDecision } from './chat';\n\nexport interface AdminBotChatSummary {\n key: string;\n kind: AdminBotChatSummaryKind;\n type: AdminBotChatSummaryType;\n organizationUuid: string;\n organizationName: string;\n agentUuid: string;\n agentName: string;\n avatarShape: AdminBotChatSummaryAvatarShape;\n avatarColor: AdminBotChatSummaryAvatarColor;\n agentConfigRevision: number;\n agentStatus: string;\n chatId?: number | null;\n threadUuid?: string | null;\n jobUuid?: string | null;\n coordinatorUuid?: string | null;\n roomUuid?: string | null;\n displayName: string;\n archived?: boolean;\n lastActivityAt: string;\n /** When the other side last wrote and we have not answered since; NULL when the last word was ours or the caller did not ask (waiting=true, implied by sort=waiting) */\n waitingSince?: string | null;\n /** This Chat's local pause, independent of agentStatus */\n paused: boolean;\n revision: number;\n /** A Job for this Chat is queued or working right now */\n responding?: boolean;\n replyHref?: string | null;\n contentAvailable?: boolean;\n /** Why this Chat needs a person now, most urgent reason first */\n attention?: AdminBotChatSummaryAttention;\n /** Staff can mark this Chat addressed to clear it from Needs you */\n addressable?: boolean;\n}\n\n/**\n * Why this Chat needs a person now, most urgent reason first\n */\nexport type AdminBotChatSummaryAttention = typeof AdminBotChatSummaryAttention[keyof typeof AdminBotChatSummaryAttention] | null;\n\n\nexport const AdminBotChatSummaryAttention = {\n waiting: 'waiting',\n replyFailed: 'replyFailed',\n blocked: 'blocked',\n paused: 'paused',\n} as const;\n\nexport type AdminBotChatSummaryAvatarColor = typeof AdminBotChatSummaryAvatarColor[keyof typeof AdminBotChatSummaryAvatarColor];\n\n\nexport const AdminBotChatSummaryAvatarColor = {\n lagoon: 'lagoon',\n mango: 'mango',\n iris: 'iris',\n coral: 'coral',\n cobalt: 'cobalt',\n pistachio: 'pistachio',\n orchid: 'orchid',\n copper: 'copper',\n} as const;\n\nexport type AdminBotChatSummaryAvatarShape = typeof AdminBotChatSummaryAvatarShape[keyof typeof AdminBotChatSummaryAvatarShape];\n\n\nexport const AdminBotChatSummaryAvatarShape = {\n cloud: 'cloud',\n triangle: 'triangle',\n hexagon: 'hexagon',\n circle: 'circle',\n oval: 'oval',\n robot: 'robot',\n woman: 'woman',\n man: 'man',\n} as const;\n\nexport type AdminBotChatSummaryKind = typeof AdminBotChatSummaryKind[keyof typeof AdminBotChatSummaryKind];\n\n\nexport const AdminBotChatSummaryKind = {\n web: 'web',\n room: 'room',\n private: 'private',\n shared: 'shared',\n channel: 'channel',\n coordinator: 'coordinator',\n job: 'job',\n} as const;\n\nexport type AdminBotChatSummaryType = typeof AdminBotChatSummaryType[keyof typeof AdminBotChatSummaryType];\n\n\nexport const AdminBotChatSummaryType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n coordinator: 'coordinator',\n job: 'job',\n} as const;\n\n/**\n * One page of the Chat index.\n *\n * ``nextBefore`` keeps the endpoint's original cursor field name; the\n * canonical ``nextCursor`` carries the same value for new callers.\n */\nexport interface AdminBotChatsResponse {\n items: AdminBotChatSummary[];\n nextCursor?: string | null;\n hasMore: boolean;\n pageSize: number;\n nextBefore?: string | null;\n}\n\nexport interface AdminBotMessageMatch {\n chatKey: string;\n kind: AdminBotMessageMatchKind;\n type: AdminBotMessageMatchType;\n organizationUuid: string;\n organizationName: string;\n agentUuid: string;\n agentName: string;\n messageId: string;\n role: AdminBotMessageMatchRole;\n content: string;\n createdAt: string;\n}\n\nexport type AdminBotMessageMatchKind = typeof AdminBotMessageMatchKind[keyof typeof AdminBotMessageMatchKind];\n\n\nexport const AdminBotMessageMatchKind = {\n web: 'web',\n room: 'room',\n private: 'private',\n shared: 'shared',\n channel: 'channel',\n coordinator: 'coordinator',\n job: 'job',\n} as const;\n\nexport type AdminBotMessageMatchRole = typeof AdminBotMessageMatchRole[keyof typeof AdminBotMessageMatchRole];\n\n\nexport const AdminBotMessageMatchRole = {\n human: 'human',\n agent: 'agent',\n operator: 'operator',\n} as const;\n\nexport type AdminBotMessageMatchType = typeof AdminBotMessageMatchType[keyof typeof AdminBotMessageMatchType];\n\n\nexport const AdminBotMessageMatchType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n coordinator: 'coordinator',\n job: 'job',\n} as const;\n\n/**\n * Read-only content search; the body keeps the raw query out of URL logs.\n */\nexport interface AdminBotMessageSearchRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n q: string;\n organizationUuid?: string | null;\n agentUuid?: string | null;\n type?: AdminBotMessageSearchRequestType;\n before?: string | null;\n /**\n * @minimum 1\n * @maximum 100\n */\n limit?: number;\n}\n\nexport type AdminBotMessageSearchRequestType = typeof AdminBotMessageSearchRequestType[keyof typeof AdminBotMessageSearchRequestType] | null;\n\n\nexport const AdminBotMessageSearchRequestType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n coordinator: 'coordinator',\n job: 'job',\n} as const;\n\nexport interface AdminBotMessageSearchResponse {\n items: AdminBotMessageMatch[];\n nextBefore?: string | null;\n}\n\nexport interface AdminBotNativeMessage {\n id: number;\n role: AdminBotNativeMessageRole;\n content: string;\n createdAt: string;\n actorAccountId?: number | null;\n actorDisplayName?: string | null;\n attachments?: BotChatAttachmentSummary[];\n simulated?: boolean;\n approvalDecision?: ChatApprovalDecision | null;\n}\n\nexport type AdminBotNativeMessageRole = typeof AdminBotNativeMessageRole[keyof typeof AdminBotNativeMessageRole];\n\n\nexport const AdminBotNativeMessageRole = {\n human: 'human',\n agent: 'agent',\n operator: 'operator',\n} as const;\n\nexport interface AdminBotNativeMessagesResponse {\n title: string;\n items: AdminBotNativeMessage[];\n nextBefore?: number | null;\n}\n\nexport interface AdminBotNativeReplyReceipt {\n messageId: number;\n status?: AdminBotNativeReplyReceiptStatus;\n}\n\nexport type AdminBotNativeReplyReceiptStatus = typeof AdminBotNativeReplyReceiptStatus[keyof typeof AdminBotNativeReplyReceiptStatus];\n\n\nexport const AdminBotNativeReplyReceiptStatus = {\n delivered: 'delivered',\n simulated: 'simulated',\n} as const;\n\nexport interface AdminBotNativeReplyRequest {\n requestId: string;\n /** @maxLength 20000 */\n content?: string;\n /** @maxItems 5 */\n attachmentIds?: string[];\n}\n\nexport interface AdminChatArchiveRequest {\n through: string | null;\n}\n\n/**\n * The Chat's addressed mark after the change: IDs and times only.\n */\nexport interface AdminChatAttentionReceipt {\n chatId: number;\n addressedAt?: string | null;\n addressedByAccountId?: number | null;\n}\n\nexport interface AdminChatAttentionRequest {\n addressed: boolean;\n}\n\nexport interface AdminChatNameRequest { [key: string]: unknown }\n\n/**\n * A file a room message carries: its name and type, never its bytes.\n */\nexport interface AdminRoomFile {\n name?: string | null;\n mimeType?: string | null;\n sizeBytes?: number | null;\n}\n\n/**\n * One stored message of a provider room, as staff see it.\n */\nexport interface AdminRoomMessage {\n id: number;\n threadRootId?: number | null;\n senderKind: AdminRoomMessageSenderKind;\n sender: string;\n /** Markdown. A Slack date token (<!date^…>) is kept for the viewer's zone */\n content: string;\n sentAt: string;\n edited?: boolean;\n deleted?: boolean;\n replyCount?: number;\n /** Outbox state of an Agent or staff message */\n delivery?: AdminRoomMessageDelivery;\n deliveryReason?: AdminRoomMessageDeliveryReason;\n actorAccountId?: number | null;\n /** The line that settled the post's buttons, as Markdown */\n resolution?: string | null;\n files?: AdminRoomFile[];\n}\n\n/**\n * Outbox state of an Agent or staff message\n */\nexport type AdminRoomMessageDelivery = typeof AdminRoomMessageDelivery[keyof typeof AdminRoomMessageDelivery] | null;\n\n\nexport const AdminRoomMessageDelivery = {\n pending: 'pending',\n started: 'started',\n delivered: 'delivered',\n uncertain: 'uncertain',\n blocked: 'blocked',\n simulated: 'simulated',\n} as const;\n\nexport type AdminRoomMessageDeliveryReason = typeof AdminRoomMessageDeliveryReason[keyof typeof AdminRoomMessageDeliveryReason] | null;\n\n\nexport const AdminRoomMessageDeliveryReason = {\n authority_refused: 'authority_refused',\n payload_invalid: 'payload_invalid',\n unsupported_provider: 'unsupported_provider',\n identity_ambiguous: 'identity_ambiguous',\n identity_unlinked: 'identity_unlinked',\n already_linked: 'already_linked',\n scope_refused: 'scope_refused',\n delivery_unavailable: 'delivery_unavailable',\n source_unavailable: 'source_unavailable',\n room_unavailable: 'room_unavailable',\n audience_changed: 'audience_changed',\n token_denied: 'token_denied',\n provider_rejected: 'provider_rejected',\n send_not_started: 'send_not_started',\n acceptance_unknown: 'acceptance_unknown',\n expired: 'expired',\n destination_unapproved: 'destination_unapproved',\n root_unreconciled: 'root_unreconciled',\n} as const;\n\nexport type AdminRoomMessageSenderKind = typeof AdminRoomMessageSenderKind[keyof typeof AdminRoomMessageSenderKind];\n\n\nexport const AdminRoomMessageSenderKind = {\n member: 'member',\n external_user: 'external_user',\n agent: 'agent',\n other_bot: 'other_bot',\n operator: 'operator',\n platform: 'platform',\n} as const;\n\nexport interface AdminRoomStaffReplyReceipt {\n messageId: number;\n deliveryId?: number | null;\n created: boolean;\n delivery?: AdminRoomStaffReplyReceiptDelivery;\n}\n\nexport type AdminRoomStaffReplyReceiptDelivery = typeof AdminRoomStaffReplyReceiptDelivery[keyof typeof AdminRoomStaffReplyReceiptDelivery] | null;\n\n\nexport const AdminRoomStaffReplyReceiptDelivery = {\n pending: 'pending',\n started: 'started',\n delivered: 'delivered',\n uncertain: 'uncertain',\n blocked: 'blocked',\n simulated: 'simulated',\n} as const;\n\nexport interface AdminRoomStaffReplyRequest {\n requestId: string;\n /** @maxLength 12000 */\n content?: string;\n /** @maxItems 5 */\n attachmentIds?: string[];\n}\n\n/**\n * The thread's take-over state after the change: IDs only, no message text.\n */\nexport interface AdminRoomTakeOverReceipt {\n rootId: number;\n takenOverByAccountId?: number | null;\n takenOverAt?: string | null;\n}\n\nexport interface AdminRoomTakeOverRequest {\n takenOver: boolean;\n}\n\nexport interface AdminRoomThread {\n root: AdminRoomMessage;\n /** The thread's name: staff's or the generated one; a DM's is the DM's name */\n title?: string | null;\n titleEdited?: boolean;\n engaged: boolean;\n paused: boolean;\n takenOverByAccountId?: number | null;\n takenOverAt?: string | null;\n lastActivityAt: string;\n}\n\nexport interface AdminRoomThreadResponse {\n thread: AdminRoomThread;\n messages: AdminRoomMessage[];\n}\n\n/**\n * The thread's name after the edit; who changed it and when.\n */\nexport interface AdminRoomThreadTitleReceipt {\n rootId: number;\n title: string;\n titleEditedByAccountId?: number | null;\n titleEditedAt?: string | null;\n}\n\nexport interface AdminRoomThreadTitleRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n title: string;\n}\n\nexport interface AdminRoomThreadsResponse {\n title: string;\n roomKind: string;\n items: AdminRoomThread[];\n nextBefore?: number | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,MAAM;AACR;;;ACgBO,IAAM,yCAAyC;AAAA,EACpD,4BAA4B;AAAA,EAC5B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,sBAAsB;AACxB;AAKO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,yBAAyB;AAAA,EACzB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAwIO,IAAM,8BAA8B;AAAA,EACzC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AACZ;AAKO,IAAM,8BAA8B;AAAA,EACzC,KAAK;AAAA,EACL,UAAU;AACZ;AAKO,IAAM,gCAAgC;AAAA,EAC3C,kBAAkB;AAAA,EAClB,yBAAyB;AAAA,EACzB,WAAW;AAAA,EACX,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,0BAA0B;AAC5B;AAKO,IAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACZ;AAyCO,IAAM,qCAAqC;AAAA,EAChD,SAAS;AAAA,EACT,SAAS;AACX;;;AC5QO,IAAM,kBAAkB;AAAA,EAC7B,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,mBAAmB;AACrB;AAKO,IAAM,kBAAkB;AAAA,EAC7B,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AACpB;AA0CO,IAAM,yCAAyC;AAAA,EACpD,cAAc;AAAA,EACd,WAAW;AACb;;;ACyZO,IAAM,gBAAgB;AAAA,EAC3B,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAKO,IAAM,qBAAqB;AAAA,EAChC,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,UAAU;AACZ;AAKO,IAAM,uBAAuB;AAAA,EAClC,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mCAAmC;AAAA,EACnC,iCAAiC;AAAA,EACjC,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,eAAe;AACjB;;;AC1ZO,IAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AACZ;AAsBO,IAAM,iBAAiB;AAAA,EAC5B,QAAQ;AAAA,EACR,OAAO;AACT;AAwBO,IAAM,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AACT;AAqCO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,kBAAkB;AACpB;AAwDO,IAAM,mBAAmB;AAAA,EAC9B,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;AAQO,IAAM,YAAY;AAAA,EACvB,QAAQ;AAAA,EACR,UAAU;AACZ;AAWO,IAAM,WAAW;AAAA,EACtB,OAAO;AAAA,EACP,MAAM;AACR;;;ACxNO,IAAM,mBAAmB;AAAA,EAC9B,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AACX;AA8BO,IAAM,aAAa;AAAA,EACxB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,UAAU;AACZ;AA4BO,IAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;;;AC/IO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,OAAO;AACT;;;ACcO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AACZ;;;ACxBO,IAAM,oCAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,eAAe;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;;;AC2CO,IAAM,iBAAiB;AAAA,EAC5B,YAAY;AAAA,EACZ,IAAI;AAAA,EACJ,aAAa;AACf;AA4BO,IAAM,oBAAoB;AAAA,EAC/B,cAAc;AAAA,EACd,gBAAgB;AAClB;AAcO,IAAM,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,OAAO;AACT;AAsJO,IAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAiDO,IAAM,aAAa;AAAA,EACxB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,kBAAkB;AACpB;AAQO,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AACV;;;AC3SO,IAAM,wCAAwC;AAAA,EACnD,UAAU;AAAA,EACV,mBAAmB;AACrB;;;ACpCO,IAAM,gCAAgC;AAAA,EAC3C,WAAW;AAAA,EACX,IAAI;AACN;;;AC0BO,IAAM,wBAAwB;AAAA,EACnC,cAAc;AAAA,EACd,iBAAiB;AACnB;AAcO,IAAM,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;;;ACoQO,IAAM,iCAAiC;AAAA,EAC5C,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,wBAAwB;AAAA,EACxB,mBAAmB;AACrB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/types/generated/session.ts","../src/types/generated/customer_activity.ts","../src/types/generated/phi_posture.ts","../src/types/generated/workspace.ts","../src/types/generated/v3_file.ts","../src/types/generated/v3_folder.ts","../src/types/generated/v3_grant.ts","../src/types/generated/v3_upload.ts","../src/types/generated/metric_record_definition.ts","../src/types/generated/metric.ts","../src/types/generated/enrollment_inquiry.ts","../src/types/generated/support_request_participant.ts","../src/types/generated/pilot_program.ts","../src/types/generated/bot_admin_chat.ts"],"sourcesContent":["/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: session\n */\n\n\n/**\n * ``{token, sessionKind, expiresAt}`` as sign-in and exchange responses carry it.\n */\nexport interface MintedSessionFields {\n token: string;\n sessionKind: SessionKind;\n expiresAt: string;\n}\n\n/**\n * What ``describe_session_token`` reports about a presented session.\n *\n * ``accountUuid`` / ``switchedFromAccountUuid`` let the frontend check that an\n * account-switch stash belongs to the account that switched (the restore in\n * ``/api/auth/end-temp-session``). Both describe a token the caller already\n * holds.\n */\nexport interface SessionDescription {\n sessionKind: SessionKind;\n expiresAt: string;\n accountUuid?: string | null;\n switchedFromAccountUuid?: string | null;\n}\n\n/**\n * The kind of session a cookie carries, and the kind of host that reads it.\n */\nexport type SessionKind = typeof SessionKind[keyof typeof SessionKind];\n\n\nexport const SessionKind = {\n account: 'account',\n site: 'site',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: customer_activity\n */\n\n\n/**\n * PHI-free aggregate over ALL rows matching the filters (not a page).\n *\n * Counts, ages in hours, thresholds and identifiers only — no titles, review\n * notes, classifier feedback, subject labels, member data or message content\n * is read or returned.\n */\nexport interface CustomerActivityBacklogSummaryResponse {\n generatedAt: string;\n queryVersion: string;\n filters: CustomerActivitySummaryFilters;\n totalCount: number;\n backlogCount: number;\n reviewedCount: number;\n unclassifiedCount?: number;\n oldestBacklogCreatedAt?: string | null;\n oldestBacklogAgeHours?: number | null;\n byStatus: CustomerActivityStatusBucket[];\n bySeverity: CustomerActivitySeverityBucket[];\n bySource: CustomerActivitySourceBucket[];\n throughput: CustomerActivityThroughputWindow[];\n sla: CustomerActivitySlaSummary;\n}\n\n/**\n * What the blind sample of one detector version holds.\n *\n * All three counts leave out events whose outcome is test activity.\n * ``sampleRecorded`` counts the events the detector recorded for a subject it\n * judged clean. ``sampleReviewed`` counts those that carry a reviewer verdict\n * on the ``labels`` claim. ``sampleWithMiss`` counts the reviewed ones where\n * the reviewer added at least one label.\n */\nexport interface CustomerActivityClassifierBlindSample {\n detectorVersion?: string | null;\n sampleRecorded: number;\n sampleReviewed: number;\n sampleWithMiss: number;\n}\n\nexport interface CustomerActivityClassifierDefinitionResponse {\n detectorName: CustomerActivityClassifierDetectorName;\n subjectType: string;\n labels: CustomerActivityClassifierLabel[];\n}\n\nexport type CustomerActivityClassifierDetectorName = typeof CustomerActivityClassifierDetectorName[keyof typeof CustomerActivityClassifierDetectorName];\n\n\nexport const CustomerActivityClassifierDetectorName = {\n assignment_chat_classifier: 'assignment_chat_classifier',\n manager_chat_classifier: 'manager_chat_classifier',\n concierge_chat_classifier: 'concierge_chat_classifier',\n chat_review: 'chat_review',\n a2p_agent_inferred_stop: 'a2p_agent_inferred_stop',\n voice_spoken_opt_out: 'voice_spoken_opt_out',\n} as const;\n\nexport type CustomerActivityClassifierLabel = typeof CustomerActivityClassifierLabel[keyof typeof CustomerActivityClassifierLabel];\n\n\nexport const CustomerActivityClassifierLabel = {\n user_distress: 'user_distress',\n user_confusion: 'user_confusion',\n health_topic_mentioned: 'health_topic_mentioned',\n health_advice_given: 'health_advice_given',\n escalation_failure: 'escalation_failure',\n repeated_tool_failure: 'repeated_tool_failure',\n transcription_quality: 'transcription_quality',\n repetitive_loop: 'repetitive_loop',\n manager_no_response: 'manager_no_response',\n manager_incomplete_task: 'manager_incomplete_task',\n stalled_progress: 'stalled_progress',\n step_limit_reached: 'step_limit_reached',\n docs_or_skill_gap: 'docs_or_skill_gap',\n discovery_thrash: 'discovery_thrash',\n manager_language_mismatch: 'manager_language_mismatch',\n} as const;\n\n/**\n * Reviewer verdicts on one label, for one detector version.\n *\n * ``flagged`` counts events the classifier recorded with the label.\n * ``reviewed`` counts the flagged events that carry a reviewer verdict on the\n * ``labels`` claim (test activity excluded); each of those is either\n * ``confirmed`` (the reviewer kept the label) or ``rejected`` (the reviewer\n * removed it). ``addedByReviewer`` counts judged events where the reviewer\n * added a label the classifier did not predict.\n *\n * ``precision`` is ``confirmed / (confirmed + rejected)`` with a Wilson 95%\n * interval; all three are ``None`` when no flagged event has a verdict, which\n * is a different fact from a precision of zero.\n *\n * ``addedOnSample`` is the part of ``addedByReviewer`` that sits on\n * blind-sample events. ``estimatedMissed`` is ``addedOnSample`` times the\n * response's ``blindSampleRateN``, and ``recall`` is\n * ``confirmed / (confirmed + estimatedMissed)``. Both are ``None`` when the\n * version has no blind-sample event with a verdict, and ``recall`` is also\n * ``None`` when ``confirmed + estimatedMissed`` is zero.\n */\nexport interface CustomerActivityClassifierLabelQuality {\n detectorVersion?: string | null;\n label: CustomerActivityClassifierLabel;\n flagged: number;\n reviewed: number;\n confirmed: number;\n rejected: number;\n addedByReviewer: number;\n precision?: number | null;\n precisionLow?: number | null;\n precisionHigh?: number | null;\n addedOnSample: number;\n estimatedMissed?: number | null;\n recall?: number | null;\n}\n\n/**\n * PHI-free reviewer-verdict aggregate for one classifier detector.\n *\n * Counts, ratios, closed-vocabulary labels and detector versions only — no\n * event id, title, review note or feedback note is returned.\n * ``eventsReviewed`` counts every event with a reviewer verdict on the\n * ``labels`` claim, test activity excluded. A row's ``reviewed`` applies that\n * same test and also requires the row's label among the predicted labels, so\n * a judged event with no predicted label is in ``eventsReviewed`` and in no\n * row's ``reviewed``.\n *\n * ``blindSampleRateN`` is the one-in-N rate at which the detector records the\n * subjects it judges clean, ``None`` for a detector that records no such\n * sample. ``blindSample`` has one entry per detector version that recorded a\n * sample event other than test activity.\n */\nexport interface CustomerActivityClassifierQualityResponse {\n generatedAt: string;\n detectorName: CustomerActivityClassifierDetectorName;\n createdAfter?: string | null;\n eventsTotal: number;\n eventsReviewed: number;\n blindSampleRateN?: number | null;\n blindSample: CustomerActivityClassifierBlindSample[];\n rows: CustomerActivityClassifierLabelQuality[];\n}\n\nexport interface CustomerActivityClassifiersResponse {\n assignmentChatClassifier: CustomerActivityClassifierDefinitionResponse;\n managerChatClassifier: CustomerActivityClassifierDefinitionResponse;\n conciergeChatClassifier: CustomerActivityClassifierDefinitionResponse;\n}\n\nexport interface CustomerActivityEventListResponse {\n items: CustomerActivityEventResponse[];\n total: number;\n page: number;\n pageSize: number;\n totalPages: number;\n}\n\n/**\n * Admin/operator view of one customer-activity event.\n *\n * The list response remains free of operator-authored text. The single-event\n * detail response may include ``reviewNote`` and ``classifierFeedback`` for the\n * internal review workflow.\n */\nexport interface CustomerActivityEventResponse {\n id: number;\n uuid: string;\n accountId?: number | null;\n accountName?: string | null;\n organizationId?: number | null;\n organizationName?: string | null;\n workspaceId?: number | null;\n workspaceName?: string | null;\n subjectType: string;\n subjectRef: string;\n subjectMessageRef?: string | null;\n scopeRef?: string | null;\n evidence?: CustomerActivityTurnEvidence | null;\n title?: string | null;\n labels: string[];\n severity: CustomerActivitySeverity;\n confidence?: number | null;\n score?: number | null;\n source: CustomerActivityEventSource;\n dedupeKey?: string | null;\n detectorName?: CustomerActivityClassifierDetectorName | null;\n detectorVersion?: string | null;\n modelId?: string | null;\n promptVersion?: string | null;\n traceId?: string | null;\n status: CustomerActivityEventStatus;\n reviewOutcome?: CustomerActivityReviewOutcome | null;\n reviewNote?: string | null;\n classifierFeedback?: CustomerActivityEventResponseClassifierFeedback;\n linkUrl?: string | null;\n reviewedByAccountId?: number | null;\n reviewedByName?: string | null;\n reviewedAt?: string | null;\n supportRequestId?: number | null;\n resourceId?: number | null;\n workspaceUuid?: string | null;\n chatClassifierPrompt?: string | null;\n subjectTitle?: string | null;\n subjectSubtitle?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type CustomerActivityEventResponseClassifierFeedback = { [key: string]: unknown } | null;\n\nexport type CustomerActivityEventSource = typeof CustomerActivityEventSource[keyof typeof CustomerActivityEventSource];\n\n\nexport const CustomerActivityEventSource = {\n system: 'system',\n customer: 'customer',\n classifier: 'classifier',\n operator: 'operator',\n} as const;\n\nexport type CustomerActivityEventStatus = typeof CustomerActivityEventStatus[keyof typeof CustomerActivityEventStatus];\n\n\nexport const CustomerActivityEventStatus = {\n new: 'new',\n reviewed: 'reviewed',\n} as const;\n\nexport type CustomerActivityReviewOutcome = typeof CustomerActivityReviewOutcome[keyof typeof CustomerActivityReviewOutcome];\n\n\nexport const CustomerActivityReviewOutcome = {\n no_action_needed: 'no_action_needed',\n support_request_created: 'support_request_created',\n bug_filed: 'bug_filed',\n linked_existing_work: 'linked_existing_work',\n classifier_feedback: 'classifier_feedback',\n test_activity: 'test_activity',\n a2p_suppression_reversed: 'a2p_suppression_reversed',\n} as const;\n\nexport type CustomerActivitySeverity = typeof CustomerActivitySeverity[keyof typeof CustomerActivitySeverity];\n\n\nexport const CustomerActivitySeverity = {\n none: 'none',\n minimal: 'minimal',\n low: 'low',\n medium: 'medium',\n high: 'high',\n critical: 'critical',\n} as const;\n\nexport interface CustomerActivitySeverityBucket {\n severity: CustomerActivitySeverity;\n backlogCount: number;\n reviewedCount: number;\n oldestBacklogAgeHours?: number | null;\n}\n\n/**\n * Open (unreviewed) events at one severity past their review threshold.\n *\n * ``thresholdSource`` travels with the threshold it describes: a breach count\n * must never be readable without both the number that produced it and whether\n * that number is ratified policy or a provisional default.\n */\nexport interface CustomerActivitySlaBucket {\n severity: CustomerActivitySeverity;\n thresholdHours: number;\n thresholdSource: CustomerActivitySlaThresholdSource;\n breachCount: number;\n oldestBacklogAgeHours?: number | null;\n}\n\nexport interface CustomerActivitySlaSummary {\n buckets: CustomerActivitySlaBucket[];\n totalBreachCount: number;\n}\n\n/**\n * Where ONE severity's SLA threshold came from.\n *\n * ``default`` = the provisional in-repo default (see\n * ``lib/services/customer_activity_metrics.py``); ``request`` = the caller\n * supplied it. Tracked per severity rather than per response so that\n * overriding one threshold cannot make the other read as caller-supplied\n * policy when it is still an unratified default.\n */\nexport type CustomerActivitySlaThresholdSource = typeof CustomerActivitySlaThresholdSource[keyof typeof CustomerActivitySlaThresholdSource];\n\n\nexport const CustomerActivitySlaThresholdSource = {\n default: 'default',\n request: 'request',\n} as const;\n\nexport interface CustomerActivitySourceBucket {\n source: CustomerActivityEventSource;\n backlogCount: number;\n reviewedCount: number;\n}\n\nexport interface CustomerActivityStatusBucket {\n status: CustomerActivityEventStatus;\n count: number;\n}\n\n/**\n * Echo of the filters the aggregate was computed under.\n *\n * Identifiers, closed-vocabulary enums and the open-vocabulary\n * ``subjectType`` only — so an exported aggregate carries its own scope and\n * can never be mistaken for a whole-queue figure.\n */\nexport interface CustomerActivitySummaryFilters {\n status?: CustomerActivityEventStatus | null;\n subjectType?: string | null;\n source?: CustomerActivityEventSource | null;\n severity?: CustomerActivitySeverity | null;\n reviewOutcome?: CustomerActivityReviewOutcome | null;\n detectorName?: CustomerActivityClassifierDetectorName | null;\n workspaceId?: number | null;\n organizationId?: number | null;\n accountId?: number | null;\n}\n\n/**\n * Adjudication throughput over a trailing window.\n *\n * ``recordedCount`` counts events created in the window; ``reviewedCount``\n * counts events whose review verdict was recorded in it (``reviewed_at``).\n * Reopening an event clears ``reviewed_at``, so the pair reads as \"arrived vs\n * currently-adjudicated\", and arrival outpacing adjudication is exactly the\n * growing-backlog signal.\n */\nexport interface CustomerActivityThroughputWindow {\n windowHours: number;\n recordedCount: number;\n reviewedCount: number;\n}\n\n/**\n * The facts one judged turn's labels were decided from.\n *\n * Stored in ``customer_activity_events.evidence`` by field name; served by\n * the API in camelCase. Both spellings validate.\n */\nexport interface CustomerActivityTurnEvidence {\n graph: CustomerActivityTurnEvidenceGraph;\n /** @minimum 0 */\n toolCalls: number;\n /** @minimum 0 */\n failedToolCalls: number;\n /** @minimum 0 */\n redundantToolResults: number;\n /** @maxItems 5 */\n topTools: ToolCallCount[];\n runSignal?: CustomerActivityTurnEvidenceRunSignal;\n}\n\nexport type CustomerActivityTurnEvidenceGraph = typeof CustomerActivityTurnEvidenceGraph[keyof typeof CustomerActivityTurnEvidenceGraph];\n\n\nexport const CustomerActivityTurnEvidenceGraph = {\n manager: 'manager',\n agent: 'agent',\n} as const;\n\nexport type CustomerActivityTurnEvidenceRunSignal = typeof CustomerActivityTurnEvidenceRunSignal[keyof typeof CustomerActivityTurnEvidenceRunSignal] | null;\n\n\nexport const CustomerActivityTurnEvidenceRunSignal = {\n step_budget_closeout: 'step_budget_closeout',\n step_limit_error: 'step_limit_error',\n} as const;\n\nexport interface ToolCallCount {\n /** @pattern ^[A-Za-z0-9_.:-]{1,64}$ */\n name: string;\n /** @minimum 1 */\n count: number;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: phi_posture\n */\n\nimport type { DeclaredDataUse } from './organization';\nimport type { PhiDataPolicy, PhiPostureDecision, PhiPostureReasonCode } from './workspace';\n\n/**\n * Whether an ``App`` has been reviewed as fit to carry PHI (ADR-18 §2a).\n *\n * Distinct from ``Builder.is_verified``, which is a display badge on the\n * consent screen: \"we know who published this\" is a weaker claim than \"this\n * app may carry patient data\". Superuser-set and provenance-carrying (a\n * non-:attr:`UNREVIEWED` row must name a reviewer and a review time — the\n * same CHECK-constraint discipline as the workspace posture columns).\n *\n * :attr:`UNREVIEWED` is the system default and means only \"no approval on\n * file\"; :attr:`PHI_DENIED` is an active decision that the app must not carry\n * PHI even where a customer attestation would otherwise lift the restriction.\n */\nexport type AppPhiReviewStatus = typeof AppPhiReviewStatus[keyof typeof AppPhiReviewStatus];\n\n\nexport const AppPhiReviewStatus = {\n unreviewed: 'unreviewed',\n phi_approved: 'phi_approved',\n phi_denied: 'phi_denied',\n} as const;\n\nexport type PhiPolicyReason = typeof PhiPolicyReason[keyof typeof PhiPolicyReason];\n\n\nexport const PhiPolicyReason = {\n initial_classification: 'initial_classification',\n customer_confirmation: 'customer_confirmation',\n agreement_verified: 'agreement_verified',\n scope_change: 'scope_change',\n periodic_review: 'periodic_review',\n correction: 'correction',\n incident_response: 'incident_response',\n} as const;\n\nexport type PhiPolicySource = typeof PhiPolicySource[keyof typeof PhiPolicySource];\n\n\nexport const PhiPolicySource = {\n customer_attestation: 'customer_attestation',\n contract_review: 'contract_review',\n staff_review: 'staff_review',\n legacy_inventory: 'legacy_inventory',\n platform_default: 'platform_default',\n} as const;\n\nexport interface PhiPostureFinding {\n reasonCode: PhiPostureReasonCode;\n organizationId: number;\n workspaceId?: number | null;\n workspaceUuid?: string | null;\n decision: PhiPostureDecision;\n}\n\nexport interface PhiPostureReportResponse {\n generatedAt: string;\n organizationCount: number;\n workspaceCount: number;\n findingCount: number;\n offset: number;\n limit: number;\n nextOffset?: number | null;\n findings: PhiPostureFinding[];\n truncated: boolean;\n}\n\nexport interface PhiPostureTransitionResponse {\n targetType: PhiPostureTransitionResponseTargetType;\n organizationId: number;\n workspaceId?: number | null;\n workspaceUuid?: string | null;\n declaredDataUse?: DeclaredDataUse | null;\n phiDataPolicy?: PhiDataPolicy | null;\n decision?: PhiPostureDecision | null;\n reasonCode?: PhiPostureReasonCode | null;\n policyVersion: string;\n source: string;\n reason: string;\n reviewedAt: string;\n reviewedByAccountId: number;\n reviewDueAt: string;\n}\n\nexport type PhiPostureTransitionResponseTargetType = typeof PhiPostureTransitionResponseTargetType[keyof typeof PhiPostureTransitionResponseTargetType];\n\n\nexport const PhiPostureTransitionResponseTargetType = {\n organization: 'organization',\n workspace: 'workspace',\n} as const;\n\nexport interface UpdateOrganizationPhiPostureRequest {\n /**\n * @minLength 1\n * @maxLength 64\n */\n policyVersion: string;\n source: PhiPolicySource;\n reason: PhiPolicyReason;\n reviewDueAt: string;\n declaredDataUse: DeclaredDataUse;\n}\n\nexport interface UpdateWorkspacePhiPolicyRequest {\n /**\n * @minLength 1\n * @maxLength 64\n */\n policyVersion: string;\n source: PhiPolicySource;\n reason: PhiPolicyReason;\n reviewDueAt: string;\n phiDataPolicy: PhiDataPolicy;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: workspace\n */\n\nimport type { Query } from './ir';\nimport type { ConditionTaskRouting, MatchTaskRouting, OtherwiseTaskRouting, OutcomeTaskRouting } from './task';\n\n/**\n * Organization metadata available through an account's existing memberships.\n */\nexport interface AccountOrganizationDirectoryEntryResponse {\n organizationId: number;\n organizationUuid: string;\n organizationName: string;\n organizationSlug: string;\n organizationLogoUrl: string | null;\n role: string | null;\n hasBillingAccess: boolean;\n matchesOrganizationSearch: boolean;\n}\n\n/**\n * Superuser request to bring a workspace's seeded roles to canonical form.\n *\n * The body is required even for a dry run, and is deliberately not a query\n * parameter: a cookie-authenticated POST with no body is forgeable by a\n * cross-site HTML form (see ``tests/lint/test_csrf_bodyless_mutation_lint.py``),\n * and requiring a JSON body forces a forgery into a 422.\n */\nexport interface AdminCanonicalizeMemberRolesRequest {\n apply?: boolean;\n}\n\n/**\n * Admin request to create a user's membership in a workspace.\n */\nexport interface AdminCreateWorkspaceMemberRequest {\n memberRoleId?: number | null;\n}\n\n/**\n * Request model for admin workspace operations.\n */\nexport interface AdminCreateWorkspaceRequest {\n organizationId: number;\n workspaceUuid?: string | null;\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n resellerId?: number | null;\n templateWorkspaceUuid?: string | null;\n locale?: string | null;\n features?: string[] | null;\n chatClassifierPrompt?: string | null;\n}\n\n/**\n * Admin request to map a site to a workspace.\n */\nexport interface AdminMapSiteRequest {\n workspaceId?: number | null;\n siteUuid: string;\n name?: string | null;\n siteSlug?: string | null;\n externalDomain?: string | null;\n ownerId?: number | null;\n allowSignup?: boolean;\n}\n\n/**\n * Response model for site mappings.\n */\nexport interface AdminSiteMappingResponse {\n id: number;\n siteId: number;\n siteUuid: string;\n siteName: string;\n siteSlug: string;\n externalDomain?: string | null;\n workspaceId: number;\n workspaceUuid: string;\n workspaceName: string;\n workspaceSlug: string;\n createdAt: string;\n updatedAt: string;\n}\n\n/**\n * Admin request to update a user's membership in a workspace.\n */\nexport interface AdminUpdateWorkspaceMemberRequest {\n tosAccepted?: boolean | null;\n memberRoleId?: number | null;\n}\n\n/**\n * Request model for admin workspace operations.\n */\nexport interface AdminUpdateWorkspaceRequest {\n organizationId?: number | null;\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n resellerId?: number | null;\n creatorId?: number | null;\n features?: string[] | null;\n featuresOverride?: AdminUpdateWorkspaceRequestFeaturesOverride;\n themes?: string[] | null;\n locale?: string | null;\n timezone?: string | null;\n chatClassifierPrompt?: string | null;\n}\n\nexport type AdminUpdateWorkspaceRequestFeaturesOverride = {[key: string]: boolean} | null;\n\nexport interface AdminWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n organizationLogoUrl?: string | null;\n signupCode?: string | null;\n createdAt: string;\n userRole: string | null;\n teammateScopes?: string[] | null;\n teammateId?: number | null;\n canManageBundles?: boolean;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n themes?: string[];\n features?: string[] | null;\n featureStatus?: AdminWorkspaceResponseFeatureStatus;\n signupRequestStatus?: string | null;\n status?: number | null;\n templateWorkspaceUuid?: string | null;\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n locale?: string | null;\n timezone?: string | null;\n requiresOrgAuth?: boolean | null;\n authUrl?: string | null;\n creatorId?: number | null;\n creatorName?: string | null;\n dbId?: number | null;\n featuresOverride?: AdminWorkspaceResponseFeaturesOverride;\n billingOwnerId?: number | null;\n billingOwnerName?: string | null;\n subscriptionProductId?: number | null;\n subscriptionProductName?: string | null;\n chatClassifierPrompt?: string | null;\n phiDataPolicy?: PhiDataPolicy;\n phiPostureDecision?: PhiPostureDecision;\n phiPostureReasonCode?: PhiPostureReasonCode;\n phiPolicyVersion?: string | null;\n phiPolicySource?: string | null;\n phiPolicyReason?: string | null;\n phiPolicyReviewedAt?: string | null;\n phiPolicyReviewedByAccountId?: number | null;\n phiPolicyReviewDueAt?: string | null;\n}\n\nexport type AdminWorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\nexport type AdminWorkspaceResponseFeaturesOverride = {[key: string]: boolean} | null;\n\n/**\n * One day of the weekly schedule. Times are wall-clock ``HH:MM``.\n */\nexport interface BusinessHoursDay {\n day: BusinessHoursDayDay;\n enabled: boolean;\n start: string | null;\n end: string | null;\n}\n\nexport type BusinessHoursDayDay = typeof BusinessHoursDayDay[keyof typeof BusinessHoursDayDay];\n\n\nexport const BusinessHoursDayDay = {\n monday: 'monday',\n tuesday: 'tuesday',\n wednesday: 'wednesday',\n thursday: 'thursday',\n friday: 'friday',\n saturday: 'saturday',\n sunday: 'sunday',\n} as const;\n\nexport interface BusinessHoursStatusResponse {\n isBusinessHours: boolean;\n}\n\n/**\n * Typed body for the CLI-facing ``change-org`` / ``change-org/preview``\n * admin endpoints.\n *\n * Typing ``targetOrganizationId`` / ``newCreatorId`` as ``int`` makes FastAPI\n * return 422 on a non-numeric body field instead of letting a string value\n * reach the DB driver. Mirrors the superuser\n * ``WorkspaceMigrationRequest`` model used by the sibling\n * ``POST /admin/org-migration/workspace`` endpoint.\n */\nexport interface ChangeWorkspaceOrgRequest {\n /**\n * ID of the target organization\n * @exclusiveMinimum 0\n */\n targetOrganizationId: number;\n /**\n * Account ID to set as the workspace creator (created or promoted to OWNER in the target org)\n * @exclusiveMinimum 0\n */\n newCreatorId: number;\n}\n\nexport interface ClassifyPhoneResponse {\n phoneType?: string | null;\n}\n\n/**\n * Minimal workspace row for pickers that only need to switch (Lantern).\n *\n * Served by ``GET /api/v2/w/?can_use_device=1``. Deliberately carries no\n * feature map, role, or settings — a companion device chooses a workspace\n * from identity plus the org step-up pair below, and everything else it\n * discovers from inside the workspace it chose. The step-up contract is the\n * same as ``WorkspaceResponse``: ``requiresOrgAuth`` states the org's\n * policy (a definite True/False on every row this route builds); a device\n * can never hold org-session evidence, so ``True`` means \"this switch\n * strands until someone completes org SSO\".\n */\nexport interface CompactWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n requiresOrgAuth?: boolean;\n authUrl?: string | null;\n}\n\nexport interface CostInfo {\n score: number;\n budget: number;\n}\n\n/**\n * Request model for associating data records with assignments.\n */\nexport interface DataRecordAssociationRequest {\n id: number;\n accessMode?: number;\n}\n\nexport interface DeleteMembershipResponse {\n message: string;\n}\n\nexport interface DeleteWorkspaceResponse {\n status: string;\n}\n\nexport interface FirstRunState {\n mode?: string;\n statuses?: FirstRunStateStatuses;\n collapsed?: boolean | null;\n}\n\nexport type FirstRunStateStatuses = {[key: string]: string} | null;\n\n/**\n * Create request for org-scoped workspace creation.\n *\n * Only allows fields appropriate for org admins.\n * Does NOT allow: resellerId, features, featuresOverride, isPublic, allowSignup.\n */\nexport interface OrgCreateWorkspaceRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n name: string;\n slug?: string | null;\n templateWorkspaceUuid?: string | null;\n setupPurpose?: OrgCreateWorkspaceRequestSetupPurpose;\n /** @maxItems 8 */\n setupPurposes?: OrgCreateWorkspaceRequestSetupPurposesItem[];\n bundleUuid?: string | null;\n installBundleUuid?: string | null;\n}\n\nexport type OrgCreateWorkspaceRequestSetupPurpose = typeof OrgCreateWorkspaceRequestSetupPurpose[keyof typeof OrgCreateWorkspaceRequestSetupPurpose] | null;\n\n\nexport const OrgCreateWorkspaceRequestSetupPurpose = {\n patient_enrollment: 'patient_enrollment',\n wellness_checks: 'wellness_checks',\n care_gaps: 'care_gaps',\n post_discharge: 'post_discharge',\n patient_requests: 'patient_requests',\n developer: 'developer',\n just_curious: 'just_curious',\n other: 'other',\n} as const;\n\nexport type OrgCreateWorkspaceRequestSetupPurposesItem = typeof OrgCreateWorkspaceRequestSetupPurposesItem[keyof typeof OrgCreateWorkspaceRequestSetupPurposesItem];\n\n\nexport const OrgCreateWorkspaceRequestSetupPurposesItem = {\n patient_enrollment: 'patient_enrollment',\n wellness_checks: 'wellness_checks',\n care_gaps: 'care_gaps',\n post_discharge: 'post_discharge',\n patient_requests: 'patient_requests',\n developer: 'developer',\n just_curious: 'just_curious',\n other: 'other',\n} as const;\n\n/**\n * Request to join a workspace as an org admin.\n */\nexport interface OrgJoinWorkspaceRequest {\n memberRoleId: number;\n}\n\n/**\n * Response after joining a workspace.\n */\nexport interface OrgJoinWorkspaceResponse {\n memberId: number;\n memberRoleId: number;\n message: string;\n}\n\n/**\n * Organization settings an **org admin** may change.\n *\n * Name, slug, contact details, logo, security contact and MFA requirement.\n *\n * Deliberately a separate model from :class:`UpdateOrganizationRequest`\n * rather than a subset enforced at the route: the privileged field\n * ``enforceCreditLimit`` is *absent from the schema*, so an org admin\n * cannot set it even by crafting the request body. Pydantic ignores\n * unknown keys, and there is no code path from here to that column.\n *\n * It remains superuser-only, on ``PUT /api/v2/admin/organizations/{id}``\n * behind ``Depends(get_superuser)``: ``enforceCreditLimit`` decides whether\n * a customer is hard-blocked (402) at zero credits or merely alerted, i.e.\n * whether they can keep spending.\n *\n * SSO is not here either — it has its own admin-scoped endpoint\n * (``PUT /api/v2/o/{org_uuid}/sso``) with its own audit trail.\n */\nexport interface OrgSettingsUpdateRequest {\n name?: string | null;\n slug?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n logoUrl?: string | null;\n requireMfa?: boolean | null;\n securityContactEmail?: string | null;\n securityContactName?: string | null;\n}\n\n/**\n * Update request for org-scoped workspace updates.\n *\n * Only allows fields that org admins should be able to change.\n * Does NOT allow: features, featuresOverride, organizationId, resellerId,\n * creatorId, themes.\n */\nexport interface OrgUpdateWorkspaceRequest {\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n locale?: string | null;\n timezone?: string | null;\n}\n\n/**\n * Workspace response for org context.\n *\n * Similar to AdminWorkspaceResponse but without superuser-only fields\n * like dbId, featuresOverride, billingOwnerId, etc.\n */\nexport interface OrgWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n signupCode?: string | null;\n createdAt: string;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n status: number;\n features?: string[] | null;\n featureStatus?: OrgWorkspaceResponseFeatureStatus;\n creatorId?: number | null;\n creatorName?: string | null;\n locale?: string | null;\n timezone?: string | null;\n isMember?: boolean;\n labels?: WorkspaceLabelSummary[];\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n}\n\nexport type OrgWorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\n/**\n * One workspace card's expensive half: workspace-schema aggregates.\n *\n * ``myRoleName`` is about the requesting account and is returned to any org\n * member who belongs to the workspace. The counts are org-administrative\n * information and are populated only for ``org:read`` holders; everyone else\n * gets ``None`` (rendered as \"—\" rather than zero, so the UI never implies\n * an empty workspace when it simply may not look).\n *\n * ``schemaReady`` is False while the workspace is still provisioning — its\n * tables do not exist yet, so the counts are absent for a reason the card\n * can explain instead of showing a failure.\n */\nexport interface OrgWorkspaceStatsResponse {\n workspaceUuid: string;\n /** False while the workspace is still provisioning, or when its schema could not be read. The counts are absent in that case. */\n schemaReady?: boolean;\n /** The REQUESTING account's member-role name in this workspace. Null when they have no member row there. */\n myRoleName?: string | null;\n /** Non-archived members in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n memberCount?: number | null;\n /** Published and draft sites in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n siteCount?: number | null;\n /** Email inboxes in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n inboxCount?: number | null;\n /** Non-archived phone numbers in this workspace. NULL — not 0 — when the caller lacks org:read, or when the workspace schema is unreadable (schemaReady=false). Zero means the workspace really is empty. */\n phoneNumberCount?: number | null;\n}\n\n/**\n * One workspace card's cheap half: identity plus a GLB-side count.\n *\n * ``orgMemberCount`` joins workspace membership to org membership. A separate\n * \"all accounts\" tally was tried and dropped: the\n * ``enforce_org_membership_before_workspace`` trigger refuses a workspace\n * membership for an account with no org membership, so the two numbers are\n * equal except in the transient state after an org membership is revoked —\n * a distinction no card was showing.\n */\nexport interface OrgWorkspaceSummaryResponse {\n uuid: string;\n name: string;\n slug: string;\n /** WorkspaceProvisionStatus. 2 = AVAILABLE; anything else means the workspace is still being provisioned. */\n status: number;\n createdAt: string;\n isPublic?: boolean;\n allowSignup?: boolean;\n /** Whether the requesting account has a workspace membership here. */\n isMember?: boolean;\n /** Accounts with access to this workspace who are also members of this organization. */\n orgMemberCount?: number;\n /** The organization's workspace labels on this workspace; empty for a reader without org:read or org:webhooks. */\n labels?: WorkspaceLabelSummary[];\n}\n\n/**\n * Page 1 for each requested organization, from one directory read.\n */\nexport interface OrganizationWorkspaceDirectoryResponse {\n groups: OrganizationWorkspacePageResponse[];\n}\n\n/**\n * First admitted page of one organization's account workspace directory.\n *\n * ``total`` counts ready GLB membership candidates, the same contract as\n * ``PaginatedResponse`` on ``GET /api/v2/w/``. Admission may leave ``items``\n * empty while ``total`` is still positive.\n */\nexport interface OrganizationWorkspacePageResponse {\n organizationUuid: string;\n items: WorkspaceResponse[];\n total: number;\n page: number;\n pageSize: number;\n totalPages: number;\n}\n\nexport type PhiDataPolicy = typeof PhiDataPolicy[keyof typeof PhiDataPolicy];\n\n\nexport const PhiDataPolicy = {\n unclassified: 'unclassified',\n phi_prohibited: 'phi_prohibited',\n phi_permitted: 'phi_permitted',\n} as const;\n\nexport type PhiPostureDecision = typeof PhiPostureDecision[keyof typeof PhiPostureDecision];\n\n\nexport const PhiPostureDecision = {\n allow_non_phi: 'allow_non_phi',\n warn_non_phi: 'warn_non_phi',\n review_required: 'review_required',\n authorization_required: 'authorization_required',\n conflict: 'conflict',\n} as const;\n\nexport type PhiPostureReasonCode = typeof PhiPostureReasonCode[keyof typeof PhiPostureReasonCode];\n\n\nexport const PhiPostureReasonCode = {\n org_unclassified: 'org_unclassified',\n workspace_unclassified: 'workspace_unclassified',\n non_phi_policy_aligned: 'non_phi_policy_aligned',\n phi_expected_workspace_prohibited: 'phi_expected_workspace_prohibited',\n phi_authorization_not_evaluated: 'phi_authorization_not_evaluated',\n phi_coverage_satisfied: 'phi_coverage_satisfied',\n phi_coverage_missing: 'phi_coverage_missing',\n phi_coverage_expired: 'phi_coverage_expired',\n non_phi_org_workspace_permitted: 'non_phi_org_workspace_permitted',\n phi_permitted_org_not_expected: 'phi_permitted_org_not_expected',\n organization_review_expired: 'organization_review_expired',\n workspace_review_expired: 'workspace_review_expired',\n invalid_state: 'invalid_state',\n} as const;\n\nexport interface PublicWorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n createdAt: string;\n allowSignup?: boolean;\n resellerId?: number | null;\n memberRole?: string | null;\n signupRequestStatus?: string | null;\n}\n\nexport interface QueryDataTypeInfo {\n id: number;\n slug: string;\n name: string;\n isCollection: boolean;\n recordFields: RecordFieldInfo[];\n}\n\n/**\n * A labeled choice for a field whose raw values are ids/codes.\n */\nexport interface QueryEnumOption {\n value: unknown;\n label: string;\n color?: string | null;\n}\n\nexport interface QueryFieldInfo {\n path: string;\n type: string;\n operators: string[];\n sortable?: boolean;\n selectable?: boolean;\n enumValues?: unknown[] | null;\n enumOptions?: QueryEnumOption[] | null;\n displayName?: string | null;\n category?: string | null;\n}\n\nexport interface QueryFieldsResponse {\n entities: QueryFieldsResponseEntities;\n aggregateSources: QueryFieldsResponseAggregateSources;\n dataTypes: QueryDataTypeInfo[];\n recordSystemFields: QueryFieldInfo[];\n relations?: QueryFieldsResponseRelations;\n aggregateSourceCategories?: QueryFieldsResponseAggregateSourceCategories;\n}\n\nexport type QueryFieldsResponseAggregateSourceCategories = {[key: string]: {[key: string]: string}};\n\nexport type QueryFieldsResponseAggregateSources = {[key: string]: string[]};\n\nexport type QueryFieldsResponseEntities = {[key: string]: QueryFieldInfo[]};\n\nexport type QueryFieldsResponseRelations = {[key: string]: {[key: string]: QueryFieldInfo[]}};\n\nexport interface QuerySourceFax {\n id: number;\n pdfFileId: number | null;\n receivedAt: string | null;\n}\n\nexport interface RecordFieldInfo {\n slug: string;\n name: string;\n type: string;\n groupable: boolean;\n operators: string[];\n enumValues?: unknown[] | null;\n enumOptions?: QueryEnumOption[] | null;\n}\n\nexport interface RunQueryRequest {\n query: Query;\n mode?: RunQueryRequestMode;\n sourceFaxId?: number | null;\n}\n\nexport type RunQueryRequestMode = typeof RunQueryRequestMode[keyof typeof RunQueryRequestMode] | null;\n\n\nexport const RunQueryRequestMode = {\n rows: 'rows',\n count: 'count',\n aggregate: 'aggregate',\n} as const;\n\nexport interface RunQueryResponse {\n mode: string;\n items?: RunQueryResponseItems;\n nextCursor?: string | null;\n count?: number | null;\n rows?: RunQueryResponseRows;\n warnings?: string[];\n cost?: CostInfo | null;\n sourceFax?: QuerySourceFax | null;\n}\n\nexport type RunQueryResponseItems = { [key: string]: unknown }[] | null;\n\nexport type RunQueryResponseRows = { [key: string]: unknown }[] | null;\n\n/**\n * How the install a workspace was created to make ended.\n *\n * A closed vocabulary, stored in ``workspaces.setup_bundle_outcome`` (its\n * CHECK constraint lists the same values) and returned to clients, so it\n * carries codes and never a message. No value means the install has not\n * finished: setup is still running, or setup itself failed, which the\n * workspace's own status says.\n */\nexport type SetupBundleOutcome = typeof SetupBundleOutcome[keyof typeof SetupBundleOutcome];\n\n\nexport const SetupBundleOutcome = {\n installed: 'installed',\n install_failed: 'install_failed',\n bundle_unavailable: 'bundle_unavailable',\n permission_denied: 'permission_denied',\n release_not_installable: 'release_not_installable',\n} as const;\n\n/**\n * Request model for associating child tasks (parent-child relationships).\n *\n * ``order`` is optional and backward-compatible: when omitted, callers\n * that build associations from a UI-style ``childTasks`` list keep the\n * historical array-index ordering. When provided (e.g. by the workspace\n * transfer importer), it preserves the authored routing order so that\n * automatic routing still selects the lower-order matching child after\n * transfer.\n *\n * The legacy transport names remain compatible. ``celCondition`` describes\n * Path availability; ``choicePrompt`` guides Agent selection. ``autoNext``\n * and ``required`` jointly encode automatic selection when CEL is present.\n * ``required`` is not a Task exit requirement.\n */\nexport interface TaskAssociationRequest {\n taskId: number;\n autoNext: boolean;\n required: boolean;\n choicePrompt?: string | null;\n celCondition?: string | null;\n order?: number | null;\n routing?: OutcomeTaskRouting | MatchTaskRouting | ConditionTaskRouting | OtherwiseTaskRouting | null;\n}\n\n/**\n * Update workspace defaults.\n */\nexport interface UpdateWorkspaceDefaultsRequest {\n defaultPhoneNumberId?: number | null;\n escalationBusinessHours?: BusinessHoursDay[] | null;\n escalationOnlineMessageTemplate?: string | null;\n escalationOfflineMessageTemplate?: string | null;\n escalationNotifiedMessageTemplate?: string | null;\n escalationPausedMessageTemplate?: string | null;\n emailFooter?: string | null;\n defaultReplyToInboxId?: number | null;\n pauseOnEscalate?: boolean | null;\n enableAudioRecording?: boolean | null;\n enableVoicemailDetection?: boolean | null;\n allowDevices?: boolean;\n shortenUrls?: boolean | null;\n transcriptionModel?: string | null;\n}\n\n/**\n * Feature choices from Workspace settings, as ``{slug: enabled}``.\n */\nexport interface UpdateWorkspaceFeaturesRequest {\n features: UpdateWorkspaceFeaturesRequestFeatures;\n}\n\nexport type UpdateWorkspaceFeaturesRequestFeatures = {[key: string]: boolean};\n\n/**\n * Update a workspace.\n */\nexport interface UpdateWorkspaceRequest {\n name?: string | null;\n slug?: string | null;\n signupCode?: string | null;\n isPublic?: boolean | null;\n allowSignup?: boolean | null;\n locale?: string | null;\n timezone?: string | null;\n}\n\nexport interface ValidateQueryResponse {\n valid: boolean;\n cost: CostInfo;\n warnings?: string[];\n errors?: string[];\n}\n\n/**\n * A Workspace an Operator Tools widget session reaches, by name.\n */\nexport interface WidgetWorkspaceResponse {\n uuid: string;\n name: string;\n}\n\n/**\n * Slim view of an OrgDomain for selection in workspace forms.\n *\n * Intentionally smaller than `OrgDomainResponse` — workspace members\n * don't need ownership tokens, DNS records, last-checked timestamps,\n * etc. Just enough to populate a dropdown, pass the uuid back as a\n * foreign reference (e.g. `orgDomainUuid` on inbox creation), and\n * let the UI mark non-verified entries as disabled with a reason.\n */\nexport interface WorkspaceAvailableDomain {\n uuid: string;\n domain: string;\n ownershipStatus: string;\n emailStatus?: string | null;\n siteStatus?: string | null;\n isChildHost?: boolean;\n}\n\nexport interface WorkspaceAvailableDomainsResponse {\n items: WorkspaceAvailableDomain[];\n total: number;\n}\n\n/**\n * Response model for workspace counts.\n */\nexport interface WorkspaceCountsResponse {\n humans: number;\n tasks: number;\n workflows: number;\n inboxes: number;\n phoneNumbers: number;\n chats: number;\n files: number;\n sites: number;\n forms: number;\n}\n\n/**\n * One feature as Workspace settings shows it.\n */\nexport interface WorkspaceFeatureState {\n slug: string;\n name: string;\n description: string;\n category: string;\n icon?: string | null;\n enabled: boolean;\n editable: boolean;\n}\n\n/**\n * Every feature this workspace's plan allows, and whether it is on.\n */\nexport interface WorkspaceFeaturesResponse {\n features: WorkspaceFeatureState[];\n}\n\n/**\n * Request model for joining a workspace.\n */\nexport interface WorkspaceJoinRequest {\n memberRoleId: number;\n orgRole?: string | null;\n}\n\n/**\n * Response model for joining a workspace.\n */\nexport interface WorkspaceJoinResponse {\n success: boolean;\n memberUuid: string;\n memberId: number;\n workspaceUuid: string;\n workspaceName: string;\n memberRoleName: string;\n message: string;\n}\n\n/**\n * A label as it appears on a workspace or in a selector.\n */\nexport interface WorkspaceLabelSummary {\n uuid: string;\n slug: string;\n name: string;\n color: string;\n}\n\nexport interface WorkspaceResponse {\n id: number;\n uuid: string;\n slug: string;\n name: string;\n organizationId: number;\n organizationUuid?: string | null;\n organizationName?: string | null;\n organizationLogoUrl?: string | null;\n signupCode?: string | null;\n createdAt: string;\n userRole: string | null;\n teammateScopes?: string[] | null;\n teammateId?: number | null;\n canManageBundles?: boolean;\n isPublic?: boolean;\n allowSignup?: boolean;\n resellerId?: number | null;\n themes?: string[];\n features?: string[] | null;\n featureStatus?: WorkspaceResponseFeatureStatus;\n signupRequestStatus?: string | null;\n status?: number | null;\n templateWorkspaceUuid?: string | null;\n setupBundleUuid?: string | null;\n setupBundleOutcome?: SetupBundleOutcome | null;\n locale?: string | null;\n timezone?: string | null;\n requiresOrgAuth?: boolean | null;\n authUrl?: string | null;\n}\n\nexport type WorkspaceResponseFeatureStatus = {[key: string]: string} | null;\n\n/**\n * Individual scope metadata.\n */\nexport interface WorkspaceScopeResponse {\n name: string;\n category: string;\n description: string;\n implies?: string[];\n dangerous?: boolean;\n}\n\n/**\n * Response containing all workspace-grantable scopes.\n */\nexport interface WorkspaceScopesListResponse {\n items: WorkspaceScopeResponse[];\n categories: string[];\n}\n\nexport interface WorkspaceSettingsResponse {\n id: number;\n slug: string;\n defaultPhoneNumberId: number | null;\n workspaceFolderId?: number | null;\n escalationBusinessHours: BusinessHoursDay[] | null;\n escalationOnlineMessageTemplate: string | null;\n escalationOfflineMessageTemplate: string | null;\n escalationNotifiedMessageTemplate: string | null;\n escalationPausedMessageTemplate: string | null;\n emailFooter: string | null;\n defaultReplyToInboxId: number | null;\n pauseOnEscalate: boolean;\n sesDomain: string;\n enableAudioRecording: boolean;\n enableVoicemailDetection: boolean;\n allowDevices: boolean;\n shortenUrls: boolean;\n shortenUrlsExampleUrl: string;\n shortenUrlsAvailable: boolean;\n transcriptionModel?: string | null;\n defaultChatModel: string;\n defaultRealtimeModel: string;\n defaultInferenceModel: string;\n defaultVoiceModel: string;\n firstRunMode?: string | null;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_file\n */\n\n\n/**\n * Approve the current revision of a skill, exactly as the reviewer read it.\n */\nexport interface ApproveFileRequest {\n /** The revision the reviewer read. It must be the current revision. */\n revisionId: string;\n /**\n * The SHA-256 of the content the reviewer read, as lowercase hex.\n * @pattern ^[a-f0-9]{64}$\n */\n contentHash: string;\n /** The etag of the file the reviewer saw. */\n etag: string;\n}\n\n/**\n * Content given as bytes.\n */\nexport interface BytesFileContent {\n /** The content is bytes. */\n kind: 'BYTES';\n /**\n * The bytes of the file, base64-encoded (RFC 4648, with padding), at most 7 MiB decoded on a workspace. Send larger content through an Upload (up to 100 MiB).\n * @maxLength 9786712\n */\n data: string;\n}\n\n/**\n * The current content of another File in the same workspace, written as this file's content.\n *\n * A Create with this arm makes a copy of that File. Workspace Files only.\n */\nexport interface CopyFileContent {\n /** The content is another file's. */\n kind: 'FILE';\n /** The File whose current content is copied. The caller must be able to read it; a File the caller cannot see fails with 404. */\n fileId: string;\n}\n\n/**\n * A file in a workspace, or a file or skill of an organization Bot.\n *\n * Create takes this schema. Update takes it as a JSON merge patch: the fields\n * present change, and the others keep their values.\n */\nexport interface File {\n /** The unique identifier of the file. Create takes it as the fileId query parameter. */\n readonly id?: string | null;\n /**\n * The file name, with its extension.\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** What the file is for. A workspace File is always FILE, and a Bot file's kind is the kind of its immediate folder. A Skill package's references, assets and scripts subfolders hold ordinary FILE entries. Ignored on input; an Update cannot change it. */\n readonly kind?: FileKind;\n /**\n * The media type of the content.\n * @minLength 1\n * @maxLength 255\n */\n mimeType: string;\n /** Who can read the File. A workspace File defaults to PRIVATE on Create. A Bot File defaults to the selected folder's access, whether selected by id or path. Only an organization admin can create a team File. */\n access?: FileAccess | null;\n /** A short description of the file. Workspace Files only. Null clears it. */\n description?: string | null;\n /** The ids of the file's labels (file-labels), sorted by label name on output. Workspace Files only. On Create an absent value means no labels; on Update the list replaces all labels. An id that names no label fails with 400 and the code INVALID_FIELD. */\n labelIds?: string[] | null;\n /** The folder that holds the File. Required on a Create in both scopes: name the folder here or in folderPath. Update cannot set it to null: v3 never moves a File out of the folder tree. Absent on output for a File that is in no folder (a workspace chat attachment, for example). */\n folderId?: string | null;\n /** The folder that holds the new File, named as a path instead of folderId: `/Bot/Skills` is the team's Skills folder and `/Me/Skills` is the caller's own. An organization Bot only. Send it or folderId, not both. Never returned. */\n folderPath?: string | null;\n /** Whether the people the file is shared with may share it on. Workspace Files only. Changing it needs the same authority as changing access (capabilities.share). */\n shareable?: boolean | null;\n /** The number of grants on the file, member grants and role grants together. Workspace Files only. */\n readonly grantCount?: number | null;\n /** The content to write. Create with no content makes an empty file; Update with no content keeps the current revision. Never returned. */\n content?: TextFileContent | BytesFileContent | RevisionFileContent | UploadFileContent | CopyFileContent | null;\n /** Whether the file is in use. */\n readonly state?: FileState | null;\n /** The size of the current content in bytes. */\n readonly sizeBytes?: number | null;\n /** The current revision. Absent for a workspace File saved before revisions were kept. */\n readonly revisionId?: string | null;\n /** The number of the current revision; the first revision is 1. */\n readonly revisionNumber?: number | null;\n /** The SHA-256 of the current revision's content, as lowercase hex. Absent when the service did not record it. */\n readonly contentHash?: string | null;\n /** The time the file was created. */\n readonly createTime?: string | null;\n /** The time the file's fields or content last changed. */\n readonly updateTime?: string | null;\n /** Who created the file. Absent when the service did not record it. */\n readonly createdBy?: FileAuthor | null;\n /** Who wrote the current revision. Absent when the service did not record it. */\n readonly updatedBy?: FileAuthor | null;\n /** The package identity and review state of a skill. Present only when kind is SKILL. */\n readonly skill?: FileSkill | null;\n /** What the caller may do to the file. */\n readonly capabilities?: FileCallerCapabilities | null;\n /** True when the caller may ask for this personal file to become the organization's. Organization Bot files only. */\n readonly promotable?: boolean | null;\n /** The caller's open request to share this file, when there is one. Organization Bot files only. */\n readonly pendingRequestUuid?: string | null;\n /** The workspaces whose data this file drew on, sorted. Organization Bot files only; empty when it drew on none. */\n readonly sourceWorkspaceUuids?: string[] | null;\n /** The file's row id in `/api/v2`. Organization Bot files only, and only until the knowledge-request endpoints (which still name a row) move to `/api/v3`. Never send it back. */\n readonly legacyArtifactId?: number | null;\n /** A value that changes whenever the file changes. Send it on Update, Delete, restore and approve; a stale value fails with 409 and the code ETAG_MISMATCH. */\n etag?: string | null;\n}\n\n/**\n * Who can read a file.\n *\n * A workspace File is ``PRIVATE`` (its owner and the people it is shared with),\n * ``WORKSPACE`` or ``PUBLIC``. An organization Bot's file is ``PRIVATE`` (one\n * teammate), ``ORGANIZATION`` or ``AUDIENCE`` (a fixed set of teammates that a\n * Job captured; never set by a caller).\n */\nexport type FileAccess = typeof FileAccess[keyof typeof FileAccess];\n\n\nexport const FileAccess = {\n PRIVATE: 'PRIVATE',\n WORKSPACE: 'WORKSPACE',\n PUBLIC: 'PUBLIC',\n ORGANIZATION: 'ORGANIZATION',\n AUDIENCE: 'AUDIENCE',\n} as const;\n\n/**\n * The person or Bot that wrote a revision.\n */\nexport interface FileAuthor {\n /** Whether a person or a Bot wrote the revision. */\n kind: FileAuthorKind;\n /** The name to show for the author. */\n displayName: string;\n /** The workspace Member who wrote the revision. Absent for a Bot, and for an organization teammate, who has no Member. */\n memberId?: string | null;\n /** The Bot that wrote the revision. Absent when a person wrote it. */\n agentId?: string | null;\n}\n\n/**\n * Who wrote a revision.\n */\nexport type FileAuthorKind = typeof FileAuthorKind[keyof typeof FileAuthorKind];\n\n\nexport const FileAuthorKind = {\n MEMBER: 'MEMBER',\n AGENT: 'AGENT',\n} as const;\n\n/**\n * What the caller may do to the file.\n */\nexport interface FileCallerCapabilities {\n /** True when the caller may change the file's fields or content. */\n update: boolean;\n /** True when the caller may delete the file; for an organization Bot's file, archive it. */\n delete: boolean;\n /** True when the caller may restore the archived file. */\n restore: boolean;\n /** True when the caller may approve the skill's current revision. */\n approve: boolean;\n /** True when the caller may change the file's access and shareable flag, and its grants. Present only on a workspace File; absent on an organization Bot's file. */\n share?: boolean | null;\n}\n\n/**\n * What a file is for. A workspace File is always ``FILE``.\n */\nexport type FileKind = typeof FileKind[keyof typeof FileKind];\n\n\nexport const FileKind = {\n FILE: 'FILE',\n SKILL: 'SKILL',\n} as const;\n\n/**\n * A label that a workspace puts on its Files.\n *\n * Create takes this schema.\n */\nexport interface FileLabel {\n /** The unique identifier of the label. Create takes it as the fileLabelId query parameter. */\n readonly id?: string | null;\n /**\n * The label name. Names are unique in a workspace; a Create whose name is taken receives a numeric suffix, as in /api/v2.\n * @minLength 1\n * @maxLength 64\n */\n name: string;\n /**\n * The label color as six hexadecimal digits, with or without a leading #. The response has the digits in uppercase and no #.\n * @pattern ^#?[0-9a-fA-F]{6}$\n */\n color: string;\n /** A short description of the label. */\n description?: string | null;\n /** The time the label was created. */\n readonly createTime?: string | null;\n /** The time the label last changed. */\n readonly updateTime?: string | null;\n /** A value that changes whenever the label changes. */\n readonly etag?: string | null;\n}\n\n/**\n * The order of a List of files. ``_DESC`` reverses it.\n */\nexport type FileOrder = typeof FileOrder[keyof typeof FileOrder];\n\n\nexport const FileOrder = {\n NAME: 'NAME',\n NAME_DESC: 'NAME_DESC',\n CREATE_TIME: 'CREATE_TIME',\n CREATE_TIME_DESC: 'CREATE_TIME_DESC',\n UPDATE_TIME: 'UPDATE_TIME',\n UPDATE_TIME_DESC: 'UPDATE_TIME_DESC',\n} as const;\n\n/**\n * One saved state of a file's content. A revision never changes.\n */\nexport interface FileRevision {\n /** The unique identifier of the revision. */\n id: string;\n /**\n * The number of the revision within its file; the first is 1.\n * @minimum 1\n */\n number: number;\n /** The media type of the revision's content. */\n mimeType: string;\n /**\n * The size of the revision's content in bytes.\n * @minimum 0\n */\n sizeBytes: number;\n /** The SHA-256 of the content, as lowercase hex. Absent when the service did not record it. */\n contentHash?: string | null;\n /** The time the revision was written. */\n createTime: string;\n /** Who wrote the revision. Absent when the service did not record it. */\n author?: FileAuthor | null;\n}\n\n/**\n * Package identity and review state. Present only on a file whose kind is ``SKILL``.\n */\nexport interface FileSkill {\n /** The package slug, present for a skill stored in a package. */\n packageName?: string | null;\n /** The package document path, present for a skill stored in a package. */\n packagePath?: string | null;\n /** The revision the Bot uses. Absent when no revision is approved yet. */\n approvedRevisionId?: string | null;\n /** True when the current revision waits for a person to approve it. */\n pendingReview: boolean;\n /** What the scanner found in the current revision. Empty when it found nothing. Present only in the FULL view: the scan reads the content. */\n warnings?: FileSkillWarning[] | null;\n /** The scanner's names for the prompt-injection patterns it matched in the current revision, such as ROLE_OVERRIDE. A documented string, because the set grows. Present only in the FULL view. */\n signals?: string[] | null;\n /** The version of the scanner that read the current revision. Present only in the FULL view, and absent when no scanner read it. */\n scannerVersion?: string | null;\n /** The current revision as the reviewer reads it, with invisible characters written out. Present only in the FULL view. */\n reviewText?: string | null;\n}\n\n/**\n * What the skill scanner found in the current revision.\n */\nexport type FileSkillWarning = typeof FileSkillWarning[keyof typeof FileSkillWarning];\n\n\nexport const FileSkillWarning = {\n INVISIBLE_UNICODE: 'INVISIBLE_UNICODE',\n PROMPT_INJECTION_SIGNALS: 'PROMPT_INJECTION_SIGNALS',\n} as const;\n\n/**\n * Whether a file is in use. Only an organization Bot's file is ever ``ARCHIVED``.\n */\nexport type FileState = typeof FileState[keyof typeof FileState];\n\n\nexport const FileState = {\n ACTIVE: 'ACTIVE',\n ARCHIVED: 'ARCHIVED',\n} as const;\n\n/**\n * How much of a file a Get returns.\n *\n * ``FULL`` adds the content scan of a skill: ``skill.warnings``, ``skill.signals``,\n * ``skill.scannerVersion`` and ``skill.reviewText``.\n */\nexport type FileView = typeof FileView[keyof typeof FileView];\n\n\nexport const FileView = {\n BASIC: 'BASIC',\n FULL: 'FULL',\n} as const;\n\n/**\n * One page of file labels.\n */\nexport interface ListFileLabelsResponse {\n /** The labels on this page. */\n fileLabels: FileLabel[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * One page of a file's revisions, newest first.\n */\nexport interface ListFileRevisionsResponse {\n /** The revisions on this page. */\n revisions: FileRevision[];\n /** The token that reads older revisions. Absent when there are none. */\n nextPageToken?: string | null;\n}\n\n/**\n * One page of files.\n */\nexport interface ListFilesResponse {\n /** The files on this page. */\n files: File[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * Restore an archived organization Bot's file.\n */\nexport interface RestoreFileRequest {\n /** The etag of the file the caller saw. */\n etag: string;\n}\n\n/**\n * The content of an earlier revision of the same file, written as a new revision.\n */\nexport interface RevisionFileContent {\n /** The content is an earlier revision's. */\n kind: 'REVISION';\n /** The revision whose content becomes the new revision. */\n revisionId: string;\n}\n\n/**\n * Content given as text, stored as UTF-8.\n */\nexport interface TextFileContent {\n /** The content is text. */\n kind: 'TEXT';\n /**\n * The text of the file, at most 7 MiB once encoded as UTF-8 on a workspace. Send larger content through an Upload (up to 100 MiB).\n * @maxLength 7340032\n */\n text: string;\n}\n\n/**\n * The bytes the caller uploaded through an Upload. Workspace Files only.\n */\nexport interface UploadFileContent {\n /** The content is an uploaded object. */\n kind: 'UPLOAD';\n /** The Upload that holds the bytes. It must be RECEIVED and belong to the caller; an Upload that is not RECEIVED fails with 400 and the code UPLOAD_NOT_RECEIVED. */\n uploadId: string;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_folder\n */\n\nimport type { File, FileAccess, FileAuthor, FileKind } from './v3_file';\n\nexport type BotFolderRole = typeof BotFolderRole[keyof typeof BotFolderRole];\n\n\nexport const BotFolderRole = {\n ROOT: 'ROOT',\n SKILLS: 'SKILLS',\n FOLDER: 'FOLDER',\n} as const;\n\n/**\n * A folder of files and folders.\n *\n * Create takes this schema; ``name`` is required and the parent is ``parentId``\n * (or, for an organization Bot, ``parentPath``). Update takes it as a JSON\n * merge patch: the fields present change, and the others keep their values.\n */\nexport interface Folder {\n /** The unique identifier of the folder. Create takes it as the folderId query parameter. */\n readonly id?: string | null;\n /**\n * The folder name. It is unique among the folders in the same parent.\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** The folder that holds this folder. Absent on a folder with no parent, such as the workspace root. Required on Create. Update moves the folder; a move into the folder's own subtree fails with 400 and the code FOLDER_CYCLE. */\n parentId?: string | null;\n /** The folder that holds the new folder, named as a path instead of parentId. An organization Bot only. Send it or parentId, not both. */\n parentPath?: string | null;\n /** What makes the folder a root. Absent on every other folder. */\n readonly root?: FolderRoot | null;\n /** The role of a Bot folder. ROOT and SKILLS are system roles. */\n readonly botRole?: BotFolderRole | null;\n /** The kind of File held directly by this Bot folder. A Skill package holds its SKILL document, and its references, assets and scripts folders hold ordinary FILEs. Workspace Folders omit this field. */\n readonly contentKind?: FileKind | null;\n /** Free text about the folder. Workspace folders only. */\n description?: string | null;\n /** For workspace folders, PRIVATE covers the owner and the people it is shared with. WORKSPACE and PUBLIC cover wider audiences. A Bot folder reports its filesystem's access and cannot change it. */\n access?: FileAccess | null;\n /** Whether the people the folder is shared with may share it on. Workspace folders only; changing it needs the share capability. */\n shareable?: boolean | null;\n /** Whether the folder's files are indexed for search. Workspace folders only. */\n indexing?: FolderIndexing | null;\n /** The folders directly inside this folder that the caller can read. */\n readonly childCount?: number | null;\n /** The files directly inside this folder that the caller can read. */\n readonly fileCount?: number | null;\n /** The number of Member grants and role grants on a workspace folder. */\n readonly grantCount?: number | null;\n /** The folders from the root down to this folder's parent, in that order. Present only in the FULL view. */\n readonly ancestors?: FolderAncestor[] | null;\n /** The Member who owns a workspace folder. Absent when the owner was removed. */\n readonly createdBy?: FileAuthor | null;\n /** The time a workspace folder was created. */\n readonly createTime?: string | null;\n /** The time a workspace folder's fields last changed. */\n readonly updateTime?: string | null;\n /** What the caller may do to the folder. */\n readonly capabilities?: FolderCallerCapabilities | null;\n /** A value that changes whenever one of the folder's own fields changes. It does not change when files or folders are added to it, so childCount and fileCount can be newer than the etag. Send it on Update, Delete and reindex; a stale value fails with 409 and the code ETAG_MISMATCH. */\n etag?: string | null;\n}\n\n/**\n * One folder on the way from a root down to a folder.\n */\nexport interface FolderAncestor {\n /** The unique identifier of the ancestor folder. */\n id: string;\n /** The name of the ancestor folder. */\n name: string;\n}\n\n/**\n * What the caller may do to the folder.\n */\nexport interface FolderCallerCapabilities {\n /** True when the caller may rename, move or describe the folder. */\n update: boolean;\n /** True when the caller may delete the folder. A Bot folder must also be empty. */\n delete: boolean;\n /** True when the caller may change the folder's access, shareable flag and grants. */\n share: boolean;\n /** True when the caller may create folders and files in the folder. */\n createChildren: boolean;\n}\n\n/**\n * Where a folder's search index is.\n */\nexport type FolderIndexState = typeof FolderIndexState[keyof typeof FolderIndexState];\n\n\nexport const FolderIndexState = {\n NOT_INDEXED: 'NOT_INDEXED',\n INDEXING: 'INDEXING',\n INDEXED: 'INDEXED',\n} as const;\n\n/**\n * Whether a folder's files are searchable, and where the index run is.\n *\n * Only ``enabled`` is writable. Turning it off clears ``state`` to NOT_INDEXED.\n */\nexport interface FolderIndexing {\n /** True when the files in the folder are indexed for search. */\n enabled: boolean;\n /** Where the index is. A reindex starts a run; read the folder again to see it end. */\n readonly state?: FolderIndexState | null;\n /** The time the latest index run started. Absent when none has. */\n readonly startTime?: string | null;\n /** The time the latest index run finished. Absent when none has. */\n readonly completeTime?: string | null;\n}\n\n/**\n * What makes a folder a root of the tree. A root cannot be deleted or moved.\n *\n * These are the folders the workspace or the Bot creates and points at; no other\n * folder has a ``root`` value. A workspace's roots are ``WORKSPACE``, ``HOME``,\n * ``MEMORY``, ``SITE`` and ``WORKFLOW``. An organization Bot's are ``BOT``\n * (the team's files), ``ME`` (the caller's own) and ``AUDIENCE`` (one standing\n * audience's), which are the ``/Bot``, ``/Me`` and audience filesystems.\n */\nexport type FolderRoot = typeof FolderRoot[keyof typeof FolderRoot];\n\n\nexport const FolderRoot = {\n WORKSPACE: 'WORKSPACE',\n HOME: 'HOME',\n MEMORY: 'MEMORY',\n SITE: 'SITE',\n WORKFLOW: 'WORKFLOW',\n BOT: 'BOT',\n ME: 'ME',\n AUDIENCE: 'AUDIENCE',\n} as const;\n\n/**\n * One file that matched a search.\n */\nexport interface FolderSearchResult {\n /** The file that matched, in the BASIC view the caller may read. */\n file: File;\n /** The passage of the file that matched, at most 500 characters. */\n snippet: string;\n /** How well the passage matched; higher is better. */\n score: number;\n}\n\n/**\n * The results of a folder search, best first.\n */\nexport interface FolderSearchResults {\n /** The matches, best first. Empty when nothing matched. */\n results: FolderSearchResult[];\n}\n\n/**\n * How much of a folder a Get or List returns. ``FULL`` adds ``ancestors``.\n */\nexport type FolderView = typeof FolderView[keyof typeof FolderView];\n\n\nexport const FolderView = {\n BASIC: 'BASIC',\n FULL: 'FULL',\n} as const;\n\n/**\n * One page of folders.\n */\nexport interface ListFoldersResponse {\n /** The folders on this page. */\n folders: Folder[];\n /** The token that reads the next page. Absent when there is no next page. */\n nextPageToken?: string | null;\n}\n\n/**\n * Open a Bot's own filesystems. Empty, because the caller names nothing.\n */\nexport interface OpenBotFoldersRequest { [key: string]: unknown }\n\n/**\n * The path of the folder to read.\n */\nexport interface ReadFolderByPathRequest {\n /**\n * The folder to read: `/Bot` and `/Me` are the filesystems' roots, and each segment below them is a folder name.\n * @minLength 1\n * @maxLength 4096\n */\n path: string;\n}\n\n/**\n * Start a new search index run for a folder.\n */\nexport interface ReindexFolderRequest {\n /** The etag of the folder the caller saw. */\n etag: string;\n}\n\n/**\n * Find the file a wiki-style path names.\n */\nexport interface ResolveFolderRequest {\n /**\n * A path relative to the folder. It may use .. and . segments, and a last segment with no extension also tries a .md file. A path that starts with /gr/workspace/ or /gr/home/ resolves from that root, whatever folder the request names.\n * @minLength 1\n * @maxLength 4096\n */\n path: string;\n}\n\n/**\n * Search the files in a folder.\n */\nexport interface SearchFolderRequest {\n /**\n * The words to search for.\n * @minLength 1\n * @maxLength 500\n */\n query: string;\n /**\n * The most results to return.\n * @minimum 1\n * @maximum 50\n */\n pageSize?: number;\n /** True searches the folder and every folder below it; false searches the folder's own files only. */\n recursive?: boolean;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_grant\n */\n\nimport type { FileAuthor } from './v3_file';\n\n/**\n * Access to one file or folder for one Member, or for every Member with one role.\n */\nexport interface Grant {\n /** The id of the grant, derived from the file or folder id and the Member or role. It is the same for as long as the grantee has access, and a mode change keeps it. */\n readonly id?: string | null;\n /** Who the grant is for: one Member, or every Member with one role. It cannot change; delete the grant and make another. */\n grantee: MemberGrantee | RoleGrantee;\n /** What the grantee may do. */\n mode: GrantMode;\n /** The name of the Member or of the role. */\n readonly displayName?: string | null;\n /** The Member who granted the access. Absent for a role grant. */\n readonly createdBy?: FileAuthor | null;\n /** When the grant was made. Absent for a role grant. */\n readonly createTime?: string | null;\n}\n\n/**\n * What the grantee may do. WRITE includes READ.\n */\nexport type GrantMode = typeof GrantMode[keyof typeof GrantMode];\n\n\nexport const GrantMode = {\n READ: 'READ',\n WRITE: 'WRITE',\n} as const;\n\n/**\n * One page of the grants on a file or folder.\n */\nexport interface ListGrantsResponse {\n /** The grants on this page. */\n grants: Grant[];\n /** Send as pageToken for the next page. Absent on the last page. */\n nextPageToken?: string | null;\n}\n\n/**\n * A grant for one Member.\n */\nexport interface MemberGrantee {\n /** The grant is for one Member. */\n kind: 'MEMBER';\n /** The Member the grant is for. It cannot change. */\n memberId: string;\n}\n\n/**\n * A grant for every Member with one role.\n */\nexport interface RoleGrantee {\n /** The grant is for every Member with one role. */\n kind: 'ROLE';\n /** The role whose Members the grant is for. It cannot change. */\n memberRoleId: string;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: v3_upload\n */\n\n\n/**\n * A presigned POST to object storage, and later the bytes it received.\n */\nexport interface Upload {\n /** The id of the upload, chosen by the caller in the Create `uploadId` query parameter. */\n readonly id?: string | null;\n /** The media type of the bytes. Must be one the workspace accepts for uploads. The POST must send the same value as its Content-Type field. */\n mimeType: string;\n /**\n * On Create, the most bytes the POST may send (1 to 100 MiB). On Get, the real size of the received object.\n * @minimum 1\n * @maximum 104857600\n */\n sizeBytes: number;\n /** The file extension without a dot, from the workspace's allow-list, such as `pdf`. */\n fileExtension: string;\n /** PENDING until the object exists in storage, then RECEIVED. */\n readonly state?: UploadState | null;\n /** The address to POST the form to. Present on Create only. */\n readonly url?: string | null;\n /** The form fields to send with the POST, in this order and before the `file` part. Present on Create only. Their names and values are set by object storage. */\n readonly fields?: UploadFormField[] | null;\n /** When the POST stops being accepted. Present on Create only. */\n readonly expireTime?: string | null;\n}\n\n/**\n * One form field of the presigned POST.\n */\nexport interface UploadFormField {\n /** The form field name, such as `key` or `policy`. */\n name: string;\n /** The value to send for the field, unchanged. */\n value: string;\n}\n\n/**\n * Whether the bytes reached storage.\n */\nexport type UploadState = typeof UploadState[keyof typeof UploadState];\n\n\nexport const UploadState = {\n PENDING: 'PENDING',\n RECEIVED: 'RECEIVED',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: metric_record_definition\n */\n\nimport type { AggregatePredicate, And, Compare, MatchAll, Not, Or, RecordMatch, RelationMatch, SavedFilterRef, SubQueryRef } from './ir';\n\n/**\n * What a record Metric measures.\n */\nexport interface RecordMetricDefinition {\n dataType: number | string;\n where?: And | Or | Not | MatchAll | Compare | RecordMatch | RelationMatch | AggregatePredicate | SubQueryRef | SavedFilterRef | null;\n aggregation: RecordMetricDefinitionAggregation;\n field?: string | null;\n /**\n * @minLength 8\n * @maxLength 200\n * @pattern ^record\\.[A-Za-z_][\\w:\\-]*$\n */\n dateField?: string;\n groupBy?: string | null;\n}\n\nexport type RecordMetricDefinitionAggregation = typeof RecordMetricDefinitionAggregation[keyof typeof RecordMetricDefinitionAggregation];\n\n\nexport const RecordMetricDefinitionAggregation = {\n count: 'count',\n countDistinct: 'countDistinct',\n sum: 'sum',\n avg: 'avg',\n min: 'min',\n max: 'max',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: metric\n */\n\nimport type { RecordMetricDefinition } from './metric_record_definition';\n\n/**\n * On-demand compute of enabled chat-source metrics for one chat.\n */\nexport interface ComputeChatMetricsRequest {\n /**\n * Chat id to evaluate\n * @minimum 1\n */\n chatId: number;\n}\n\n/**\n * Result of an on-demand chat metrics compute.\n */\nexport interface ComputeChatMetricsResponse {\n chatId: number;\n observationCount: number;\n}\n\n/**\n * Create a workspace metric definition.\n */\nexport interface CreateMetricRequest {\n /**\n * @minLength 1\n * @maxLength 255\n */\n name: string;\n /** Stable identifier; auto-derived from name when omitted. When given, use lowercase letters and digits in words separated by single hyphens (for example 'member-count'). */\n slug?: string | null;\n description?: string | null;\n metricType: MetricType;\n source?: MetricSource;\n kind?: MetricKind;\n unit?: MetricUnit;\n celExpression?: string | null;\n evaluationPrompt?: string | null;\n /**\n * @minimum 0\n * @maximum 1\n */\n passingThreshold?: number;\n sourceConfig?: MetricSourceConfig | null;\n denominator?: MetricDenominator;\n attributionWindowSeconds?: number | null;\n enabled?: boolean;\n chatType?: MetricChatType;\n /** Workflows this chat metric measures. Required for chat metrics — pass [] to mean every workflow, deliberately. Omitting it is an error, so a scope is never chosen by accident. */\n workflowIds?: number[] | null;\n /** Optional goal for this metric — 'reach this value'. */\n targetValue?: number | null;\n /** Optional due date for targetValue. */\n targetDate?: string | null;\n}\n\n/**\n * Which conversation surface a chat metric measures.\n *\n * One metric measures one surface, deliberately. An assignment chat, a\n * sidebar DM and a contributor-input chat are different populations with\n * different success conditions; averaging them yields a number that\n * describes nothing. Want resolution rate for DMs too? That is a second\n * metric, and the two are legitimately comparable side by side.\n *\n * ``manager`` is absent on purpose — workspace-management chats are the\n * operator talking to the product, never a customer outcome.\n */\nexport type MetricChatType = typeof MetricChatType[keyof typeof MetricChatType];\n\n\nexport const MetricChatType = {\n assignment: 'assignment',\n dm: 'dm',\n contributor: 'contributor',\n} as const;\n\n/**\n * Explicit rate denominator — stored on the definition, not a convention.\n *\n * Read it as \"count once per\": what the rate divides by.\n *\n * * ``OBSERVATIONS`` — each observation counts once. For every metric\n * that can exist today that is one per conversation, because a\n * conversation yields exactly one observation.\n * * ``UNIQUE_MEMBERS`` — each Member counts once no matter how many\n * chats they had in the window. Required by pilot agreements written\n * as \"unique clients who respond… multiple responses from the same\n * client count as a single engagement\": a member in a multi-touch\n * journey has several chats, so averaging over observations\n * double-counts them and produces a defensible number that is not the\n * number in the contract.\n *\n * There was briefly a third value, ``CHATS``, reserved so a future\n * message-sourced metric could distinguish \"per observation\" (per\n * message) from \"per conversation\". It computed an identical number to\n * ``OBSERVATIONS`` for every metric that can exist today, so it reached\n * the UI as two buttons producing the same result. Reintroduce it with\n * the ``CHAT_MESSAGE`` source (#22474), when the distinction is real.\n */\nexport type MetricDenominator = typeof MetricDenominator[keyof typeof MetricDenominator];\n\n\nexport const MetricDenominator = {\n observations: 'observations',\n unique_members: 'unique_members',\n} as const;\n\n/**\n * Aggregation semantics for stored values.\n *\n * * ``OBSERVATION`` — one row per subject (chat/message/member/record).\n * Aggregate with avg/sum/count over a window. Must not be last-valued.\n * * ``GAUGE`` — point-in-time count of matching rows. Last-value only;\n * must not be summed across a window. Computed by the ``member_filter``\n * source.\n */\nexport type MetricKind = typeof MetricKind[keyof typeof MetricKind];\n\n\nexport const MetricKind = {\n observation: 'observation',\n gauge: 'gauge',\n} as const;\n\n/**\n * One observation — reason may be PHI; gated by analytics scope.\n */\nexport interface MetricObservationResponse {\n id: number;\n uuid: string;\n metricId: number;\n value: number;\n observedAt: string;\n chatId: number | null;\n memberId: number | null;\n messageId: number | null;\n /** Rubric grader free text — PHI-bearing; omit from aggregate export */\n reason?: string | null;\n modelId?: string | null;\n modelVersion?: string | null;\n evaluationData?: MetricObservationResponseEvaluationData;\n createdAt: string;\n}\n\nexport type MetricObservationResponseEvaluationData = { [key: string]: unknown } | null;\n\n/**\n * API shape for a Metric definition.\n */\nexport interface MetricResponse {\n id: number;\n uuid: string;\n name: string;\n slug: string;\n description: string | null;\n metricType: string;\n source: string;\n kind: string;\n unit: string;\n celExpression: string | null;\n evaluationPrompt: string | null;\n passingThreshold: number;\n sourceConfig: MetricResponseSourceConfig;\n denominator: string;\n attributionWindowSeconds: number | null;\n chatType: string;\n workflowIds: number[];\n targetValue: number | null;\n targetDate: string | null;\n enabled: boolean;\n archived: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type MetricResponseSourceConfig = { [key: string]: unknown } | null;\n\n/**\n * One Metric's outcome in a batch read, so a failure is not mistaken for no data.\n *\n * * ``ok`` — ``series`` holds readings.\n * * ``no_data`` — the Metric was read and the window holds nothing.\n * * ``denied`` — the caller may not read it; ``requiredScope`` names the scope\n * when the denial was a scope gate (closed vocabulary, never PHI).\n * * ``invalid`` — its stored definition or its Form no longer allows a series.\n * * ``unavailable`` — the read timed out or the service was unavailable.\n */\nexport interface MetricSeriesBatchItem {\n metricId: number;\n status: MetricSeriesBatchItemStatus;\n series?: MetricSeriesResponse | null;\n requiredScope?: string | null;\n}\n\nexport type MetricSeriesBatchItemStatus = typeof MetricSeriesBatchItemStatus[keyof typeof MetricSeriesBatchItemStatus];\n\n\nexport const MetricSeriesBatchItemStatus = {\n ok: 'ok',\n no_data: 'no_data',\n denied: 'denied',\n invalid: 'invalid',\n unavailable: 'unavailable',\n} as const;\n\n/**\n * One entry per requested Metric, in the order the ids were requested.\n */\nexport interface MetricSeriesBatchResponse {\n items: MetricSeriesBatchItem[];\n}\n\n/**\n * One time-bucket of aggregated observations.\n */\nexport interface MetricSeriesBucket {\n bucketStart: string;\n value: number | null;\n count: number;\n}\n\n/**\n * The series for one value of a record Metric's group-by field.\n */\nexport interface MetricSeriesGroup {\n /** The group-by field's value for this series — a record value, so PHI-bearing. Null for records with no value in that field. */\n key: string | null;\n buckets: MetricSeriesBucket[];\n overallValue: number | null;\n overallCount: number;\n}\n\n/**\n * Time-series readout for a metric.\n */\nexport interface MetricSeriesResponse {\n metricId: number;\n metricUuid: string;\n metricName: string;\n unit: string;\n kind: string;\n denominator: string;\n aggregation: string;\n bucket: string;\n start: string;\n end: string;\n buckets: MetricSeriesBucket[];\n overallValue: number | null;\n overallCount: number;\n targetValue?: number | null;\n targetDate?: string | null;\n groups?: MetricSeriesGroup[] | null;\n}\n\n/**\n * What triggers computation of a metric observation.\n *\n * * ``CHAT`` — rides ``ChatPostProcessingWorkflow`` after a chat goes quiet.\n * * ``MEMBER_FILTER`` — point-in-time count of Members matching a\n * :class:`~lib.models.workspace.member_filter.MemberFilter`. This is the\n * source that subsumed the former ``MilestoneGoal`` (a named target over a\n * Member cohort at a date); ``source_config`` carries\n * ``{\"member_filter_id\": <id>}``.\n * * ``DATA_RECORD`` — an aggregate over a Form's records, computed through\n * the Query Engine when the series is read. Nothing triggers it and\n * nothing is stored; ``source_config`` carries ``{\"record\": {...}}``.\n *\n * Other sources are reserved for follow-on work.\n */\nexport type MetricSource = typeof MetricSource[keyof typeof MetricSource];\n\n\nexport const MetricSource = {\n chat: 'chat',\n member_filter: 'member_filter',\n data_record: 'data_record',\n} as const;\n\n/**\n * Per-source parameters for a metric definition.\n *\n * Typed rather than a bare ``dict[str, Any]`` because the values are\n * load-bearing at compute time and failure is silent. A chat metric whose\n * ``minMessages`` arrives as ``\"10\"`` was previously ignored outright —\n * ``metric_meets_min_messages`` only honours the key when it is already an\n * ``int`` — so the metric graded conversations the author meant to exclude\n * and nothing said so. ``extra=\"forbid\"`` gives the same treatment to a\n * typo'd key, which used to be stored and quietly do nothing.\n *\n * API keys are camelCase per the naming convention; the persisted JSONB\n * keeps snake_case because that is what ``metric_eval_service`` reads.\n * ``to_storage`` is the only place that translation happens.\n *\n * ``record`` is the exception to the key translation: it is stored under the\n * same key, in the model's own JSON, after\n * ``metric_record_source_service.validate_record_metric_definition`` has\n * checked it against the Form and normalized it.\n */\nexport interface MetricSourceConfig {\n memberFilterId?: number | null;\n minMessages?: number | null;\n record?: RecordMetricDefinition | null;\n}\n\n/**\n * How a metric value is computed.\n *\n * ``EXPRESSION`` is CEL-evaluated (synchronous, deterministic).\n * ``RUBRIC`` is LLM-evaluated (async, probabilistic). Those two mirror\n * :class:`~lib.models.workspace.qualification.CriterionType`.\n *\n * ``FILTER_COUNT`` has no authored expression at all — the value is the\n * number of rows matching a saved filter named in ``source_config``. It\n * pairs with ``source=member_filter`` + ``kind=gauge`` and is what the\n * retired MilestoneGoal computed.\n *\n * ``RECORD_AGGREGATE`` has no authored expression either — the value is an\n * aggregate over a Form's records, defined by\n * :class:`~lib.models.workspace.metric_record_definition.RecordMetricDefinition`\n * in ``source_config[\"record\"]``. It pairs with ``source=data_record`` +\n * ``kind=observation``.\n */\nexport type MetricType = typeof MetricType[keyof typeof MetricType];\n\n\nexport const MetricType = {\n expression: 'expression',\n rubric: 'rubric',\n filter_count: 'filter_count',\n record_aggregate: 'record_aggregate',\n} as const;\n\n/**\n * Display/aggregation hint for the metric's values.\n */\nexport type MetricUnit = typeof MetricUnit[keyof typeof MetricUnit];\n\n\nexport const MetricUnit = {\n rate: 'rate',\n score: 'score',\n count: 'count',\n custom: 'custom',\n} as const;\n\n/**\n * Partial update of a metric definition.\n *\n * ``metricType`` is immutable after create (same rule as ScenarioCriterion).\n */\nexport interface UpdateMetricRequest {\n name?: string | null;\n description?: string | null;\n unit?: MetricUnit | null;\n celExpression?: string | null;\n evaluationPrompt?: string | null;\n passingThreshold?: number | null;\n sourceConfig?: MetricSourceConfig | null;\n denominator?: MetricDenominator | null;\n attributionWindowSeconds?: number | null;\n enabled?: boolean | null;\n archived?: boolean | null;\n workflowIds?: number[] | null;\n targetValue?: number | null;\n targetDate?: string | null;\n}\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: enrollment_inquiry\n */\n\n\n/**\n * What the Site's verify step submits when the call-back box is ticked.\n *\n * ``birthday`` is free text on purpose: the Site's own date input accepts the\n * formats :func:`parse_entered_date` accepts, and what the visitor typed is\n * what a coordinator needs to see.\n */\nexport interface CosanEnrollmentInquiryRequest {\n /**\n * @minLength 1\n * @maxLength 256\n */\n fullName: string;\n /**\n * @minLength 1\n * @maxLength 32\n */\n birthday: string;\n /**\n * @minLength 1\n * @maxLength 32\n */\n phone: string;\n email?: string | null;\n recaptchaToken?: string | null;\n}\n\n/**\n * What happened, in closed vocabulary and with no submitted value echoed.\n *\n * ``captured`` — the details matched no Member and one anonymous submission\n * was stored; the page can thank the visitor and stop.\n *\n * ``identity_verified`` — the details DID match, so **nothing was stored**.\n * The visitor edited their way into a successful verification, and the page\n * should send them back through ``POST .../auth/name-dob`` to collect the\n * Site session and continue to scheduling.\n */\nexport interface CosanEnrollmentInquiryResponse {\n outcome: CosanEnrollmentInquiryResponseOutcome;\n}\n\nexport type CosanEnrollmentInquiryResponseOutcome = typeof CosanEnrollmentInquiryResponseOutcome[keyof typeof CosanEnrollmentInquiryResponseOutcome];\n\n\nexport const CosanEnrollmentInquiryResponseOutcome = {\n captured: 'captured',\n identity_verified: 'identity_verified',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: support_request_participant\n */\n\n\n/**\n * Why an account is on a support request.\n *\n * ``recipient`` — an outbound request is addressed to this account.\n * ``cc`` — the account was copied in to follow and reply.\n *\n * Both roles read and reply the same way; the role only says why the\n * account is there.\n */\nexport type SupportRequestParticipantRole = typeof SupportRequestParticipantRole[keyof typeof SupportRequestParticipantRole];\n\n\nexport const SupportRequestParticipantRole = {\n recipient: 'recipient',\n cc: 'cc',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: pilot_program\n */\n\n\n/**\n * All pilot-program config rows the operator asked for.\n */\nexport interface PilotProgramListResponse {\n programs: PilotProgramResponse[];\n total: number;\n includesInactive: boolean;\n}\n\n/**\n * One ``pilot_programs`` config row.\n */\nexport interface PilotProgramResponse {\n id: number;\n uuid: string;\n label: string;\n organizationId?: number | null;\n coveredWorkspaceIds: number[];\n relationshipType: PilotRelationshipType;\n lifecycleStage: PilotStage;\n stageEnteredAt: string;\n allocationMinutes?: number | null;\n allocationPeriodStart?: string | null;\n notifyThresholdPct: number;\n notifyContactLabel?: string | null;\n stalenessThresholdDays: number;\n active: boolean;\n createdAt?: string | null;\n updatedAt?: string | null;\n}\n\n/**\n * How this pilot relates to us commercially.\n *\n * Drives the staleness read: a ``DIRECT_PILOT`` is healthy when its own\n * workspaces are active; a ``PARTNER_CHANNEL`` (co-sale partner / reseller) is\n * healthy on deal + integration activity even with low own-workspace volume.\n */\nexport type PilotRelationshipType = typeof PilotRelationshipType[keyof typeof PilotRelationshipType];\n\n\nexport const PilotRelationshipType = {\n direct_pilot: 'direct_pilot',\n partner_channel: 'partner_channel',\n} as const;\n\n/**\n * The pilot funnel stage (distinct from the churn-risk\n * ``CustomerHealthLifecycleStage`` in the customer-health read model —\n * that answers \"how healthy?\", this answers \"how far through the pilot?\").\n *\n * ``SIGNED``/``LIVE``/``VALUE_EVIDENCED`` are the in-flight stages a staleness\n * watcher covers; ``ON_HOLD`` is a deliberate pause (never paged on); and\n * ``CONVERTED``/``CHURNED`` are terminal outcomes (no staleness signal).\n */\nexport type PilotStage = typeof PilotStage[keyof typeof PilotStage];\n\n\nexport const PilotStage = {\n signed: 'signed',\n live: 'live',\n value_evidenced: 'value_evidenced',\n converted: 'converted',\n on_hold: 'on_hold',\n churned: 'churned',\n} as const;\n","/**\n * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts\n * (group map from emit_openapi.py). Do not edit manually.\n * Group: bot_admin_chat\n */\n\nimport type { BotChatAttachmentSummary } from './bot_chat_attachment';\nimport type { ChatApprovalDecision } from './chat';\n\nexport interface AdminBotChatSummary {\n key: string;\n kind: AdminBotChatSummaryKind;\n type: AdminBotChatSummaryType;\n organizationUuid: string;\n organizationName: string;\n agentUuid: string;\n agentName: string;\n avatarShape: AdminBotChatSummaryAvatarShape;\n avatarColor: AdminBotChatSummaryAvatarColor;\n agentConfigRevision: number;\n agentStatus: string;\n chatId?: number | null;\n threadUuid?: string | null;\n jobUuid?: string | null;\n roomUuid?: string | null;\n displayName: string;\n archived?: boolean;\n lastActivityAt: string;\n /** When the other side last wrote and we have not answered since; NULL when the last word was ours or the caller did not ask (waiting=true, implied by sort=waiting) */\n waitingSince?: string | null;\n /** This Chat's local pause, independent of agentStatus */\n paused: boolean;\n revision: number;\n /** A Job for this Chat is queued or working right now */\n responding?: boolean;\n replyHref?: string | null;\n contentAvailable?: boolean;\n /** Why this Chat needs a person now, most urgent reason first */\n attention?: AdminBotChatSummaryAttention;\n /** Staff can mark this Chat addressed to clear it from Needs you */\n addressable?: boolean;\n}\n\n/**\n * Why this Chat needs a person now, most urgent reason first\n */\nexport type AdminBotChatSummaryAttention = typeof AdminBotChatSummaryAttention[keyof typeof AdminBotChatSummaryAttention] | null;\n\n\nexport const AdminBotChatSummaryAttention = {\n waiting: 'waiting',\n replyFailed: 'replyFailed',\n blocked: 'blocked',\n paused: 'paused',\n} as const;\n\nexport type AdminBotChatSummaryAvatarColor = typeof AdminBotChatSummaryAvatarColor[keyof typeof AdminBotChatSummaryAvatarColor];\n\n\nexport const AdminBotChatSummaryAvatarColor = {\n lagoon: 'lagoon',\n mango: 'mango',\n iris: 'iris',\n coral: 'coral',\n cobalt: 'cobalt',\n pistachio: 'pistachio',\n orchid: 'orchid',\n copper: 'copper',\n} as const;\n\nexport type AdminBotChatSummaryAvatarShape = typeof AdminBotChatSummaryAvatarShape[keyof typeof AdminBotChatSummaryAvatarShape];\n\n\nexport const AdminBotChatSummaryAvatarShape = {\n cloud: 'cloud',\n triangle: 'triangle',\n hexagon: 'hexagon',\n circle: 'circle',\n oval: 'oval',\n robot: 'robot',\n woman: 'woman',\n man: 'man',\n} as const;\n\nexport type AdminBotChatSummaryKind = typeof AdminBotChatSummaryKind[keyof typeof AdminBotChatSummaryKind];\n\n\nexport const AdminBotChatSummaryKind = {\n web: 'web',\n room: 'room',\n private: 'private',\n shared: 'shared',\n channel: 'channel',\n job: 'job',\n} as const;\n\nexport type AdminBotChatSummaryType = typeof AdminBotChatSummaryType[keyof typeof AdminBotChatSummaryType];\n\n\nexport const AdminBotChatSummaryType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n job: 'job',\n} as const;\n\n/**\n * One page of the Chat index.\n *\n * ``nextBefore`` keeps the endpoint's original cursor field name; the\n * canonical ``nextCursor`` carries the same value for new callers.\n */\nexport interface AdminBotChatsResponse {\n items: AdminBotChatSummary[];\n nextCursor?: string | null;\n hasMore: boolean;\n pageSize: number;\n nextBefore?: string | null;\n}\n\nexport interface AdminBotMessageMatch {\n chatKey: string;\n kind: AdminBotMessageMatchKind;\n type: AdminBotMessageMatchType;\n organizationUuid: string;\n organizationName: string;\n agentUuid: string;\n agentName: string;\n messageId: string;\n role: AdminBotMessageMatchRole;\n content: string;\n createdAt: string;\n}\n\nexport type AdminBotMessageMatchKind = typeof AdminBotMessageMatchKind[keyof typeof AdminBotMessageMatchKind];\n\n\nexport const AdminBotMessageMatchKind = {\n web: 'web',\n room: 'room',\n private: 'private',\n shared: 'shared',\n channel: 'channel',\n job: 'job',\n} as const;\n\nexport type AdminBotMessageMatchRole = typeof AdminBotMessageMatchRole[keyof typeof AdminBotMessageMatchRole];\n\n\nexport const AdminBotMessageMatchRole = {\n human: 'human',\n agent: 'agent',\n operator: 'operator',\n} as const;\n\nexport type AdminBotMessageMatchType = typeof AdminBotMessageMatchType[keyof typeof AdminBotMessageMatchType];\n\n\nexport const AdminBotMessageMatchType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n job: 'job',\n} as const;\n\n/**\n * Read-only content search; the body keeps the raw query out of URL logs.\n */\nexport interface AdminBotMessageSearchRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n q: string;\n organizationUuid?: string | null;\n agentUuid?: string | null;\n type?: AdminBotMessageSearchRequestType;\n before?: string | null;\n /**\n * @minimum 1\n * @maximum 100\n */\n limit?: number;\n}\n\nexport type AdminBotMessageSearchRequestType = typeof AdminBotMessageSearchRequestType[keyof typeof AdminBotMessageSearchRequestType] | null;\n\n\nexport const AdminBotMessageSearchRequestType = {\n web: 'web',\n slack: 'slack',\n teams: 'teams',\n discord: 'discord',\n sms: 'sms',\n phone: 'phone',\n job: 'job',\n} as const;\n\nexport interface AdminBotMessageSearchResponse {\n items: AdminBotMessageMatch[];\n nextBefore?: string | null;\n}\n\nexport interface AdminBotNativeMessage {\n id: number;\n role: AdminBotNativeMessageRole;\n content: string;\n createdAt: string;\n actorAccountId?: number | null;\n actorDisplayName?: string | null;\n attachments?: BotChatAttachmentSummary[];\n simulated?: boolean;\n approvalDecision?: ChatApprovalDecision | null;\n}\n\nexport type AdminBotNativeMessageRole = typeof AdminBotNativeMessageRole[keyof typeof AdminBotNativeMessageRole];\n\n\nexport const AdminBotNativeMessageRole = {\n human: 'human',\n agent: 'agent',\n operator: 'operator',\n} as const;\n\nexport interface AdminBotNativeMessagesResponse {\n title: string;\n items: AdminBotNativeMessage[];\n nextBefore?: number | null;\n}\n\nexport interface AdminBotNativeReplyReceipt {\n messageId: number;\n status?: AdminBotNativeReplyReceiptStatus;\n}\n\nexport type AdminBotNativeReplyReceiptStatus = typeof AdminBotNativeReplyReceiptStatus[keyof typeof AdminBotNativeReplyReceiptStatus];\n\n\nexport const AdminBotNativeReplyReceiptStatus = {\n delivered: 'delivered',\n simulated: 'simulated',\n} as const;\n\nexport interface AdminBotNativeReplyRequest {\n requestId: string;\n /** @maxLength 20000 */\n content?: string;\n /** @maxItems 5 */\n attachmentIds?: string[];\n}\n\nexport interface AdminChatArchiveRequest {\n through: string | null;\n}\n\n/**\n * The Chat's addressed mark after the change: IDs and times only.\n */\nexport interface AdminChatAttentionReceipt {\n chatId: number;\n addressedAt?: string | null;\n addressedByAccountId?: number | null;\n}\n\nexport interface AdminChatAttentionRequest {\n addressed: boolean;\n}\n\nexport interface AdminChatNameRequest { [key: string]: unknown }\n\n/**\n * A file a room message carries: its name and type, never its bytes.\n */\nexport interface AdminRoomFile {\n name?: string | null;\n mimeType?: string | null;\n sizeBytes?: number | null;\n}\n\n/**\n * One stored message of a provider room, as staff see it.\n */\nexport interface AdminRoomMessage {\n id: number;\n threadRootId?: number | null;\n senderKind: AdminRoomMessageSenderKind;\n sender: string;\n /** Markdown. A Slack date token (<!date^…>) is kept for the viewer's zone */\n content: string;\n sentAt: string;\n edited?: boolean;\n deleted?: boolean;\n replyCount?: number;\n /** Outbox state of an Agent or staff message */\n delivery?: AdminRoomMessageDelivery;\n deliveryReason?: AdminRoomMessageDeliveryReason;\n actorAccountId?: number | null;\n /** The line that settled the post's buttons, as Markdown */\n resolution?: string | null;\n files?: AdminRoomFile[];\n}\n\n/**\n * Outbox state of an Agent or staff message\n */\nexport type AdminRoomMessageDelivery = typeof AdminRoomMessageDelivery[keyof typeof AdminRoomMessageDelivery] | null;\n\n\nexport const AdminRoomMessageDelivery = {\n pending: 'pending',\n started: 'started',\n delivered: 'delivered',\n uncertain: 'uncertain',\n blocked: 'blocked',\n simulated: 'simulated',\n} as const;\n\nexport type AdminRoomMessageDeliveryReason = typeof AdminRoomMessageDeliveryReason[keyof typeof AdminRoomMessageDeliveryReason] | null;\n\n\nexport const AdminRoomMessageDeliveryReason = {\n authority_refused: 'authority_refused',\n payload_invalid: 'payload_invalid',\n unsupported_provider: 'unsupported_provider',\n identity_ambiguous: 'identity_ambiguous',\n identity_unlinked: 'identity_unlinked',\n already_linked: 'already_linked',\n scope_refused: 'scope_refused',\n delivery_unavailable: 'delivery_unavailable',\n source_unavailable: 'source_unavailable',\n room_unavailable: 'room_unavailable',\n audience_changed: 'audience_changed',\n token_denied: 'token_denied',\n provider_rejected: 'provider_rejected',\n send_not_started: 'send_not_started',\n acceptance_unknown: 'acceptance_unknown',\n expired: 'expired',\n destination_unapproved: 'destination_unapproved',\n root_unreconciled: 'root_unreconciled',\n} as const;\n\nexport type AdminRoomMessageSenderKind = typeof AdminRoomMessageSenderKind[keyof typeof AdminRoomMessageSenderKind];\n\n\nexport const AdminRoomMessageSenderKind = {\n member: 'member',\n external_user: 'external_user',\n agent: 'agent',\n other_bot: 'other_bot',\n operator: 'operator',\n platform: 'platform',\n} as const;\n\nexport interface AdminRoomStaffReplyReceipt {\n messageId: number;\n deliveryId?: number | null;\n created: boolean;\n delivery?: AdminRoomStaffReplyReceiptDelivery;\n}\n\nexport type AdminRoomStaffReplyReceiptDelivery = typeof AdminRoomStaffReplyReceiptDelivery[keyof typeof AdminRoomStaffReplyReceiptDelivery] | null;\n\n\nexport const AdminRoomStaffReplyReceiptDelivery = {\n pending: 'pending',\n started: 'started',\n delivered: 'delivered',\n uncertain: 'uncertain',\n blocked: 'blocked',\n simulated: 'simulated',\n} as const;\n\nexport interface AdminRoomStaffReplyRequest {\n requestId: string;\n /** @maxLength 12000 */\n content?: string;\n /** @maxItems 5 */\n attachmentIds?: string[];\n}\n\n/**\n * The thread's take-over state after the change: IDs only, no message text.\n */\nexport interface AdminRoomTakeOverReceipt {\n rootId: number;\n takenOverByAccountId?: number | null;\n takenOverAt?: string | null;\n}\n\nexport interface AdminRoomTakeOverRequest {\n takenOver: boolean;\n}\n\nexport interface AdminRoomThread {\n root: AdminRoomMessage;\n /** The thread's name: staff's or the generated one; a DM's is the DM's name */\n title?: string | null;\n titleEdited?: boolean;\n engaged: boolean;\n paused: boolean;\n takenOverByAccountId?: number | null;\n takenOverAt?: string | null;\n lastActivityAt: string;\n}\n\nexport interface AdminRoomThreadResponse {\n thread: AdminRoomThread;\n messages: AdminRoomMessage[];\n}\n\n/**\n * The thread's name after the edit; who changed it and when.\n */\nexport interface AdminRoomThreadTitleReceipt {\n rootId: number;\n title: string;\n titleEditedByAccountId?: number | null;\n titleEditedAt?: string | null;\n}\n\nexport interface AdminRoomThreadTitleRequest {\n /**\n * @minLength 1\n * @maxLength 200\n */\n title: string;\n}\n\nexport interface AdminRoomThreadsResponse {\n title: string;\n roomKind: string;\n items: AdminRoomThread[];\n nextBefore?: number | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,MAAM;AACR;;;ACgBO,IAAM,yCAAyC;AAAA,EACpD,4BAA4B;AAAA,EAC5B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,sBAAsB;AACxB;AAKO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,yBAAyB;AAAA,EACzB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAwIO,IAAM,8BAA8B;AAAA,EACzC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AACZ;AAKO,IAAM,8BAA8B;AAAA,EACzC,KAAK;AAAA,EACL,UAAU;AACZ;AAKO,IAAM,gCAAgC;AAAA,EAC3C,kBAAkB;AAAA,EAClB,yBAAyB;AAAA,EACzB,WAAW;AAAA,EACX,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,0BAA0B;AAC5B;AAKO,IAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACZ;AAyCO,IAAM,qCAAqC;AAAA,EAChD,SAAS;AAAA,EACT,SAAS;AACX;;;AC5QO,IAAM,kBAAkB;AAAA,EAC7B,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,mBAAmB;AACrB;AAKO,IAAM,kBAAkB;AAAA,EAC7B,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AACpB;AA0CO,IAAM,yCAAyC;AAAA,EACpD,cAAc;AAAA,EACd,WAAW;AACb;;;ACyZO,IAAM,gBAAgB;AAAA,EAC3B,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAKO,IAAM,qBAAqB;AAAA,EAChC,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,UAAU;AACZ;AAKO,IAAM,uBAAuB;AAAA,EAClC,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mCAAmC;AAAA,EACnC,iCAAiC;AAAA,EACjC,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,eAAe;AACjB;;;AC1ZO,IAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AACZ;AAsBO,IAAM,iBAAiB;AAAA,EAC5B,QAAQ;AAAA,EACR,OAAO;AACT;AAwBO,IAAM,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AACT;AAqCO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,kBAAkB;AACpB;AAwDO,IAAM,mBAAmB;AAAA,EAC9B,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;AAQO,IAAM,YAAY;AAAA,EACvB,QAAQ;AAAA,EACR,UAAU;AACZ;AAWO,IAAM,WAAW;AAAA,EACtB,OAAO;AAAA,EACP,MAAM;AACR;;;ACxNO,IAAM,mBAAmB;AAAA,EAC9B,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AACX;AA8BO,IAAM,aAAa;AAAA,EACxB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,UAAU;AACZ;AA4BO,IAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;;;AC/IO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,OAAO;AACT;;;ACcO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,UAAU;AACZ;;;ACxBO,IAAM,oCAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,eAAe;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;;;AC2CO,IAAM,iBAAiB;AAAA,EAC5B,YAAY;AAAA,EACZ,IAAI;AAAA,EACJ,aAAa;AACf;AA4BO,IAAM,oBAAoB;AAAA,EAC/B,cAAc;AAAA,EACd,gBAAgB;AAClB;AAcO,IAAM,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,OAAO;AACT;AAsJO,IAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAiDO,IAAM,aAAa;AAAA,EACxB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,kBAAkB;AACpB;AAQO,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AACV;;;AC3SO,IAAM,wCAAwC;AAAA,EACnD,UAAU;AAAA,EACV,mBAAmB;AACrB;;;ACpCO,IAAM,gCAAgC;AAAA,EAC3C,WAAW;AAAA,EACX,IAAI;AACN;;;AC0BO,IAAM,wBAAwB;AAAA,EACnC,cAAc;AAAA,EACd,iBAAiB;AACnB;AAcO,IAAM,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;;;AC8PO,IAAM,iCAAiC;AAAA,EAC5C,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,wBAAwB;AAAA,EACxB,mBAAmB;AACrB;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c1 as MemberImportPreviewResponse, c4 as MemberImportPreviewSummary, c3 as MemberImportPreviewRowAction, b$ as MemberImportMatchInfoMatchType, cd as MemberImportStreamEvent } from './tasks-
|
|
1
|
+
import { cY as BusinessImportPreviewResponse, c$ as BusinessImportPreviewSummary, cW as BusinessImportIssueCode, d0 as BusinessImportResponse } from './client-DVF3qwNq.js';
|
|
2
|
+
import { c1 as MemberImportPreviewResponse, c4 as MemberImportPreviewSummary, c3 as MemberImportPreviewRowAction, b$ as MemberImportMatchInfoMatchType, cd as MemberImportStreamEvent } from './tasks-BGLfmf5y.js';
|
|
3
3
|
|
|
4
4
|
/** Counts, row numbers, codes, column keys, changed field names and business ids; no prose. */
|
|
5
5
|
declare function toSafeBusinessImportPreview(preview: BusinessImportPreviewResponse): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c1 as MemberImportPreviewResponse, c4 as MemberImportPreviewSummary, c3 as MemberImportPreviewRowAction, b$ as MemberImportMatchInfoMatchType, cd as MemberImportStreamEvent } from './tasks-
|
|
1
|
+
import { cY as BusinessImportPreviewResponse, c$ as BusinessImportPreviewSummary, cW as BusinessImportIssueCode, d0 as BusinessImportResponse } from './client-DwslF70Y.cjs';
|
|
2
|
+
import { c1 as MemberImportPreviewResponse, c4 as MemberImportPreviewSummary, c3 as MemberImportPreviewRowAction, b$ as MemberImportMatchInfoMatchType, cd as MemberImportStreamEvent } from './tasks-BZb3rt5m.cjs';
|
|
3
3
|
|
|
4
4
|
/** Counts, row numbers, codes, column keys, changed field names and business ids; no prose. */
|
|
5
5
|
declare function toSafeBusinessImportPreview(preview: BusinessImportPreviewResponse): {
|