@gravity-rail/sdk 0.51.0 → 0.53.1

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.
@@ -1,4 +1,4 @@
1
- import { gV as EnumOption, gW as EventRuleResponse, gX as EventRuleData, aT as DataRecordResponse, c7 as WorkspaceMemberResponse, gY as AgentMemoryConfig, gZ as EventRuleEventType, S as SchemaField, eE as SSOConfigData, d6 as OIDCAdminConfigView, dz as PaginatedResponse, aN as CursorPaginatedResponse, gP as SessionKind, aq as ChatSortField, eX as SortOrder, Q as QueryPredicate, br as EventRuleResponse$1, b as EventRuleInput, y as AssignmentSortField, aU as DataRecordAssociationFormData, b5 as DataTypeResponse, A as AccessLevel, bv as FileSortField, dy as PageSortField, dk as OrgMemberRole, g_ as OpenAIRealtimeModelConfig, g$ as GeminiRealtimeModelConfig, h0 as XAIRealtimeModelConfig, p as AgentSortField, l as AgentResponse, ax as CreateAgentRequest, fd as UpdateAgentRequest, t as ApiKeyResponse, v as ApiKeyFormData, u as ApiKeyCreatedResponse, c as AccountResponse, e as AccountFormData, eD as SendLoginCodeResponse, fq as VerifyCodeResponse, eL as SessionExchangeRequest, eM as SessionExchangeResponse, aD as CreateSignupResponse, ek as RequestMagicLinkResponse, fn as ValidateMagicLinkResponse, fb as TwoFactorStatus, eN as SetupTOTPRequest, e_ as TOTPSetupResponse, ft as VerifyTOTPSetupRequest, fa as TwoFactorOperationResponse, eO as SetupWebAuthnRequest, fu as VerifyWebAuthnSetupRequest, bB as GenerateRecoveryCodesRequest, ef as RecoveryCodeResponse, fk as UpdateTwoFactorMethodRequest, gz as AdminAccountOrgMembershipResponse, aK as CredentialType, aI as CredentialChangeRequestResponse, aJ as CredentialChangeVerifyResponse, dB as PendingCredentialChangeResponse, aj as CancelCredentialChangeResponse, aG as CredentialChangeInviteDetailsResponse, aF as CredentialChangeInviteConfirmResponse, a1 as Calendar, a9 as CalendarFormData, ac as CalendarSchedule, ae as CalendarScheduleFormData, H as AvailabilityCheck, I as AvailabilityResponse, J as AvailableSlotsRequest, K as AvailableSlotsResponse, a8 as CalendarEventsQueryParams, a2 as EventResponse, a3 as CalendarEventFormData, fe as UpdateAttendeeRequest, a6 as EventTypeResponse, a7 as CalendarEventTypeFormData, bN as ICalFeedTokenResponse, bO as ICalFeedUrlResponse, bJ as GoogleCalendarInfo, bL as GoogleCalendarStatusResponse, bK as GoogleCalendarInsufficientScopesResponse, b$ as LinkCalendarRequest, c0 as LinkCalendarResponse, fc as UnlinkCalendarResponse, eZ as SyncCalendarResponse, b7 as DataTypeFormData, b3 as DataRecordsPaginatedResponse, aW as DataRecordFilterResponse, aX as DataRecordFilterFormData, aZ as DataRecordFormData, b1 as DataRecordUpdateResponse, ca as MemberCredentialResponse, bn as EventRule, bm as EventActionMappingsResponse, bq as EventRuleObjectType, E as EventRuleEventType$1, a as EventRuleActionType, bp as EventRuleFormData, fg as UpdateEventRuleFormData, f5 as TestWebhookRequest, f6 as TestWebhookResponse, fx as WebhookLogsQueryParams, eA as RuleExecutionsQueryParams, eH as SchedulePreviewRequest, eI as SchedulePreviewResponse, ev as RoutineVoiceReadinessPreviewRequest, ew as RoutineVoiceReadinessPreviewResponse, ey as RoutinesQueryParams, em as Routine, aC as CreateRoutineRequest, fj as UpdateRoutineRequest, en as RoutineConfigEventResponse, bs as EventRunSortField, ep as RoutineRunResponse, f$ as CreateInquirySchema, gm as UpdateInquiryRequestSchema, aL as CurrentMemberResponse, ci as MemberFormData, cK as MemberSortField, aE as CreateWorkspaceMemberRequest, fl as UpdateWorkspaceMemberRequest, cf as MemberFilterResponse, cg as MemberFilterFormData, cy as MemberLabelResponse, cA as MemberLabelFormData, cF as MemberRoleResponse, cI as MemberRoleFormData, cp as MemberImportOptions, cq as MemberImportPreviewResponse, cx as MemberImportStreamEvent, ce as MemberFieldListResponse, cd as MemberFieldDefinitionListResponse, cb as MemberFieldResponse, aH as CredentialChangeInviteResponse, ai as CancelCredentialChangeInviteResponse, dC as PendingCredentialChangeInviteResponse, dA as PendingAnonymousMembersResponse, r as AnonymousMemberResolutionResponse, el as ResolveAnonymousMemberRequest, bt as ExpireAnonymousMemberRequest, cU as MemoryType, cB as MemberMemoriesResponse, cS as MemoryItem, R as BulkCreateMembersRequest, T as BulkCreateMembersResponse, cM as MemberSyncLink, h1 as SiteDnsRecord$1, h2 as OrgDomainListResponse$1, bH as OrgDomainResponse$1, bg as EmailDomainConfigResponse, h3 as EmailDnsRecord$1, h4 as EmailDomainConfigGetResponse$1, be as EmailDisableImpactResponse, eT as SiteDomainConfigResponse, h5 as SiteDomainConfigGetResponse$1, eR as SiteDisableImpactResponse, bC as BusinessProfileResponse$1, Z as BusinessInfo, G as AuthorizedRep, j as Address, bI as OwnershipDnsRecord$1, gB as AdminOrganization, cD as MemberOrgView, aM as CurrentOrgMember, eF as SSOConfigRequest, h6 as OrgBillingCustomerResponse, dj as OrgMemberListResponse, fh as UpdateOrgMemberRequest, di as OrgMember, fB as WorkspaceSortField, dm as OwnershipVerificationResponse, bi as EmailVerificationResponse, eV as SiteVerificationResponse, $ as BusinessProfileSubmitResponse, _ as BusinessProfileCancelResponse, dV as QueryFieldsResponse, dX as QueryIR, fo as ValidateQueryResponse, e7 as QueryRunMode, eC as RunQueryResponse, fS as AbilityData$1, fy as WorkflowSortField, b8 as DataTypeRecordScope$1 } from './tasks-CKBDY-Ok.cjs';
1
+ import { gV as EnumOption, gW as EventRuleResponse, gX as EventRuleData, aT as DataRecordResponse, c7 as WorkspaceMemberResponse, gY as AgentMemoryConfig, gZ as EventRuleEventType, S as SchemaField, eE as SSOConfigData, d6 as OIDCAdminConfigView, dz as PaginatedResponse, aN as CursorPaginatedResponse, gP as SessionKind, aq as ChatSortField, eX as SortOrder, Q as QueryPredicate, br as EventRuleResponse$1, b as EventRuleInput, y as AssignmentSortField, aU as DataRecordAssociationFormData, b5 as DataTypeResponse, A as AccessLevel, bv as FileSortField, dy as PageSortField, dk as OrgMemberRole, g_ as OpenAIRealtimeModelConfig, g$ as GeminiRealtimeModelConfig, h0 as XAIRealtimeModelConfig, p as AgentSortField, l as AgentResponse, ax as CreateAgentRequest, fd as UpdateAgentRequest, t as ApiKeyResponse, v as ApiKeyFormData, u as ApiKeyCreatedResponse, c as AccountResponse, e as AccountFormData, eD as SendLoginCodeResponse, fq as VerifyCodeResponse, eL as SessionExchangeRequest, eM as SessionExchangeResponse, aD as CreateSignupResponse, ek as RequestMagicLinkResponse, fn as ValidateMagicLinkResponse, fb as TwoFactorStatus, eN as SetupTOTPRequest, e_ as TOTPSetupResponse, ft as VerifyTOTPSetupRequest, fa as TwoFactorOperationResponse, eO as SetupWebAuthnRequest, fu as VerifyWebAuthnSetupRequest, bB as GenerateRecoveryCodesRequest, ef as RecoveryCodeResponse, fk as UpdateTwoFactorMethodRequest, gz as AdminAccountOrgMembershipResponse, aK as CredentialType, aI as CredentialChangeRequestResponse, aJ as CredentialChangeVerifyResponse, dB as PendingCredentialChangeResponse, aj as CancelCredentialChangeResponse, aG as CredentialChangeInviteDetailsResponse, aF as CredentialChangeInviteConfirmResponse, a1 as Calendar, a9 as CalendarFormData, ac as CalendarSchedule, ae as CalendarScheduleFormData, H as AvailabilityCheck, I as AvailabilityResponse, J as AvailableSlotsRequest, K as AvailableSlotsResponse, a8 as CalendarEventsQueryParams, a2 as EventResponse, a3 as CalendarEventFormData, fe as UpdateAttendeeRequest, a6 as EventTypeResponse, a7 as CalendarEventTypeFormData, bN as ICalFeedTokenResponse, bO as ICalFeedUrlResponse, bJ as GoogleCalendarInfo, bL as GoogleCalendarStatusResponse, bK as GoogleCalendarInsufficientScopesResponse, b$ as LinkCalendarRequest, c0 as LinkCalendarResponse, fc as UnlinkCalendarResponse, eZ as SyncCalendarResponse, b7 as DataTypeFormData, b3 as DataRecordsPaginatedResponse, aW as DataRecordFilterResponse, aX as DataRecordFilterFormData, aZ as DataRecordFormData, b1 as DataRecordUpdateResponse, ca as MemberCredentialResponse, bn as EventRule, bm as EventActionMappingsResponse, bq as EventRuleObjectType, E as EventRuleEventType$1, a as EventRuleActionType, bp as EventRuleFormData, fg as UpdateEventRuleFormData, f5 as TestWebhookRequest, f6 as TestWebhookResponse, fx as WebhookLogsQueryParams, eA as RuleExecutionsQueryParams, eH as SchedulePreviewRequest, eI as SchedulePreviewResponse, ev as RoutineVoiceReadinessPreviewRequest, ew as RoutineVoiceReadinessPreviewResponse, ey as RoutinesQueryParams, em as Routine, aC as CreateRoutineRequest, fj as UpdateRoutineRequest, en as RoutineConfigEventResponse, bs as EventRunSortField, ep as RoutineRunResponse, f$ as CreateInquirySchema, gm as UpdateInquiryRequestSchema, aL as CurrentMemberResponse, ci as MemberFormData, cK as MemberSortField, aE as CreateWorkspaceMemberRequest, fl as UpdateWorkspaceMemberRequest, cf as MemberFilterResponse, cg as MemberFilterFormData, cy as MemberLabelResponse, cA as MemberLabelFormData, cF as MemberRoleResponse, cI as MemberRoleFormData, cp as MemberImportOptions, cq as MemberImportPreviewResponse, cx as MemberImportStreamEvent, ce as MemberFieldListResponse, cd as MemberFieldDefinitionListResponse, cb as MemberFieldResponse, aH as CredentialChangeInviteResponse, ai as CancelCredentialChangeInviteResponse, dC as PendingCredentialChangeInviteResponse, dA as PendingAnonymousMembersResponse, r as AnonymousMemberResolutionResponse, el as ResolveAnonymousMemberRequest, bt as ExpireAnonymousMemberRequest, cU as MemoryType, cB as MemberMemoriesResponse, cS as MemoryItem, R as BulkCreateMembersRequest, T as BulkCreateMembersResponse, cM as MemberSyncLink, h1 as SiteDnsRecord$1, h2 as OrgDomainListResponse$1, bH as OrgDomainResponse$1, bg as EmailDomainConfigResponse, h3 as EmailDnsRecord$1, h4 as EmailDomainConfigGetResponse$1, be as EmailDisableImpactResponse, eT as SiteDomainConfigResponse, h5 as SiteDomainConfigGetResponse$1, eR as SiteDisableImpactResponse, bC as BusinessProfileResponse$1, Z as BusinessInfo, G as AuthorizedRep, j as Address, bI as OwnershipDnsRecord$1, gB as AdminOrganization, cD as MemberOrgView, aM as CurrentOrgMember, eF as SSOConfigRequest, h6 as OrgBillingCustomerResponse, dj as OrgMemberListResponse, fh as UpdateOrgMemberRequest, di as OrgMember, fB as WorkspaceSortField, dm as OwnershipVerificationResponse, bi as EmailVerificationResponse, eV as SiteVerificationResponse, $ as BusinessProfileSubmitResponse, _ as BusinessProfileCancelResponse, dV as QueryFieldsResponse, dX as QueryIR, fo as ValidateQueryResponse, e7 as QueryRunMode, eC as RunQueryResponse, fS as AbilityData$1, fy as WorkflowSortField, b8 as DataTypeRecordScope$1 } from './tasks-JweebIce.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -14663,6 +14663,7 @@ declare const CustomToolResponseChatModel: {
14663
14663
  readonly 'aws:bedrock:claude-4-5-sonnet': "aws:bedrock:claude-4-5-sonnet";
14664
14664
  readonly 'aws:bedrock:claude-4-6-sonnet': "aws:bedrock:claude-4-6-sonnet";
14665
14665
  readonly 'aws:bedrock:claude-4-5-haiku': "aws:bedrock:claude-4-5-haiku";
14666
+ readonly 'aws:bedrock:claude-5-5-haiku': "aws:bedrock:claude-5-5-haiku";
14666
14667
  readonly 'aws:bedrock:gpt-oss-20b': "aws:bedrock:gpt-oss-20b";
14667
14668
  readonly 'aws:bedrock:gpt-oss-120b': "aws:bedrock:gpt-oss-120b";
14668
14669
  readonly 'aws:bedrock:nova-pro-1': "aws:bedrock:nova-pro-1";
@@ -18848,6 +18849,7 @@ declare const PromptClassification: {
18848
18849
  readonly abilityscope: "ability.scope";
18849
18850
  readonly fieldsenforcement: "fields.enforcement";
18850
18851
  readonly routingprose: "routing.prose";
18852
+ readonly routingaction_missing: "routing.action_missing";
18851
18853
  };
18852
18854
  /**
18853
18855
  * One classification the decision model reported for a Task.
@@ -18856,6 +18858,21 @@ interface PromptClassificationResponse {
18856
18858
  slug: PromptClassification;
18857
18859
  title: string;
18858
18860
  probability: number;
18861
+ diagnosis?: PromptDiagnosisResponse | null;
18862
+ diagnosisTicketStatus?: PromptClassificationResponseDiagnosisTicketStatus;
18863
+ }
18864
+ type PromptClassificationResponseDiagnosisTicketStatus = typeof PromptClassificationResponseDiagnosisTicketStatus[keyof typeof PromptClassificationResponseDiagnosisTicketStatus] | null;
18865
+ declare const PromptClassificationResponseDiagnosisTicketStatus: {
18866
+ readonly recorded: "recorded";
18867
+ readonly unavailable: "unavailable";
18868
+ };
18869
+ /**
18870
+ * An independent explanation or rebuttal of the reported classification.
18871
+ */
18872
+ interface PromptDiagnosisResponse {
18873
+ diagnosisValid: boolean;
18874
+ explanation?: string | null;
18875
+ rebuttal?: string | null;
18859
18876
  }
18860
18877
  /**
18861
18878
  * The classifications for one Task, and the request that hands them on.
@@ -18870,8 +18887,8 @@ interface TaskPromptClassificationsResponse {
18870
18887
  /**
18871
18888
  * Prompt classifications for the draft revision of one Workflow.
18872
18889
  *
18873
- * One entry per live Task with Workflow or Task instructions. A Task with
18874
- * neither is absent.
18890
+ * One entry per live Task with Workflow or Task instructions, or an active
18891
+ * outgoing Choice prompt. Other Tasks are absent.
18875
18892
  */
18876
18893
  interface WorkflowPromptClassificationsResponse {
18877
18894
  workflowId: number;
@@ -19764,6 +19781,14 @@ declare class AuthApi extends BaseApiClient {
19764
19781
  * session may mint one — an API key is refused.
19765
19782
  */
19766
19783
  createRealtimeLoginToken(): Promise<AccountRealtimeWsTokenResponse>;
19784
+ /**
19785
+ * Mint a single-use realtime login token (`gr_wst_`) bound to one
19786
+ * workspace, with this client's credential. A credential narrower than the
19787
+ * full browser session (a Site session, a device, a widget session) mints
19788
+ * this kind; it opens only that workspace's sockets. Call once per connect
19789
+ * attempt.
19790
+ */
19791
+ createWorkspaceRealtimeLoginToken(workspaceUuid: string): Promise<AccountRealtimeWsTokenResponse>;
19767
19792
  /** Get the organization and workspace mapping for a custom domain. */
19768
19793
  getDomainMapping(customDomain: string): Promise<DomainMapping>;
19769
19794
  /** Create a new signup with member and data records for a workspace. */
@@ -27454,6 +27479,7 @@ declare class SitesApi extends BaseApiClient {
27454
27479
  memberId?: number | null;
27455
27480
  requiresTwoFactor?: boolean;
27456
27481
  availableTwoFactorMethods?: unknown[] | null;
27482
+ sessionKind?: SessionKind | 'widget' | null;
27457
27483
  }>;
27458
27484
  /** Create a new site in the workspace. */
27459
27485
  createSite(wid: string, site: SiteFormData): Promise<Site>;
@@ -28718,10 +28744,12 @@ declare class WorkflowsApi extends BaseApiClient {
28718
28744
  * Classify the prompts of a Workflow's draft revision.
28719
28745
  *
28720
28746
  * A decision model reads each live Task with Workflow or Task instructions
28721
- * and reports which
28747
+ * or an active outgoing Choice prompt and reports which
28722
28748
  * prompt classifications probably apply. Each call asks the model again.
28723
28749
  */
28724
28750
  getWorkflowPromptClassifications(wid: string, workflowId: number): Promise<WorkflowPromptClassificationsResponse>;
28751
+ /** Review prompt diagnoses and report rebutted findings to Customer Success. */
28752
+ reviewWorkflowPromptClassifications(wid: string, workflowId: number): Promise<WorkflowPromptClassificationsResponse>;
28725
28753
  /**
28726
28754
  * Replay automatic routing for a Chat without performing the transition.
28727
28755
  *
@@ -30172,7 +30200,7 @@ interface ApiModules {
30172
30200
  }
30173
30201
  declare function createApiModules(apiKey: string | undefined, baseUrl: string, customFetch?: typeof fetch): ApiModules;
30174
30202
 
30175
- declare const WORKSPACE_METHOD_NAMES: readonly ["activateWorkflowRevision", "addEmailSenderAsMember", "addGroupMember", "advanceStep", "approveWorkspaceInvitation", "archiveAgent", "archiveChat", "archiveDataType", "archiveJourney", "archiveMember", "archiveMemberByExternalId", "archiveMemberRelationship", "archivePersona", "archivePhoneNumber", "archiveStep", "archiveTask", "archiveWorkflow", "authorizeMondayConnection", "autoCreateDataTypeFromBoard", "blockWorkspaceInvitation", "bookHealthieAppointment", "buildSiteSource", "buildWorkspace", "bulkCreateMembers", "bulkLinkMembersToHubspot", "bulkLinkMembersToMonday", "bulkLinkMembersToSalesforce", "cancelAgentTask", "cancelAssignment", "cancelCalendarEvent", "cancelChatCallback", "cancelCredentialUpdateInvite", "checkAvailability", "checkSiteDomainAvailability", "checkSiteSlugAvailability", "claimDevicePairing", "clearConnectionMemberExclusion", "clearTrackedLinkDestinations", "clickWorkspaceSupportRequestResource", "cloneDataType", "cloneTask", "cloneWorkflow", "closeWorkspaceSupportRequest", "commentOnWorkspaceSupportRequest", "completeDiscordLink", "configureConfluence", "configureDocumoFax", "configureHealthie", "configurePatientSync", "configureHubspot", "configureMondayConnection", "configureSalesforce", "convertEmail", "convertFile", "createAbility", "createAccessGrant", "createAgent", "createApiKey", "createAssignment", "bindInstallationSlots", "restoreInstallationForm", "createBundle", "createCalendar", "createCalendarEvent", "createCalendarEventType", "createCalendarSchedule", "createChat", "createChatInteractionSession", "transitionChatInteractionSession", "createChatCompletion", "createChatFilter", "createChatLabel", "createClientWorkspace", "createConnection", "createContactPermission", "createCustomTool", "createCustomToolkit", "createDashboard", "createDataRecord", "createDataRecordFilter", "createDataType", "createDiscordBot", "createEventRule", "createExperiment", "createExperimentAssignment", "createExperimentGroup", "createFhirConnection", "createFile", "createFileLabel", "createFolder", "createGoal", "createInbox", "cloneJourneyAsV2", "createJourney", "createJourneyNote", "createMcpServer", "createMemberField", "createMemberFilter", "createMemberLabel", "createMemberMemory", "createMemberRelationship", "createMemberRole", "createMenuItem", "createNotificationRule", "createOperatorGroup", "createPage", "createPersona", "createPhoneNumber", "createProduct", "createRoutine", "createRoutingRule", "createScenario", "createSignup", "createSite", "createSiteSource", "createSlackApp", "createStep", "createSupervisor", "createTask", "createTeamsApp", "createTrackedLinkDestination", "createWorkflow", "createWorkflowContributor", "createWorkflowFromTemplate", "createWorkflowNote", "createWorkflowOutboundVoiceChat", "createWorkspaceMember", "createWorkspaceSupportRequest", "deleteAbility", "deleteAgent", "deleteAssignment", "deleteCalendar", "deleteCalendarEvent", "deleteCalendarEventType", "deleteCalendarSchedule", "deleteChat", "deleteChatFilter", "deleteChatLabel", "deleteClientWorkspace", "deleteConfluence", "deleteConnection", "deleteCustomTool", "deleteCustomToolkit", "deleteDashboard", "deleteDataRecord", "deleteDataRecordFilter", "deleteDataType", "deleteDiscordBot", "deleteEnrollment", "deleteEventRule", "deleteExperiment", "deleteExperimentAssignment", "deleteExperimentGroup", "deleteFhirConnection", "deletePatientSyncConnection", "deleteFile", "deleteFileLabel", "deleteFolder", "deleteGoal", "deleteHubspot", "deleteInbox", "deleteJourneyDraft", "deleteJourneyNote", "deleteMcpServer", "deleteMember", "deleteMemberField", "deleteMemberFilter", "deleteMemberLabel", "deleteMemberMemory", "deleteMemberRole", "deleteMenuItem", "deleteMondayConnection", "deleteNotificationRule", "deleteOperatorGroup", "deletePage", "deletePersona", "deletePlatformApp", "deleteProduct", "deleteRoutine", "deleteRoutingRule", "deleteSalesforce", "deleteScenario", "deleteSite", "deleteSlackApp", "deleteSupervisor", "deleteTask", "deleteTeamsApp", "deleteTrackedLinkDestination", "deleteWidgetDomain", "deleteWorkflow", "deleteWorkflowContributor", "deleteWorkflowNote", "deleteWorkspace", "deleteWorkspaceInvitationAdmin", "denyWorkspaceInvitation", "describeSalesforceObject", "diffWorkflowRevisions", "disableConfluence", "disableCustomToolkit", "disableHubspot", "disableMcpServer", "disableMondayConnection", "disableSalesforce", "disconnectConfluence", "disconnectHubspot", "disconnectMondayConnection", "disconnectSalesforce", "discordLinkPreflight", "discoverOAuthMetadata", "dismissAllNotifications", "dismissNotification", "downloadEmailAttachment", "downloadFileContents", "downloadFilesZip", "downloadSiteSourceZip", "editWorkflowRevisionAsDraft", "enableConfluence", "enableCustomToolkit", "enableHubspot", "enableMcpServer", "enableMondayConnection", "enablePlatformApp", "enableSalesforce", "endTestChatRun", "enrollMembers", "evaluateTestChatRun", "executeAssignmentTool", "expireAnonymousMember", "exportChat", "exportChats", "exportMembers", "exportPhoneNumberOutboundAnalyticsCsv", "exportWorkspace", "exportWorkspaceZip", "fetchVoicemailAudio", "fhirBackfillEncounterSync", "fhirCheckPatientLinks", "fhirCreateEncounter", "fhirCsvImportApply", "fhirCsvImportInspect", "fhirFetchCareTeam", "fhirFetchEncounters", "fhirGetCsvImportRunItems", "fhirGetCsvImportRuns", "fhirGetCsvImportSettings", "fhirGetEncounterSyncRuns", "fhirGetEncounterSyncStatus", "fhirImportPatient", "fhirLinkMember", "fhirListLinkedMembers", "fhirRefreshEncounterPatient", "fhirRunEncounterSync", "fhirSearchLocations", "fhirSearchPatients", "fhirSearchPractitioners", "fhirSyncMember", "fhirUnlinkMember", "fhirUpdateCsvImportSettings", "fhirUpdateEncounterSync", "findOrCreateDMChat", "generateFileUploadUrl", "generateICalToken", "generateSiteMediaUploadUrl", "getAIUsageReport", "getAbilityType", "getAbilityTypes", "getAccessGrant", "getAccessGrants", "getAgent", "getAgentModeAttention", "getAgentTask", "getAgentTaskMessages", "getAgentTasks", "getAgents", "getAnonymousResolution", "getAnonymousFormSubmission", "getAnonymousFormSchema", "getAnonymousResolutions", "getApiKeys", "getArchiveBlockers", "getAssignment", "getAssignmentCelContext", "getAssignmentMessages", "getAssignmentTask", "getAssignmentTaskDetail", "getAssignmentTools", "getAssignments", "getAvailableActions", "getAvailablePhoneNumbers", "getAvailableSlots", "getInstallation", "getInstallationReadiness", "getThemeSettingsSchema", "getBundleDraft", "getBundleJourneyCandidate", "getBundle", "getBundleVersion", "getBusinessHoursStatus", "getCalendar", "getCalendarEvent", "getCalendarEventType", "getCalendarEventTypes", "getCalendarEvents", "getCalendarSchedules", "getCalendars", "getCallRecordingDownloadUrl", "getCelContext", "getCharlestonTestDeliveryRecipients", "getChat", "getChatByUuid", "getChatAssignmentTasks", "getChatBrowserLiveView", "saveChatBrowserStorage", "clearChatBrowserStorage", "getChatCallbacks", "getChatEhrWritebackOutcomes", "getChatEmails", "getChatFilter", "getChatFilterByUuid", "getChatFilterCount", "getChatFilters", "getChatLabel", "getChatLabelByUuid", "getChatLabels", "getChatMachineResources", "getChatMessages", "getChatTaskTransitions", "getChatModelOverride", "getChatPhoneCalls", "getChatSkills", "getManagerSkills", "getChatTodos", "getChatTokenUsage", "getChatToolCallMessages", "getChatTools", "getChats", "getChatsDailyCreationStats", "getChatsNeedsResponse", "getChildThreadMessages", "getClientWorkspace", "getConfigurationHealth", "getConfluenceStatus", "getConnectionSyncCapabilities", "getConnectionSyncCheckpoint", "getConnectionSyncConfig", "getCredentialUpdateInvites", "getCurrentMember", "clearMemberWorkflowVoice", "getMemberWorkflowVoices", "getMyDataTypes", "getMyRecords", "setMemberWorkflowVoice", "getCurrentSmsChat", "getCustomToolkit", "getCustomToolkits", "getDashboard", "getDashboardChannelStats", "getDashboardWorkflowAssignmentStats", "getDashboards", "getDataRecord", "getDataRecordByUuid", "getDataRecordChanges", "getDataRecordFilter", "getDataRecordFilterCount", "getDataRecordFilters", "getDataRecords", "getDataType", "getDataTypeDraft", "getDataTypeVersions", "getDataTypeByUuid", "getDataTypeBySlug", "getDataTypes", "getDevice", "getDeviceKinds", "getDevices", "getDiscordBot", "getDiscordBotAccounts", "getDiscordBotByUuid", "getDiscordBots", "getDiscordGuilds", "getDiscordThreads", "getDocumoFaxSetup", "listDocumoFaxes", "getDocumoFaxStatus", "getEdgeCaptureInfo", "getEnrollmentStatusLog", "getEventRule", "getEventRules", "getExperiment", "getExperimentStats", "getExperiments", "getFhirConnection", "getFhirConnectionByUuid", "getFhirConnections", "getFieldIndexStatus", "getFile", "getMondayBoardColumns", "getMondayBoardGroups", "getMondayBoards", "getMondayCurrentUserInfo", "getMotd", "getPhoneNumberOutboundAnalyticsCalls", "getPhoneNumberOutboundAnalyticsSummary", "getQueryFields", "getSiteSharing", "getSiteSource", "getSiteSourceTemplates", "getThemeSettings", "importSiteSourceZip", "installDocumoFax", "listChatRecordings", "previewQuery", "publishSiteSource", "publishDataTypeDraft", "saveDataTypeDraft", "queryWorkspaceActivity", "queryWorkspaceActivityLatestSubjects", "queryWorkspaceActivityOpenItems", "queryWorkspaceActivityOneView", "queryWorkspaceActivityDigest", "registerDiscordSlashCommands", "reopenWorkspaceSupportRequest", "resolveEntityRefs", "resetSiteSource", "resolveFilePath", "getFileLabel", "getFileLabelByUuid", "getFileLabels", "getFileSharing", "getFileVersionContentsUrl", "getFileVersionDiff", "getFiles", "getFirstRunState", "getFolder", "getFolderMemberAccess", "getFolderSharing", "getFolders", "getGoogleCalendarStatus", "getGranteeGrants", "getHealthieAvailableSlots", "getHealthieReconciliationMatches", "getHealthieStatus", "getPatientSyncStatus", "getHubspotContactProperties", "getHubspotManagedRules", "getHubspotReconciliationMatches", "getHubspotStatus", "getHubspotSyncLogs", "getHubspotTransformPresets", "getICalFeedUrl", "getImportSkippedRules", "getImportReadiness", "rebuildImportSkippedRules", "getInbox", "getInboxEmail", "getInboxEmails", "getInboxThreads", "getInboxes", "getInterventionRequests", "getJourney", "getJourneyAuthoring", "getJourneyFilterOptions", "getJourneyHealth", "getJourneyMembers", "getJourneyNotes", "getJourneyV2Validation", "getJourneys", "getLinkablePhones", "getLinkedHealthieMembers", "getLinkedHubspotMembers", "getLinkedMondayMembers", "getLinkedRecords", "getLinkedSalesforceMembers", "getLiveOperators", "getMcpServer", "getMcpServerPrompts", "getMcpServerResources", "getMcpServerTools", "getMcpServers", "getMemberByUuid", "getMemberExperiments", "getMemberFieldDefinitions", "getMemberFields", "getMemberFilter", "getMemberFilterCount", "getMemberFilters", "getMemberGrants", "getMemberJourneys", "getMemberLabel", "getMemberLabelByUuid", "getMemberLabels", "getMemberMemories", "getMemberMemory", "getMemberRecordCounts", "getMemberRelationships", "getMemberRole", "getMemberRoleCleanupPlan", "getMemberRoleByUuid", "getMemberRoles", "getMemberSyncLinks", "getMemberSyncSummary", "getMemberUsage", "getMembersMessageActivity", "getMenuItems", "getMessageTiming", "getMondayConnectionBoardColumns", "getMondayConnectionBoardGroups", "getMondayConnectionBoards", "getMondayConnectionStatus", "getMondayReconciliationMatches", "getMondaySyncConfig", "getMondaySyncLogs", "getMyCredentials", "getMyGivenGrants", "getMyReceivedGrants", "getNotification", "getNotificationRules", "getNotifications", "getOperatorChatMessages", "getOperatorGroup", "getOperatorGroups", "getOrCreateQualificationForWorkflow", "getPage", "getPageBySlug", "getPersona", "getPhoneCalls", "getPhoneNumber", "getPhoneNumberCalls", "getPhoneNumberFaxes", "getPhoneNumberMessages", "getPhoneNumberVoicemails", "getPhoneNumbers", "getPhoneUsageReport", "getPlatformApp", "getPlan", "getPresenceStatus", "getProducts", "getProject", "getProjects", "getPublicFile", "getPublicFolder", "getPublicFolderFiles", "getPublicProducts", "getQualification", "getQualifications", "getRecordingInfo", "getResellerWorkspaces", "getRoutine", "getRoutineConfigEvents", "getRoutineRuns", "getRoutines", "getRoutingRule", "getRoutingRules", "getRuleExecutions", "getSMSUsageReport", "getSalesforceReconciliationMatches", "getSalesforceStatus", "getSalesforceSyncConfig", "getSalesforceSyncLogs", "getScenario", "getSite", "getSiteByUuid", "getSiteCounts", "getSiteMenu", "getSitePages", "getSiteRenderedMenu", "getSiteRenderedPage", "getSites", "getSlackApp", "getSlackAppAccounts", "getSlackApps", "getSlackInstallations", "getSlackThreads", "getStepMemberCounts", "getStepMembers", "getSupervisor", "getSupervisors", "getSyncRunItems", "getSyncRuns", "getTask", "getTaskChats", "getTasks", "getTeamsApp", "getTeamsAppAccounts", "getTeamsApps", "getTeamsConversations", "getTeamsInstallations", "getTemplateContext", "getTestChatRun", "getThreadEmails", "getTool", "getToolCallNames", "getToolkits", "getTrackedLinkDestinations", "getTrackedLinkStats", "getTrackedLinkSummary", "getTrackedLinkTimeseries", "getUnreadNotificationCount", "getUsageDashboard", "getVariableRegistry", "getVoiceUsageReport", "getWebhookLogs", "getWorkflow", "getWorkflowOpeningTurnConversionReport", "getWorkflowActivity", "getWorkflowConfigValidation", "getWorkflowFeedback", "getWorkflowPromptClassifications", "getWorkflowContributors", "getWorkflowDeletionPreview", "getWorkflowDiagram", "getWorkflowNotes", "getWorkflowOutline", "getWorkflowRevision", "getWorkflowRevisions", "getWorkflowTaskAssignmentStats", "getWorkflowTemplates", "getWorkflows", "getWorkflowsActivityBatch", "getWorkspace", "getWorkspaceActivityCounts", "getWorkspaceBuilder", "getWorkspaceBuilders", "getWorkspaceCounts", "getWorkspaceDefaults", "getWorkspaceEmailDomains", "getWorkspaceMember", "getWorkspaceMembers", "getWorkspaceNotices", "getWorkspaceProduct", "getWorkspaceSiteDomains", "getWorkspaceWidgetDomains", "getWorkspaceSubscriptions", "getWorkspaceSupportRequest", "getWorkspaceThemes", "installBundle", "grantBundle", "importFromBoard", "importHubspotMembers", "importMembers", "importSalesforceMembers", "importWorkspace", "importWorkspaceZip", "initiateOutboundCall", "inspectPrompt", "installHubspot", "installDocumoFax", "installMondayConnection", "installSalesforce", "inviteMemberCredentialUpdate", "inviteToWorkspace", "leaveWorkspace", "linkCalendarToGoogle", "linkCalendarToHealthie", "linkMemberToHealthie", "linkMemberToHubspot", "linkMemberToMonday", "linkMemberToSalesforce", "linkPhoneNumber", "linkUnlinkedSalesforceMembersByIdentity", "listAbilities", "listAnonymousFormSubmissions", "submitAnonymousForm", "listAppConnections", "listAvailableAppConnections", "listInstallations", "listBundleGrants", "listBundleJourneyCandidates", "listBundleVersions", "listBundles", "listBundleWorkflowCandidates", "updateBundle", "listBundleInstallations", "listConfluencePages", "listConfluenceSpaces", "listConnectionMemberFieldKeys", "listContactPermissions", "revokeBundleGrant", "rollbackSiteSource", "rotateDocumoFaxCredentials", "runQuery", "sendMemberPhoneConfirmation", "setDefaultGooglePlatformAccount", "listFileVersions", "listGoogleCalendars", "listHealthieAppointmentTypes", "listHealthiePatients", "listHealthieProviders", "listPersonas", "listMetrics", "getMetric", "createMetric", "updateMetric", "deleteMetric", "listMetricObservations", "getMetricSeries", "computeChatMetrics", "listPushSubscriptions", "listResourceWorkflows", "getResourceWorkflow", "getResourceWorkflowRevision", "listSalesforceObjects", "listScenarioHealthSummaries", "listScenarios", "listChatCapturedEffects", "listChatRecordChanges", "takeTestChatRunEmailTurn", "takeTestChatRunSmsTurn", "listTestChatRuns", "listWidgetDomains", "listWorkspaceInvitationsAdmin", "listWorkspaceSupportRequests", "markEmailAsRead", "markEmailAsUnread", "markNotificationAsRead", "mergeMemberRoles", "previewEmailReply", "previewImportMembers", "previewMemberWorkflowVoice", "previewRenameFieldSlug", "previewImportWorkspace", "previewInboxEmail", "preflightBundleInstallation", "previewRoutineVoiceReadiness", "previewSchedule", "previewRoutingRule", "previewTTS", "previewTemplate", "previewThinkingSound", "previewWorkspaceImport", "previewWorkspaceImportZip", "provisionClientWorkspace", "previewInstallationUpgrade", "publishBundle", "publishWorkflowRevision", "putJourneyDraft", "putJourneyV2Definition", "rateMessage", "getChatFeedback", "reenrollMember", "renameFieldSlug", "registerLinkedRolesMetadata", "registerPushSubscription", "reindexFolder", "releasePhoneNumber", "reorderRoutingRules", "removeFileRole", "removeFolderRole", "removeGroupMember", "reorderEventRules", "reorderMenuItems", "reconcileInstallation", "setInstallationPolicy", "upgradeInstallation", "replaceBundleDraft", "replyToEmail", "rotateDocumoFaxCredentials", "requestPhoneNumber", "requestWorkspaceMembership", "resetRoutineRuns", "resolveAccessGrant", "resolveAnonymousMember", "resolveInterventionRequest", "restoreFileVersion", "revokeAccessGrant", "revokeApiKey", "revokeDevice", "revokeICalToken", "runRoutine", "searchEventRules", "searchFolder", "searchHubspotRecords", "searchSalesforceRecords", "selectCurrentAssignmentTask", "sendAssistantMessage", "sendChatMessage", "sendInboxEmail", "sendOperatorMessage", "siteGoogleOAuthInitiate", "siteSendEmailCode", "siteSendPhoneCode", "siteSignup", "siteVerifyCode", "skipStep", "startConfluenceOAuth", "startHubspotOAuth", "startSalesforceOAuth", "startSyncRun", "startTestChatRun", "summarizeChat", "syncCalendarWithGoogle", "syncCalendarWithHealthie", "testFhirConnection", "testMcpServerConnection", "testMondayConnection", "testRunJourney", "testWebhook", "toggleFieldIndex", "unarchiveAgent", "unarchiveChat", "unarchiveDataType", "unarchiveMember", "unarchiveMemberByExternalId", "unarchivePersona", "unarchiveStep", "unarchiveTask", "unarchiveWorkflow", "unenrollMembers", "unlinkCalendarFromGoogle", "unlinkCalendarFromHealthie", "unlinkCredential", "unlinkMemberFromHealthie", "unlinkMemberFromHubspot", "unlinkMemberFromMonday", "unlinkMemberFromSalesforce", "unregisterPushSubscription", "updateAbility", "updateAgent", "updateAssignment", "updateCalendar", "updateCalendarEvent", "updateCalendarEventType", "updateCalendarSchedule", "updateChat", "updateChatFilter", "updateChatLabel", "updateChatModelOverride", "updateChatMute", "updateClientWorkspace", "updateConnection", "updateConnectionSyncConfig", "updateCurrentMember", "updateCustomTool", "updateCustomToolkit", "updateDashboard", "updateDataRecord", "updateDataRecordFilter", "updateDataType", "updateDevice", "updateDiscordBot", "updateEventAttendee", "updateEventRule", "updateExperiment", "updateExperimentAssignment", "updateExperimentGroup", "updateFhirConnection", "updateFile", "updateFileLabel", "updateFileRoles", "updateFileSharing", "updateFirstRunState", "updateFolder", "updateFolderRoles", "updateFolderSharing", "updateGoal", "updateInbox", "updateJourney", "updateJourneyNote", "updateMcpServer", "updateMember", "updateMemberByExternalId", "updateMemberField", "updateMemberFilter", "updateMemberLabel", "updateMemberRole", "updateMenuItem", "updateMondaySyncConfig", "updateNotificationRule", "updateOperatorGroup", "updatePage", "updatePersona", "updatePhoneNumber", "updatePlatformApp", "updatePlan", "updateProduct", "updateProject", "updateRoutine", "updateRoutingRule", "updateSalesforceSyncConfig", "resyncSalesforceLinkedMembers", "updateScenario", "updateSite", "updateSiteSharing", "updateSlackApp", "updateStep", "updateSupervisor", "updateTask", "updateTeamsApp", "updateThemeSettings", "updateTrackedLinkDestination", "uploadFile", "updateVoicemailStatus", "updateWorkflow", "convertWorkflowStartTaskOpeningMessage", "updateWorkflowContributor", "updateWorkflowNote", "updateWorkflowRevisionMetadata", "updateWorkspace", "updateWorkspaceDefaults", "updateWorkspaceInvitationAdmin", "upsertDataRecord", "upsertWidgetDomain", "validateCelExpression", "validateDataTypeSlug", "validateQuery", "validateWorkflowName", "verifyDocumoFax"];
30203
+ declare const WORKSPACE_METHOD_NAMES: readonly ["activateWorkflowRevision", "addEmailSenderAsMember", "addGroupMember", "advanceStep", "approveWorkspaceInvitation", "archiveAgent", "archiveChat", "archiveDataType", "archiveJourney", "archiveMember", "archiveMemberByExternalId", "archiveMemberRelationship", "archivePersona", "archivePhoneNumber", "archiveStep", "archiveTask", "archiveWorkflow", "authorizeMondayConnection", "autoCreateDataTypeFromBoard", "blockWorkspaceInvitation", "bookHealthieAppointment", "buildSiteSource", "buildWorkspace", "bulkCreateMembers", "bulkLinkMembersToHubspot", "bulkLinkMembersToMonday", "bulkLinkMembersToSalesforce", "cancelAgentTask", "cancelAssignment", "cancelCalendarEvent", "cancelChatCallback", "cancelCredentialUpdateInvite", "checkAvailability", "checkSiteDomainAvailability", "checkSiteSlugAvailability", "claimDevicePairing", "clearConnectionMemberExclusion", "clearTrackedLinkDestinations", "clickWorkspaceSupportRequestResource", "cloneDataType", "cloneTask", "cloneWorkflow", "closeWorkspaceSupportRequest", "commentOnWorkspaceSupportRequest", "completeDiscordLink", "configureConfluence", "configureDocumoFax", "configureHealthie", "configurePatientSync", "configureHubspot", "configureMondayConnection", "configureSalesforce", "convertEmail", "convertFile", "createAbility", "createAccessGrant", "createAgent", "createApiKey", "createAssignment", "bindInstallationSlots", "restoreInstallationForm", "createBundle", "createCalendar", "createCalendarEvent", "createCalendarEventType", "createCalendarSchedule", "createChat", "createChatInteractionSession", "transitionChatInteractionSession", "createChatCompletion", "createChatFilter", "createChatLabel", "createClientWorkspace", "createConnection", "createContactPermission", "createCustomTool", "createCustomToolkit", "createDashboard", "createDataRecord", "createDataRecordFilter", "createDataType", "createDiscordBot", "createEventRule", "createExperiment", "createExperimentAssignment", "createExperimentGroup", "createFhirConnection", "createFile", "createFileLabel", "createFolder", "createGoal", "createInbox", "cloneJourneyAsV2", "createJourney", "createJourneyNote", "createMcpServer", "createMemberField", "createMemberFilter", "createMemberLabel", "createMemberMemory", "createMemberRelationship", "createMemberRole", "createMenuItem", "createNotificationRule", "createOperatorGroup", "createPage", "createPersona", "createPhoneNumber", "createProduct", "createRoutine", "createRoutingRule", "createScenario", "createSignup", "createSite", "createSiteSource", "createSlackApp", "createStep", "createSupervisor", "createTask", "createTeamsApp", "createTrackedLinkDestination", "createWorkflow", "createWorkflowContributor", "createWorkflowFromTemplate", "createWorkflowNote", "createWorkflowOutboundVoiceChat", "createWorkspaceMember", "createWorkspaceRealtimeLoginToken", "createWorkspaceSupportRequest", "deleteAbility", "deleteAgent", "deleteAssignment", "deleteCalendar", "deleteCalendarEvent", "deleteCalendarEventType", "deleteCalendarSchedule", "deleteChat", "deleteChatFilter", "deleteChatLabel", "deleteClientWorkspace", "deleteConfluence", "deleteConnection", "deleteCustomTool", "deleteCustomToolkit", "deleteDashboard", "deleteDataRecord", "deleteDataRecordFilter", "deleteDataType", "deleteDiscordBot", "deleteEnrollment", "deleteEventRule", "deleteExperiment", "deleteExperimentAssignment", "deleteExperimentGroup", "deleteFhirConnection", "deletePatientSyncConnection", "deleteFile", "deleteFileLabel", "deleteFolder", "deleteGoal", "deleteHubspot", "deleteInbox", "deleteJourneyDraft", "deleteJourneyNote", "deleteMcpServer", "deleteMember", "deleteMemberField", "deleteMemberFilter", "deleteMemberLabel", "deleteMemberMemory", "deleteMemberRole", "deleteMenuItem", "deleteMondayConnection", "deleteNotificationRule", "deleteOperatorGroup", "deletePage", "deletePersona", "deletePlatformApp", "deleteProduct", "deleteRoutine", "deleteRoutingRule", "deleteSalesforce", "deleteScenario", "deleteSite", "deleteSlackApp", "deleteSupervisor", "deleteTask", "deleteTeamsApp", "deleteTrackedLinkDestination", "deleteWidgetDomain", "deleteWorkflow", "deleteWorkflowContributor", "deleteWorkflowNote", "deleteWorkspace", "deleteWorkspaceInvitationAdmin", "denyWorkspaceInvitation", "describeSalesforceObject", "diffWorkflowRevisions", "disableConfluence", "disableCustomToolkit", "disableHubspot", "disableMcpServer", "disableMondayConnection", "disableSalesforce", "disconnectConfluence", "disconnectHubspot", "disconnectMondayConnection", "disconnectSalesforce", "discordLinkPreflight", "discoverOAuthMetadata", "dismissAllNotifications", "dismissNotification", "downloadEmailAttachment", "downloadFileContents", "downloadFilesZip", "downloadSiteSourceZip", "editWorkflowRevisionAsDraft", "enableConfluence", "enableCustomToolkit", "enableHubspot", "enableMcpServer", "enableMondayConnection", "enablePlatformApp", "enableSalesforce", "endTestChatRun", "enrollMembers", "evaluateTestChatRun", "executeAssignmentTool", "expireAnonymousMember", "exportChat", "exportChats", "exportMembers", "exportPhoneNumberOutboundAnalyticsCsv", "exportWorkspace", "exportWorkspaceZip", "fetchVoicemailAudio", "fhirBackfillEncounterSync", "fhirCheckPatientLinks", "fhirCreateEncounter", "fhirCsvImportApply", "fhirCsvImportInspect", "fhirFetchCareTeam", "fhirFetchEncounters", "fhirGetCsvImportRunItems", "fhirGetCsvImportRuns", "fhirGetCsvImportSettings", "fhirGetEncounterSyncRuns", "fhirGetEncounterSyncStatus", "fhirImportPatient", "fhirLinkMember", "fhirListLinkedMembers", "fhirRefreshEncounterPatient", "fhirRunEncounterSync", "fhirSearchLocations", "fhirSearchPatients", "fhirSearchPractitioners", "fhirSyncMember", "fhirUnlinkMember", "fhirUpdateCsvImportSettings", "fhirUpdateEncounterSync", "findOrCreateDMChat", "generateFileUploadUrl", "generateICalToken", "generateSiteMediaUploadUrl", "getAIUsageReport", "getAbilityType", "getAbilityTypes", "getAccessGrant", "getAccessGrants", "getAgent", "getAgentModeAttention", "getAgentTask", "getAgentTaskMessages", "getAgentTasks", "getAgents", "getAnonymousResolution", "getAnonymousFormSubmission", "getAnonymousFormSchema", "getAnonymousResolutions", "getApiKeys", "getArchiveBlockers", "getAssignment", "getAssignmentCelContext", "getAssignmentMessages", "getAssignmentTask", "getAssignmentTaskDetail", "getAssignmentTools", "getAssignments", "getAvailableActions", "getAvailablePhoneNumbers", "getAvailableSlots", "getInstallation", "getInstallationReadiness", "getThemeSettingsSchema", "getBundleDraft", "getBundleJourneyCandidate", "getBundle", "getBundleVersion", "getBusinessHoursStatus", "getCalendar", "getCalendarEvent", "getCalendarEventType", "getCalendarEventTypes", "getCalendarEvents", "getCalendarSchedules", "getCalendars", "getCallRecordingDownloadUrl", "getCelContext", "getCharlestonTestDeliveryRecipients", "getChat", "getChatByUuid", "getChatAssignmentTasks", "getChatBrowserLiveView", "saveChatBrowserStorage", "clearChatBrowserStorage", "getChatCallbacks", "getChatEhrWritebackOutcomes", "getChatEmails", "getChatFilter", "getChatFilterByUuid", "getChatFilterCount", "getChatFilters", "getChatLabel", "getChatLabelByUuid", "getChatLabels", "getChatMachineResources", "getChatMessages", "getChatTaskTransitions", "getChatModelOverride", "getChatPhoneCalls", "getChatSkills", "getManagerSkills", "getChatTodos", "getChatTokenUsage", "getChatToolCallMessages", "getChatTools", "getChats", "getChatsDailyCreationStats", "getChatsNeedsResponse", "getChildThreadMessages", "getClientWorkspace", "getConfigurationHealth", "getConfluenceStatus", "getConnectionSyncCapabilities", "getConnectionSyncCheckpoint", "getConnectionSyncConfig", "getCredentialUpdateInvites", "getCurrentMember", "clearMemberWorkflowVoice", "getMemberWorkflowVoices", "getMyDataTypes", "getMyRecords", "setMemberWorkflowVoice", "getCurrentSmsChat", "getCustomToolkit", "getCustomToolkits", "getDashboard", "getDashboardChannelStats", "getDashboardWorkflowAssignmentStats", "getDashboards", "getDataRecord", "getDataRecordByUuid", "getDataRecordChanges", "getDataRecordFilter", "getDataRecordFilterCount", "getDataRecordFilters", "getDataRecords", "getDataType", "getDataTypeDraft", "getDataTypeVersions", "getDataTypeByUuid", "getDataTypeBySlug", "getDataTypes", "getDevice", "getDeviceKinds", "getDevices", "getDiscordBot", "getDiscordBotAccounts", "getDiscordBotByUuid", "getDiscordBots", "getDiscordGuilds", "getDiscordThreads", "getDocumoFaxSetup", "listDocumoFaxes", "getDocumoFaxStatus", "getEdgeCaptureInfo", "getEnrollmentStatusLog", "getEventRule", "getEventRules", "getExperiment", "getExperimentStats", "getExperiments", "getFhirConnection", "getFhirConnectionByUuid", "getFhirConnections", "getFieldIndexStatus", "getFile", "getMondayBoardColumns", "getMondayBoardGroups", "getMondayBoards", "getMondayCurrentUserInfo", "getMotd", "getPhoneNumberOutboundAnalyticsCalls", "getPhoneNumberOutboundAnalyticsSummary", "getQueryFields", "getSiteSharing", "getSiteSource", "getSiteSourceTemplates", "getThemeSettings", "importSiteSourceZip", "installDocumoFax", "listChatRecordings", "previewQuery", "publishSiteSource", "publishDataTypeDraft", "saveDataTypeDraft", "queryWorkspaceActivity", "queryWorkspaceActivityLatestSubjects", "queryWorkspaceActivityOpenItems", "queryWorkspaceActivityOneView", "queryWorkspaceActivityDigest", "registerDiscordSlashCommands", "reopenWorkspaceSupportRequest", "resolveEntityRefs", "resetSiteSource", "resolveFilePath", "getFileLabel", "getFileLabelByUuid", "getFileLabels", "getFileSharing", "getFileVersionContentsUrl", "getFileVersionDiff", "getFiles", "getFirstRunState", "getFolder", "getFolderMemberAccess", "getFolderSharing", "getFolders", "getGoogleCalendarStatus", "getGranteeGrants", "getHealthieAvailableSlots", "getHealthieReconciliationMatches", "getHealthieStatus", "getPatientSyncStatus", "getHubspotContactProperties", "getHubspotManagedRules", "getHubspotReconciliationMatches", "getHubspotStatus", "getHubspotSyncLogs", "getHubspotTransformPresets", "getICalFeedUrl", "getImportSkippedRules", "getImportReadiness", "rebuildImportSkippedRules", "getInbox", "getInboxEmail", "getInboxEmails", "getInboxThreads", "getInboxes", "getInterventionRequests", "getJourney", "getJourneyAuthoring", "getJourneyFilterOptions", "getJourneyHealth", "getJourneyMembers", "getJourneyNotes", "getJourneyV2Validation", "getJourneys", "getLinkablePhones", "getLinkedHealthieMembers", "getLinkedHubspotMembers", "getLinkedMondayMembers", "getLinkedRecords", "getLinkedSalesforceMembers", "getLiveOperators", "getMcpServer", "getMcpServerPrompts", "getMcpServerResources", "getMcpServerTools", "getMcpServers", "getMemberByUuid", "getMemberExperiments", "getMemberFieldDefinitions", "getMemberFields", "getMemberFilter", "getMemberFilterCount", "getMemberFilters", "getMemberGrants", "getMemberJourneys", "getMemberLabel", "getMemberLabelByUuid", "getMemberLabels", "getMemberMemories", "getMemberMemory", "getMemberRecordCounts", "getMemberRelationships", "getMemberRole", "getMemberRoleCleanupPlan", "getMemberRoleByUuid", "getMemberRoles", "getMemberSyncLinks", "getMemberSyncSummary", "getMemberUsage", "getMembersMessageActivity", "getMenuItems", "getMessageTiming", "getMondayConnectionBoardColumns", "getMondayConnectionBoardGroups", "getMondayConnectionBoards", "getMondayConnectionStatus", "getMondayReconciliationMatches", "getMondaySyncConfig", "getMondaySyncLogs", "getMyCredentials", "getMyGivenGrants", "getMyReceivedGrants", "getNotification", "getNotificationRules", "getNotifications", "getOperatorChatMessages", "getOperatorGroup", "getOperatorGroups", "getOrCreateQualificationForWorkflow", "getPage", "getPageBySlug", "getPersona", "getPhoneCalls", "getPhoneNumber", "getPhoneNumberCalls", "getPhoneNumberFaxes", "getPhoneNumberMessages", "getPhoneNumberVoicemails", "getPhoneNumbers", "getPhoneUsageReport", "getPlatformApp", "getPlan", "getPresenceStatus", "getProducts", "getProject", "getProjects", "getPublicFile", "getPublicFolder", "getPublicFolderFiles", "getPublicProducts", "getQualification", "getQualifications", "getRecordingInfo", "getResellerWorkspaces", "getRoutine", "getRoutineConfigEvents", "getRoutineRuns", "getRoutines", "getRoutingRule", "getRoutingRules", "getRuleExecutions", "getSMSUsageReport", "getSalesforceReconciliationMatches", "getSalesforceStatus", "getSalesforceSyncConfig", "getSalesforceSyncLogs", "getScenario", "getSite", "getSiteByUuid", "getSiteCounts", "getSiteMenu", "getSitePages", "getSiteRenderedMenu", "getSiteRenderedPage", "getSites", "getSlackApp", "getSlackAppAccounts", "getSlackApps", "getSlackInstallations", "getSlackThreads", "getStepMemberCounts", "getStepMembers", "getSupervisor", "getSupervisors", "getSyncRunItems", "getSyncRuns", "getTask", "getTaskChats", "getTasks", "getTeamsApp", "getTeamsAppAccounts", "getTeamsApps", "getTeamsConversations", "getTeamsInstallations", "getTemplateContext", "getTestChatRun", "getThreadEmails", "getTool", "getToolCallNames", "getToolkits", "getTrackedLinkDestinations", "getTrackedLinkStats", "getTrackedLinkSummary", "getTrackedLinkTimeseries", "getUnreadNotificationCount", "getUsageDashboard", "getVariableRegistry", "getVoiceUsageReport", "getWebhookLogs", "getWorkflow", "getWorkflowOpeningTurnConversionReport", "getWorkflowActivity", "getWorkflowConfigValidation", "getWorkflowFeedback", "getWorkflowPromptClassifications", "reviewWorkflowPromptClassifications", "getWorkflowContributors", "getWorkflowDeletionPreview", "getWorkflowDiagram", "getWorkflowNotes", "getWorkflowOutline", "getWorkflowRevision", "getWorkflowRevisions", "getWorkflowTaskAssignmentStats", "getWorkflowTemplates", "getWorkflows", "getWorkflowsActivityBatch", "getWorkspace", "getWorkspaceActivityCounts", "getWorkspaceBuilder", "getWorkspaceBuilders", "getWorkspaceCounts", "getWorkspaceDefaults", "getWorkspaceEmailDomains", "getWorkspaceMember", "getWorkspaceMembers", "getWorkspaceNotices", "getWorkspaceProduct", "getWorkspaceSiteDomains", "getWorkspaceWidgetDomains", "getWorkspaceSubscriptions", "getWorkspaceSupportRequest", "getWorkspaceThemes", "installBundle", "grantBundle", "importFromBoard", "importHubspotMembers", "importMembers", "importSalesforceMembers", "importWorkspace", "importWorkspaceZip", "initiateOutboundCall", "inspectPrompt", "installHubspot", "installDocumoFax", "installMondayConnection", "installSalesforce", "inviteMemberCredentialUpdate", "inviteToWorkspace", "leaveWorkspace", "linkCalendarToGoogle", "linkCalendarToHealthie", "linkMemberToHealthie", "linkMemberToHubspot", "linkMemberToMonday", "linkMemberToSalesforce", "linkPhoneNumber", "linkUnlinkedSalesforceMembersByIdentity", "listAbilities", "listAnonymousFormSubmissions", "submitAnonymousForm", "listAppConnections", "listAvailableAppConnections", "listInstallations", "listBundleGrants", "listBundleJourneyCandidates", "listBundleVersions", "listBundles", "listBundleWorkflowCandidates", "updateBundle", "listBundleInstallations", "listConfluencePages", "listConfluenceSpaces", "listConnectionMemberFieldKeys", "listContactPermissions", "revokeBundleGrant", "rollbackSiteSource", "rotateDocumoFaxCredentials", "runQuery", "sendMemberPhoneConfirmation", "setDefaultGooglePlatformAccount", "listFileVersions", "listGoogleCalendars", "listHealthieAppointmentTypes", "listHealthiePatients", "listHealthieProviders", "listPersonas", "listMetrics", "getMetric", "createMetric", "updateMetric", "deleteMetric", "listMetricObservations", "getMetricSeries", "computeChatMetrics", "listPushSubscriptions", "listResourceWorkflows", "getResourceWorkflow", "getResourceWorkflowRevision", "listSalesforceObjects", "listScenarioHealthSummaries", "listScenarios", "listChatCapturedEffects", "listChatRecordChanges", "takeTestChatRunEmailTurn", "takeTestChatRunSmsTurn", "listTestChatRuns", "listWidgetDomains", "listWorkspaceInvitationsAdmin", "listWorkspaceSupportRequests", "markEmailAsRead", "markEmailAsUnread", "markNotificationAsRead", "mergeMemberRoles", "previewEmailReply", "previewImportMembers", "previewMemberWorkflowVoice", "previewRenameFieldSlug", "previewImportWorkspace", "previewInboxEmail", "preflightBundleInstallation", "previewRoutineVoiceReadiness", "previewSchedule", "previewRoutingRule", "previewTTS", "previewTemplate", "previewThinkingSound", "previewWorkspaceImport", "previewWorkspaceImportZip", "provisionClientWorkspace", "previewInstallationUpgrade", "publishBundle", "publishWorkflowRevision", "putJourneyDraft", "putJourneyV2Definition", "rateMessage", "getChatFeedback", "reenrollMember", "renameFieldSlug", "registerLinkedRolesMetadata", "registerPushSubscription", "reindexFolder", "releasePhoneNumber", "reorderRoutingRules", "removeFileRole", "removeFolderRole", "removeGroupMember", "reorderEventRules", "reorderMenuItems", "reconcileInstallation", "setInstallationPolicy", "upgradeInstallation", "replaceBundleDraft", "replyToEmail", "rotateDocumoFaxCredentials", "requestPhoneNumber", "requestWorkspaceMembership", "resetRoutineRuns", "resolveAccessGrant", "resolveAnonymousMember", "resolveInterventionRequest", "restoreFileVersion", "revokeAccessGrant", "revokeApiKey", "revokeDevice", "revokeICalToken", "runRoutine", "searchEventRules", "searchFolder", "searchHubspotRecords", "searchSalesforceRecords", "selectCurrentAssignmentTask", "sendAssistantMessage", "sendChatMessage", "sendInboxEmail", "sendOperatorMessage", "siteGoogleOAuthInitiate", "siteSendEmailCode", "siteSendPhoneCode", "siteSignup", "siteVerifyCode", "skipStep", "startConfluenceOAuth", "startHubspotOAuth", "startSalesforceOAuth", "startSyncRun", "startTestChatRun", "summarizeChat", "syncCalendarWithGoogle", "syncCalendarWithHealthie", "testFhirConnection", "testMcpServerConnection", "testMondayConnection", "testRunJourney", "testWebhook", "toggleFieldIndex", "unarchiveAgent", "unarchiveChat", "unarchiveDataType", "unarchiveMember", "unarchiveMemberByExternalId", "unarchivePersona", "unarchiveStep", "unarchiveTask", "unarchiveWorkflow", "unenrollMembers", "unlinkCalendarFromGoogle", "unlinkCalendarFromHealthie", "unlinkCredential", "unlinkMemberFromHealthie", "unlinkMemberFromHubspot", "unlinkMemberFromMonday", "unlinkMemberFromSalesforce", "unregisterPushSubscription", "updateAbility", "updateAgent", "updateAssignment", "updateCalendar", "updateCalendarEvent", "updateCalendarEventType", "updateCalendarSchedule", "updateChat", "updateChatFilter", "updateChatLabel", "updateChatModelOverride", "updateChatMute", "updateClientWorkspace", "updateConnection", "updateConnectionSyncConfig", "updateCurrentMember", "updateCustomTool", "updateCustomToolkit", "updateDashboard", "updateDataRecord", "updateDataRecordFilter", "updateDataType", "updateDevice", "updateDiscordBot", "updateEventAttendee", "updateEventRule", "updateExperiment", "updateExperimentAssignment", "updateExperimentGroup", "updateFhirConnection", "updateFile", "updateFileLabel", "updateFileRoles", "updateFileSharing", "updateFirstRunState", "updateFolder", "updateFolderRoles", "updateFolderSharing", "updateGoal", "updateInbox", "updateJourney", "updateJourneyNote", "updateMcpServer", "updateMember", "updateMemberByExternalId", "updateMemberField", "updateMemberFilter", "updateMemberLabel", "updateMemberRole", "updateMenuItem", "updateMondaySyncConfig", "updateNotificationRule", "updateOperatorGroup", "updatePage", "updatePersona", "updatePhoneNumber", "updatePlatformApp", "updatePlan", "updateProduct", "updateProject", "updateRoutine", "updateRoutingRule", "updateSalesforceSyncConfig", "resyncSalesforceLinkedMembers", "updateScenario", "updateSite", "updateSiteSharing", "updateSlackApp", "updateStep", "updateSupervisor", "updateTask", "updateTeamsApp", "updateThemeSettings", "updateTrackedLinkDestination", "uploadFile", "updateVoicemailStatus", "updateWorkflow", "convertWorkflowStartTaskOpeningMessage", "updateWorkflowContributor", "updateWorkflowNote", "updateWorkflowRevisionMetadata", "updateWorkspace", "updateWorkspaceDefaults", "updateWorkspaceInvitationAdmin", "upsertDataRecord", "upsertWidgetDomain", "validateCelExpression", "validateDataTypeSlug", "validateQuery", "validateWorkflowName", "verifyDocumoFax"];
30176
30204
  type WorkspaceMethodName = (typeof WORKSPACE_METHOD_NAMES)[number];
30177
30205
  type WorkspaceMethodKey = Extract<WorkspaceMethodName, keyof GravityRailClient>;
30178
30206
  type WorkspaceBoundMethod<T> = T extends (workspaceUuid: string, ...args: infer Args) => infer R ? (...args: Args) => R : never;
@@ -30595,6 +30623,7 @@ interface AuthBindings {
30595
30623
  requestCrossDomainToken: AuthApi['requestCrossDomainToken'];
30596
30624
  exchangeToken: AuthApi['exchangeToken'];
30597
30625
  createRealtimeLoginToken: AuthApi['createRealtimeLoginToken'];
30626
+ createWorkspaceRealtimeLoginToken: AuthApi['createWorkspaceRealtimeLoginToken'];
30598
30627
  getDomainMapping: AuthApi['getDomainMapping'];
30599
30628
  createSignup: AuthApi['createSignup'];
30600
30629
  createAccount: AuthApi['emailPasswordSignup'];
@@ -30799,6 +30828,7 @@ interface WorkflowsBindings {
30799
30828
  getTaskChats: WorkflowsApi['getTaskChats'];
30800
30829
  getWorkflowConfigValidation: WorkflowsApi['getWorkflowConfigValidation'];
30801
30830
  getWorkflowPromptClassifications: WorkflowsApi['getWorkflowPromptClassifications'];
30831
+ reviewWorkflowPromptClassifications: WorkflowsApi['reviewWorkflowPromptClassifications'];
30802
30832
  getWorkflowNotes: WorkflowNotesApi['getWorkflowNotes'];
30803
30833
  createWorkflowNote: WorkflowNotesApi['createWorkflowNote'];
30804
30834
  updateWorkflowNote: WorkflowNotesApi['updateWorkflowNote'];
@@ -32007,6 +32037,7 @@ declare class GravityRailClient implements TasksBindings, ChatsBindings, CallsBi
32007
32037
  requestCrossDomainToken: AuthBindings['requestCrossDomainToken'];
32008
32038
  exchangeToken: AuthBindings['exchangeToken'];
32009
32039
  createRealtimeLoginToken: AuthBindings['createRealtimeLoginToken'];
32040
+ createWorkspaceRealtimeLoginToken: AuthBindings['createWorkspaceRealtimeLoginToken'];
32010
32041
  getDomainMapping: AuthBindings['getDomainMapping'];
32011
32042
  createSignup: AuthBindings['createSignup'];
32012
32043
  createAccount: AuthBindings['createAccount'];
@@ -32174,6 +32205,7 @@ declare class GravityRailClient implements TasksBindings, ChatsBindings, CallsBi
32174
32205
  getTaskChats: WorkflowsBindings['getTaskChats'];
32175
32206
  getWorkflowConfigValidation: WorkflowsBindings['getWorkflowConfigValidation'];
32176
32207
  getWorkflowPromptClassifications: WorkflowsBindings['getWorkflowPromptClassifications'];
32208
+ reviewWorkflowPromptClassifications: WorkflowsBindings['reviewWorkflowPromptClassifications'];
32177
32209
  getWorkflowNotes: WorkflowsBindings['getWorkflowNotes'];
32178
32210
  createWorkflowNote: WorkflowsBindings['createWorkflowNote'];
32179
32211
  updateWorkflowNote: WorkflowsBindings['updateWorkflowNote'];
@@ -202,7 +202,7 @@ var BaseApiClient = class {
202
202
  this.enhancedAuthInProgress = this.enhancedAuthHandler();
203
203
  try {
204
204
  const newToken = await this.enhancedAuthInProgress;
205
- this.apiKey = newToken;
205
+ if (this.apiKey) this.apiKey = newToken;
206
206
  } finally {
207
207
  this.enhancedAuthInProgress = null;
208
208
  }
@@ -313,7 +313,7 @@ ${formattedErrors}`, response.status);
313
313
  this.enhancedAuthInProgress = this.enhancedAuthHandler();
314
314
  try {
315
315
  const newToken = await this.enhancedAuthInProgress;
316
- this.apiKey = newToken;
316
+ if (this.apiKey) this.apiKey = newToken;
317
317
  } finally {
318
318
  this.enhancedAuthInProgress = null;
319
319
  }
@@ -446,4 +446,4 @@ export {
446
446
  BaseApiClient,
447
447
  ChatInteractionController
448
448
  };
449
- //# sourceMappingURL=chunk-TGL72KPS.js.map
449
+ //# sourceMappingURL=chunk-GCN4OMYU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/base.ts","../src/helpers/chat-interaction.ts"],"sourcesContent":["// Utility function to read a specific cookie value\nexport function getCookieValue(name: string): string | undefined {\n if (typeof document === 'undefined') return undefined;\n\n const cookies = document.cookie.split(';');\n for (const cookie of cookies) {\n const trimmedCookie = cookie.trim();\n const eqIndex = trimmedCookie.indexOf('=');\n if (eqIndex === -1) continue;\n\n const cookieName = trimmedCookie.substring(0, eqIndex);\n const cookieValue = trimmedCookie.substring(eqIndex + 1);\n\n if (cookieName === name) {\n return cookieValue;\n }\n }\n\n return undefined;\n}\n\n/**\n * Structured validation error returned by the backend's workflow-expression\n * validator (CEL / Jinja schema checks). See WorkflowValidationErrorResponse\n * in workflowValidationTypes.ts for the public-facing shape.\n */\nexport interface ApiValidationError {\n field: string;\n kind: 'cel_syntax' | 'cel_schema' | 'jinja_syntax' | 'jinja_schema';\n message: string;\n offendingPath: string | null;\n location: {\n start: number;\n end: number;\n line: number;\n column: number;\n length: number;\n } | null;\n suggestion: string | null;\n}\n\nfunction isApiValidationError(value: unknown): value is ApiValidationError {\n if (!value || typeof value !== 'object') return false;\n const v = value as Record<string, unknown>;\n return (\n typeof v.field === 'string' && typeof v.kind === 'string' && typeof v.message === 'string'\n );\n}\n\n/** Browser-console sink for API failures. A fixed event name only — never the\n * error object, its ``name``, or response-derived ``message``/``errorData``. */\nfunction logApiClientError(_error: unknown): void {\n console.warn('API request failed');\n}\n\nexport class ApiError extends Error {\n statusCode: number;\n /** Legacy string-array errors — kept for non-validation callers. */\n errors?: string[];\n /**\n * Structured workflow-expression validation errors (CEL/Jinja).\n * Populated when the backend returns a WorkflowValidationErrorResponse.\n */\n validationErrors?: ApiValidationError[];\n /**\n * The raw structured `detail` object when the backend returned one (a body\n * with `error: true` or a `code`). Declared here rather than bolted on with\n * `as any` at the throw site so consumers can narrow it with a type guard —\n * see `isMemberContactConflict` in `types/member-types`.\n */\n errorData?: unknown;\n\n constructor(\n message: string,\n statusCode: number,\n errors?: string[],\n validationErrors?: ApiValidationError[]\n ) {\n super(message);\n this.name = 'ApiError';\n this.statusCode = statusCode;\n this.errors = errors;\n this.validationErrors = validationErrors;\n }\n}\n\n/**\n * Handler for enhanced authentication requirement (RFC 9470 Step-Up Authentication).\n * Called when a 401 response includes WWW-Authenticate header with\n * error=\"insufficient_user_authentication\".\n * Should return a promise that resolves with the new auth token after re-auth.\n */\nexport type EnhancedAuthHandler = () => Promise<string>;\n\n/**\n * Info parsed from WWW-Authenticate header for org auth requirement.\n */\nexport interface OrgAuthInfo {\n orgUuid: string;\n authUrl: string;\n}\n\n/**\n * Handler for organization authentication requirement.\n * Called when a 401 response includes WWW-Authenticate header with realm=\"org\".\n * The handler should redirect the user to the auth URL for consent/SSO.\n * Returns a promise that resolves when the user should retry (after page reload with cookie).\n */\nexport type OrgAuthHandler = (info: OrgAuthInfo) => Promise<void>;\n\n/**\n * Check if a WWW-Authenticate header indicates step-up authentication is required.\n * Per RFC 9470, this is indicated by error=\"insufficient_user_authentication\".\n */\nfunction requiresStepUpAuth(wwwAuthenticate: string | null): boolean {\n if (!wwwAuthenticate) return false;\n return wwwAuthenticate.includes('error=\"insufficient_user_authentication\"');\n}\n\n/**\n * Parse org auth info from WWW-Authenticate header.\n * Returns null if this is not an org auth challenge.\n * Expected format: Bearer realm=\"org\", org_uuid=\"...\", auth_url=\"...\"\n * (the challenge names no cookie: a browser's org session is an httpOnly\n * cookie on its own host, and a bearer client sends `X-Org-Session`).\n *\n * Exported so non-SDK fetch paths (e.g. the app's same-origin file-content\n * proxy fetches) can detect the same challenge and trigger the shared org\n * step-up flow.\n */\nexport function parseOrgAuthChallenge(wwwAuthenticate: string | null): OrgAuthInfo | null {\n if (!wwwAuthenticate) return null;\n if (!wwwAuthenticate.includes('realm=\"org\"')) return null;\n\n // Parse the key-value pairs from the header\n const orgUuidMatch = wwwAuthenticate.match(/org_uuid=\"([^\"]+)\"/);\n const authUrlMatch = wwwAuthenticate.match(/auth_url=\"([^\"]+)\"/);\n\n if (!orgUuidMatch?.[1] || !authUrlMatch?.[1]) {\n // Don't log the raw header value — it embeds org_uuid + auth_url.\n console.warn('Invalid org auth challenge header: missing required fields');\n return null;\n }\n\n return {\n orgUuid: orgUuidMatch[1],\n authUrl: authUrlMatch[1],\n };\n}\n\nfunction orgAuthHeaderName(token: string): 'X-Org-Token' | 'X-Org-Session' {\n return token.startsWith('gr_sess_') ? 'X-Org-Session' : 'X-Org-Token';\n}\n\nfunction setOrgAuthHeader(headers: Headers, token: string | undefined): void {\n if (!token) return;\n headers.set(orgAuthHeaderName(token), token);\n}\n\n/**\n * Transport and credential for every request the client makes.\n *\n * - **Bearer** (`apiKey` set): `Authorization: Bearer <apiKey>` on every\n * request, no cookies. This is how non-browser consumers (the CLI, servers,\n * API keys) and bearer-holding browser runtimes (widget iframes) call the API.\n * - **Same-origin session** (no `apiKey`): no `Authorization` header and\n * `credentials: 'same-origin'`. The browser presents the host's httpOnly\n * session cookie, and only to the origin the page is on; the client never\n * reads a cookie to build a credential. A browser app points `baseUrl` at its\n * own origin, which serves `/api/v2` (Gravity Rail's edge on full-account\n * hosts, the frontend's proxy on Site hosts).\n *\n * The org-auth challenge (`WWW-Authenticate: Bearer realm=\"org\"`) is answered by\n * `setOrgAuthHandler`. A bearer client's handler hands back the org session with\n * `setOrgSession`, which is sent as `X-Org-Session`; in same-origin session\n * mode the org session is an httpOnly cookie on the page's origin, so the\n * request is retried once after the handler and the browser presents it.\n */\nexport class BaseApiClient {\n protected baseUrl: string;\n protected apiKey: string | undefined;\n protected isCrossDomain: boolean;\n protected fetchFunction: typeof fetch;\n private enhancedAuthHandler?: EnhancedAuthHandler;\n private enhancedAuthInProgress: Promise<string> | null = null;\n private orgAuthHandler?: OrgAuthHandler;\n private orgAuthInProgress: Promise<void> | null = null;\n private orgSession?: string;\n /**\n * The org_uuid that issued the current org auth credential. Tracked so we can detect\n * a 401 challenge from a *different* org and re-fire the handler — the\n * credential is opaque to the client, so without this the original guard\n * `!this.orgSession` would prevent re-auth across orgs and surface as a silent\n * 401 in multi-org CLI workflows.\n */\n private orgSessionOrgUuid?: string;\n\n constructor(apiKey: string | undefined, baseUrl: string, customFetch?: typeof fetch) {\n this.baseUrl = baseUrl;\n this.apiKey = apiKey;\n // console.log('[BaseApiClient] constructor - baseUrl:', baseUrl);\n // Bind fetch to its proper context (window in browser, global in Node)\n this.fetchFunction =\n customFetch || (typeof window !== 'undefined' ? fetch.bind(window) : fetch);\n\n // Determine if we're making cross-domain requests by comparing current origin to API origin\n const apiUrlParsed = new URL(baseUrl);\n const currentOrigin = typeof window !== 'undefined' ? window.location.origin : '';\n this.isCrossDomain = currentOrigin !== '' && currentOrigin !== apiUrlParsed.origin;\n // console.log('[BaseApiClient] isCrossDomain:', this.isCrossDomain, 'currentOrigin:', currentOrigin, 'apiOrigin:', apiUrlParsed.origin);\n }\n\n /**\n * Set the handler for enhanced authentication requirements (RFC 9470 Step-Up Auth).\n * This handler is called when a 401 response includes WWW-Authenticate header\n * with error=\"insufficient_user_authentication\".\n */\n setEnhancedAuthHandler(handler: EnhancedAuthHandler | undefined) {\n this.enhancedAuthHandler = handler;\n }\n\n /**\n * Set the handler for organization authentication requirements.\n * This handler is called when a 401 response includes WWW-Authenticate header\n * with realm=\"org\". The handler should redirect the user to complete org auth.\n */\n setOrgAuthHandler(handler: OrgAuthHandler | undefined) {\n this.orgAuthHandler = handler;\n }\n\n /**\n * Update the API key (used after successful re-authentication).\n */\n updateApiKey(newApiKey: string) {\n this.apiKey = newApiKey;\n }\n\n /**\n * Set the opaque org session credential a bearer client sends as `X-Org-Session`.\n * Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still\n * use X-Org-Token through setOrgToken() during the migration window.\n *\n * `orgUuid` is the org that issued the credential; passing it lets the 401\n * handler detect a stale session when a subsequent request targets a\n * different org and re-fire the org-auth handler instead of silently\n * 401-ing. Callers without that context (legacy / unknown) may omit it.\n */\n setOrgSession(session: string | undefined, orgUuid?: string) {\n this.orgSession = session;\n this.orgSessionOrgUuid = session ? orgUuid : undefined;\n }\n\n /**\n * @deprecated Legacy compatibility for stateless orgToken JWE credentials.\n * Prefer setOrgSession() for opaque org browser sessions.\n */\n setOrgToken(token: string | undefined, orgUuid?: string) {\n this.setOrgSession(token, orgUuid);\n }\n\n /**\n * The `credentials` a request carries: none for a bearer client (the fetch\n * default), the page's own-origin cookies for a same-origin session.\n */\n private credentialsInit(): Pick<RequestInit, 'credentials'> {\n return this.apiKey ? {} : { credentials: 'same-origin' };\n }\n\n /**\n * Run the org-auth handler once for concurrent challenges. A bearer client's\n * handler sets the org session with `setOrgSession`; a same-origin session's\n * handler leaves an httpOnly org-session cookie on the page's origin instead,\n * which the retry presents. A bearer client whose handler issued nothing has\n * nothing to retry with.\n */\n private async answerOrgAuthChallenge(orgAuthInfo: OrgAuthInfo): Promise<void> {\n const handler = this.orgAuthHandler;\n if (!handler) return;\n if (!this.orgAuthInProgress) {\n this.orgAuthInProgress = (async () => {\n try {\n await handler(orgAuthInfo);\n } finally {\n this.orgAuthInProgress = null;\n }\n })();\n }\n await this.orgAuthInProgress;\n if (this.orgSession) {\n this.orgSessionOrgUuid = orgAuthInfo.orgUuid;\n return;\n }\n if (this.apiKey) {\n throw new ApiError('Organization authentication did not issue a session', 401);\n }\n }\n\n protected async fetch<T>(\n endpoint: string,\n options?: RequestInit,\n orgAuthRetry = false\n ): Promise<T> {\n try {\n const headers = new Headers({\n // Don't set Content-Type for FormData — the browser must set it\n // with the multipart boundary automatically.\n ...(options?.body instanceof FormData ? {} : { 'Content-Type': 'application/json' }),\n ...((options?.headers as Record<string, string>) || {}),\n });\n\n if (this.apiKey) {\n headers.set('Authorization', `Bearer ${this.apiKey}`);\n }\n\n setOrgAuthHeader(headers, this.orgSession);\n\n // console.warn(\"Calling with apiKey:\", this.apiKey)\n const fullUrl = `${this.baseUrl}/api/v2/${endpoint}`;\n // console.log('[BaseApiClient] fetch - URL:', fullUrl, 'baseUrl:', this.baseUrl, 'endpoint:', endpoint);\n\n const response = await this.fetchFunction(fullUrl, {\n ...options,\n ...this.credentialsInit(),\n ...(this.isCrossDomain ? { mode: 'cors' } : {}),\n headers,\n });\n\n if (!response.ok) {\n // Check for step-up auth requirement per RFC 9470 (superuser 2FA re-auth needed)\n if (\n response.status === 401 &&\n requiresStepUpAuth(response.headers.get('WWW-Authenticate')) &&\n this.enhancedAuthHandler\n ) {\n // If re-auth is already in progress, wait for it\n if (this.enhancedAuthInProgress) {\n await this.enhancedAuthInProgress;\n } else {\n // Trigger re-auth and wait for completion\n this.enhancedAuthInProgress = this.enhancedAuthHandler();\n try {\n const newToken = await this.enhancedAuthInProgress;\n if (this.apiKey) this.apiKey = newToken;\n } finally {\n this.enhancedAuthInProgress = null;\n }\n }\n // Retry the request with the new token\n try {\n return await this.fetch<T>(endpoint, options);\n } catch (retryError) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n throw retryError;\n }\n }\n\n if (response.status === 401) {\n const orgAuthInfo = parseOrgAuthChallenge(response.headers.get('WWW-Authenticate'));\n // If the challenge targets a different org than our current\n // token, the token is stale (e.g. switching from Org A to Org\n // B mid-session). Clear it so the handler re-fires below.\n if (\n orgAuthInfo &&\n this.orgSession &&\n this.orgSessionOrgUuid &&\n this.orgSessionOrgUuid !== orgAuthInfo.orgUuid\n ) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n }\n if (orgAuthInfo && !this.orgSession && !orgAuthRetry && this.orgAuthHandler) {\n await this.answerOrgAuthChallenge(orgAuthInfo);\n try {\n return await this.fetch<T>(endpoint, options, true);\n } catch (retryError) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n throw retryError;\n }\n }\n }\n\n const errorData = await response.json().catch(() => ({}));\n\n // Handle unauthorized errors for account endpoint\n if (response.status === 401 && endpoint === 'account') {\n throw new Error('unauthorized');\n }\n\n // Handle structured validation errors (Pydantic array format)\n if (Array.isArray(errorData.detail)) {\n const formattedErrors = errorData.detail\n .map((error: any) => {\n const location = error.loc.join(' > ');\n return `${location}: ${error.msg}`;\n })\n .join('\\n');\n throw new ApiError(`Validation Error:\\n${formattedErrors}`, response.status);\n }\n\n // Handle validation errors with errors array (new format)\n if (errorData.errors && Array.isArray(errorData.errors)) {\n // Structured workflow-expression validation errors — objects with\n // { field, kind, message, offendingPath, location }. Build a\n // readable message and preserve the structured payload.\n if (errorData.errors.length > 0 && isApiValidationError(errorData.errors[0])) {\n const validationErrors: ApiValidationError[] =\n errorData.errors.filter(isApiValidationError);\n const [first] = validationErrors;\n if (first) {\n const extra =\n validationErrors.length > 1\n ? ` (+${validationErrors.length - 1} more)`\n : '';\n const readable = `${first.field}: ${first.message}${extra}`;\n throw new ApiError(\n readable,\n response.status,\n validationErrors.map((e) => `${e.field}: ${e.message}`),\n validationErrors\n );\n }\n }\n\n // Legacy string-array errors.\n const stringErrors: string[] = errorData.errors.filter(\n (e: unknown): e is string => typeof e === 'string'\n );\n const details = stringErrors.join('; ');\n const message = errorData.detail\n ? `${errorData.detail}: ${details}`\n : `Validation failed: ${details}`;\n throw new ApiError(message, response.status, stringErrors);\n }\n\n // Handle structured errors (with error: true or with code property).\n //\n // TWO body shapes reach here and both carry structure:\n //\n // * `detail` IS the structured object — the member/account contact\n // conflicts build their whole payload as `HTTPException.detail`.\n // * `detail` is PROSE and the machine-readable fields sit beside it\n // at the top level. That is what the domain exception handlers\n // emit: `conflict_handler` writes `{detail, code, ...payload}`, so\n // a Journey v2 refusal arrives as\n // `{detail: \"...\", code: \"journey_v2_invalid_topology\", issues: [...]}`.\n //\n // `detail || errorData` picked the prose string for the second shape,\n // which is not an object, so the branch fell through and `code` and\n // `issues` were dropped on the floor — leaving a client unable to\n // tell a definition conflict from a structural refusal, or to point\n // at the resources a validator rejected. Prefer an OBJECT detail and\n // otherwise read the body itself; the message is unchanged in both\n // cases (prose still wins when there is prose).\n const detail = errorData.detail;\n const structuredError = detail && typeof detail === 'object' ? detail : errorData;\n if (\n structuredError &&\n typeof structuredError === 'object' &&\n (structuredError.error === true || structuredError.code)\n ) {\n const message =\n (typeof detail === 'string' && detail) ||\n structuredError.message ||\n structuredError.code ||\n 'Unknown error';\n const error = new ApiError(message, response.status);\n // Attach the full error data for frontend handling\n error.errorData = structuredError;\n throw error;\n }\n\n // Handle simple error messages\n const errorMessage =\n typeof errorData.detail === 'string'\n ? errorData.detail\n : errorData.message || response.statusText;\n const simpleError = new ApiError(errorMessage, response.status);\n // A prose `detail` STRING alongside a top-level `code` is the shape\n // the backend's domain-validation handler produces: it merges an\n // exception's `payload` into the body and keeps `detail`\n // authoritative. That misses the structured branch above, because\n // `errorData.detail || errorData` resolves to the string. Carry the\n // body through so a caller can still branch on the token — the\n // alternative is parsing `detail`, which is deliberately\n // human-facing prose and not a stable contract.\n if (typeof errorData.code === 'string') {\n simpleError.errorData = errorData;\n }\n throw simpleError;\n }\n\n // Handle 204 No Content - no JSON body to parse\n if (response.status === 204) {\n return undefined as any;\n }\n\n return response.json();\n } catch (error) {\n logApiClientError(error);\n throw error;\n }\n }\n\n protected async fetchRaw(\n endpoint: string,\n options?: RequestInit,\n allowedErrorStatuses: number[] = [],\n orgAuthRetry = false\n ): Promise<Response> {\n try {\n const headers = new Headers({\n ...((options?.headers as Record<string, string>) || {}),\n });\n\n if (this.apiKey) {\n headers.set('Authorization', `Bearer ${this.apiKey}`);\n }\n\n setOrgAuthHeader(headers, this.orgSession);\n\n const response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {\n ...options,\n ...this.credentialsInit(),\n ...(this.isCrossDomain ? { mode: 'cors' } : {}),\n headers,\n });\n\n if (!response.ok) {\n // Check for step-up auth requirement per RFC 9470 (superuser 2FA re-auth needed)\n if (\n response.status === 401 &&\n requiresStepUpAuth(response.headers.get('WWW-Authenticate')) &&\n this.enhancedAuthHandler\n ) {\n // If re-auth is already in progress, wait for it\n if (this.enhancedAuthInProgress) {\n await this.enhancedAuthInProgress;\n } else {\n // Trigger re-auth and wait for completion\n this.enhancedAuthInProgress = this.enhancedAuthHandler();\n try {\n const newToken = await this.enhancedAuthInProgress;\n if (this.apiKey) this.apiKey = newToken;\n } finally {\n this.enhancedAuthInProgress = null;\n }\n }\n // Retry the request with the new token\n try {\n return await this.fetchRaw(endpoint, options, allowedErrorStatuses);\n } catch (retryError) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n throw retryError;\n }\n }\n\n // Mirror of the org-auth branch in fetch() above; see comments there.\n if (response.status === 401) {\n const orgAuthInfo = parseOrgAuthChallenge(response.headers.get('WWW-Authenticate'));\n if (\n orgAuthInfo &&\n this.orgSession &&\n this.orgSessionOrgUuid &&\n this.orgSessionOrgUuid !== orgAuthInfo.orgUuid\n ) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n }\n if (orgAuthInfo && !this.orgSession && !orgAuthRetry && this.orgAuthHandler) {\n await this.answerOrgAuthChallenge(orgAuthInfo);\n try {\n return await this.fetchRaw(endpoint, options, allowedErrorStatuses, true);\n } catch (retryError) {\n this.orgSession = undefined;\n this.orgSessionOrgUuid = undefined;\n throw retryError;\n }\n }\n }\n\n if (allowedErrorStatuses.includes(response.status)) {\n return response;\n }\n\n const errorText = await response.text().catch(() => '');\n throw new ApiError(errorText || response.statusText, response.status);\n }\n\n return response;\n } catch (error) {\n logApiClientError(error);\n throw error;\n }\n }\n\n /**\n * Fetch from root path (not prefixed with /api/v2/)\n * Used for OAuth and other non-API endpoints\n */\n protected async fetchRoot<T>(path: string, options?: RequestInit): Promise<T> {\n try {\n const headers = new Headers({\n ...(options?.body instanceof FormData ? {} : { 'Content-Type': 'application/json' }),\n ...((options?.headers as Record<string, string>) || {}),\n });\n\n if (this.apiKey) {\n headers.set('Authorization', `Bearer ${this.apiKey}`);\n }\n\n setOrgAuthHeader(headers, this.orgSession);\n\n const fullUrl = `${this.baseUrl}/${path}`;\n\n const response = await this.fetchFunction(fullUrl, {\n ...options,\n ...this.credentialsInit(),\n ...(this.isCrossDomain ? { mode: 'cors' } : {}),\n headers,\n });\n\n if (!response.ok) {\n if (response.status === 404) {\n return null as T;\n }\n const errorData = await response.json().catch(() => ({}));\n const errorMessage = errorData.detail || errorData.message || response.statusText;\n throw new ApiError(errorMessage, response.status);\n }\n\n if (response.status === 204) {\n return undefined as T;\n }\n\n return response.json();\n } catch (error) {\n logApiClientError(error);\n throw error;\n }\n }\n}\n","import type { ChatsApi } from '../api/chats';\nimport type { InteractionMode, InteractionSessionResponse } from '../types/chat-types';\n\ntype InteractionApi = Pick<\n ChatsApi,\n 'createChatInteractionSession' | 'transitionChatInteractionSession'\n>;\n\n/** One client's mode history in one Chat. Create a separate controller per device/session. */\nexport class ChatInteractionController {\n private current: InteractionSessionResponse | undefined;\n private pending: { mode: InteractionMode; requestId: string } | undefined;\n private tail: Promise<unknown> = Promise.resolve();\n private readonly clientSessionId = crypto.randomUUID();\n\n constructor(\n private readonly api: InteractionApi,\n private readonly workspaceId: string,\n private readonly chatId: number\n ) {}\n\n /** Serialize switches and reuse request IDs when a response is lost. */\n ensure(mode: InteractionMode): Promise<InteractionSessionResponse> {\n const operation = this.tail.then(async () => {\n // Resolve an uncertain earlier write before selecting the next mode.\n if (this.pending) await this.applyPending();\n if (this.current?.mode !== mode) {\n this.pending = { mode, requestId: crypto.randomUUID() };\n await this.applyPending();\n }\n if (!this.current) throw new Error('Interaction session unavailable');\n return this.current;\n });\n this.tail = operation.catch(() => undefined);\n return operation;\n }\n\n private async applyPending(): Promise<void> {\n const pending = this.pending;\n if (!pending) return;\n this.current = this.current\n ? await this.api.transitionChatInteractionSession(\n this.workspaceId,\n this.chatId,\n this.current.id,\n pending\n )\n : await this.api.createChatInteractionSession(this.workspaceId, this.chatId, {\n ...pending,\n clientSessionId: this.clientSessionId,\n });\n this.pending = undefined;\n }\n}\n"],"mappings":";AACO,SAAS,eAAe,MAAkC;AAC9D,MAAI,OAAO,aAAa,YAAa,QAAO;AAE5C,QAAM,UAAU,SA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AAO,WAAW,EAAE;AACtD,cAAM,KAAK,aAAa;AAAA,MAC3B;AACA,UAAI,CAAC,KAAK,QAAS,OAAM,IAAI,MAAM,iCAAiC;AACpE,aAAO,KAAK;AAAA,IACf,CAAC;AACD,SAAK,OAAO,UAAU,MAAM,MAAM,MAAS;AAC3C,WAAO;AAAA,EACV;AAAA,EAEA,MAAc,eAA8B;AACzC,UAAM,UAAU,KAAK;AACrB,QAAI,CAAC,QAAS;AACd,SAAK,UAAU,KAAK,UACf,MAAM,KAAK,IAAI;AAAA,MACZ,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK,QAAQ;AAAA,MACb;AAAA,IACH,IACA,MAAM,KAAK,IAAI,6BAA6B,KAAK,aAAa,KAAK,QAAQ;AAAA,MACxE,GAAG;AAAA,MACH,iBAAiB,KAAK;AAAA,IACzB,CAAC;AACN,SAAK,UAAU;AAAA,EAClB;AACH;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ApiError,
3
3
  BaseApiClient
4
- } from "./chunk-TGL72KPS.js";
4
+ } from "./chunk-GCN4OMYU.js";
5
5
 
6
6
  // src/api/abilities.ts
7
7
  var AbilitiesApi = class extends BaseApiClient {
@@ -967,7 +967,7 @@ var AuthApi = class extends BaseApiClient {
967
967
  isSignUp
968
968
  })
969
969
  });
970
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
970
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
971
971
  const completeResponse = await fetch(`/api/auth/complete`, {
972
972
  method: "POST",
973
973
  headers: { "Content-Type": "application/json" },
@@ -1056,6 +1056,18 @@ var AuthApi = class extends BaseApiClient {
1056
1056
  body: JSON.stringify({})
1057
1057
  });
1058
1058
  }
1059
+ /**
1060
+ * Mint a single-use realtime login token (`gr_wst_`) bound to one
1061
+ * workspace, with this client's credential. A credential narrower than the
1062
+ * full browser session (a Site session, a device, a widget session) mints
1063
+ * this kind; it opens only that workspace's sockets. Call once per connect
1064
+ * attempt.
1065
+ */
1066
+ async createWorkspaceRealtimeLoginToken(workspaceUuid) {
1067
+ return this.fetch(`w/${workspaceUuid}/realtime/ws-token`, {
1068
+ method: "POST"
1069
+ });
1070
+ }
1059
1071
  /** Get the organization and workspace mapping for a custom domain. */
1060
1072
  async getDomainMapping(customDomain) {
1061
1073
  return this.fetch(`s/mapping/${customDomain}`);
@@ -1096,7 +1108,7 @@ var AuthApi = class extends BaseApiClient {
1096
1108
  method: "POST",
1097
1109
  body: JSON.stringify({ email, code, organizationUuid })
1098
1110
  });
1099
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
1111
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
1100
1112
  const completeResponse = await fetch(`/api/auth/complete`, {
1101
1113
  method: "POST",
1102
1114
  headers: { "Content-Type": "application/json" },
@@ -7688,7 +7700,7 @@ var SitesApi = class extends BaseApiClient {
7688
7700
  method: "POST",
7689
7701
  body: JSON.stringify({ code, phoneNumber, email })
7690
7702
  });
7691
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
7703
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
7692
7704
  const completeResponse = await fetch(`/api/auth/complete`, {
7693
7705
  method: "POST",
7694
7706
  headers: { "Content-Type": "application/json" },
@@ -8939,7 +8951,7 @@ var WorkflowsApi = class extends BaseApiClient {
8939
8951
  * Classify the prompts of a Workflow's draft revision.
8940
8952
  *
8941
8953
  * A decision model reads each live Task with Workflow or Task instructions
8942
- * and reports which
8954
+ * or an active outgoing Choice prompt and reports which
8943
8955
  * prompt classifications probably apply. Each call asks the model again.
8944
8956
  */
8945
8957
  async getWorkflowPromptClassifications(wid, workflowId) {
@@ -8947,6 +8959,13 @@ var WorkflowsApi = class extends BaseApiClient {
8947
8959
  `w/${wid}/workflows/${workflowId}/prompt-classifications`
8948
8960
  );
8949
8961
  }
8962
+ /** Review prompt diagnoses and report rebutted findings to Customer Success. */
8963
+ async reviewWorkflowPromptClassifications(wid, workflowId) {
8964
+ return this.fetch(
8965
+ `w/${wid}/workflows/${workflowId}/prompt-classifications`,
8966
+ { method: "POST" }
8967
+ );
8968
+ }
8950
8969
  /**
8951
8970
  * Replay automatic routing for a Chat without performing the transition.
8952
8971
  *
@@ -11998,6 +12017,7 @@ var WORKSPACE_METHOD_NAMES = [
11998
12017
  "createWorkflowNote",
11999
12018
  "createWorkflowOutboundVoiceChat",
12000
12019
  "createWorkspaceMember",
12020
+ "createWorkspaceRealtimeLoginToken",
12001
12021
  "createWorkspaceSupportRequest",
12002
12022
  "deleteAbility",
12003
12023
  "deleteAgent",
@@ -12479,6 +12499,7 @@ var WORKSPACE_METHOD_NAMES = [
12479
12499
  "getWorkflowConfigValidation",
12480
12500
  "getWorkflowFeedback",
12481
12501
  "getWorkflowPromptClassifications",
12502
+ "reviewWorkflowPromptClassifications",
12482
12503
  "getWorkflowContributors",
12483
12504
  "getWorkflowDeletionPreview",
12484
12505
  "getWorkflowDiagram",
@@ -13209,6 +13230,7 @@ function bindAuthMethods(target, auth, assignments) {
13209
13230
  target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
13210
13231
  target.exchangeToken = auth.exchangeToken.bind(auth);
13211
13232
  target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
13233
+ target.createWorkspaceRealtimeLoginToken = auth.createWorkspaceRealtimeLoginToken.bind(auth);
13212
13234
  target.getDomainMapping = auth.getDomainMapping.bind(auth);
13213
13235
  target.createSignup = auth.createSignup.bind(auth);
13214
13236
  target.createAccount = auth.emailPasswordSignup.bind(auth);
@@ -13413,6 +13435,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
13413
13435
  target.getTaskChats = workflows.getTaskChats.bind(workflows);
13414
13436
  target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
13415
13437
  target.getWorkflowPromptClassifications = workflows.getWorkflowPromptClassifications.bind(workflows);
13438
+ target.reviewWorkflowPromptClassifications = workflows.reviewWorkflowPromptClassifications.bind(workflows);
13416
13439
  target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
13417
13440
  target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
13418
13441
  target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
@@ -14653,6 +14676,7 @@ var GravityRailClient = class {
14653
14676
  requestCrossDomainToken;
14654
14677
  exchangeToken;
14655
14678
  createRealtimeLoginToken;
14679
+ createWorkspaceRealtimeLoginToken;
14656
14680
  getDomainMapping;
14657
14681
  createSignup;
14658
14682
  createAccount;
@@ -14825,6 +14849,7 @@ var GravityRailClient = class {
14825
14849
  getTaskChats;
14826
14850
  getWorkflowConfigValidation;
14827
14851
  getWorkflowPromptClassifications;
14852
+ reviewWorkflowPromptClassifications;
14828
14853
  getWorkflowNotes;
14829
14854
  createWorkflowNote;
14830
14855
  updateWorkflowNote;
@@ -17123,4 +17148,4 @@ export {
17123
17148
  pathDraftFromStorage,
17124
17149
  pathDraftToStorage
17125
17150
  };
17126
- //# sourceMappingURL=chunk-BW3E45QD.js.map
17151
+ //# sourceMappingURL=chunk-JRK77RT4.js.map