@gravity-rail/sdk 0.8.0 → 0.11.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/README.md +45 -8
- package/dist/chunk-FSSXKQR5.js +471 -0
- package/dist/chunk-FSSXKQR5.js.map +1 -0
- package/dist/{chunk-QS6ZRQUZ.js → chunk-V7ZKEH4V.js} +8 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{chunk-ML55PVP7.js → chunk-YESHLUL7.js} +1435 -703
- package/dist/chunk-YESHLUL7.js.map +1 -0
- package/dist/{client-C2aWAalu.d.cts → client-BCgXtr8p.d.cts} +3684 -1291
- package/dist/{client-CLGovEox.d.ts → client-Dh1l20Ue.d.ts} +3684 -1291
- package/dist/helpers.cjs +177 -13
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +82 -3
- package/dist/helpers.d.ts +82 -3
- package/dist/helpers.js +155 -12
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +1679 -420
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24
- package/dist/index.d.ts +32 -24
- package/dist/index.js +193 -113
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1742 -413
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +634 -29
- package/dist/internal.d.ts +634 -29
- package/dist/internal.js +140 -7
- package/dist/internal.js.map +1 -1
- package/dist/realtime.cjs +43 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +26 -0
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.js +43 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{scopes-D6a_Mvqr.d.ts → revision-state-BTF-MnbW.d.cts} +270 -23
- package/dist/{scopes-CDaJBQVT.d.cts → revision-state-DOH1NMGb.d.ts} +270 -23
- package/dist/schemas.cjs +56 -117
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +121 -484
- package/dist/schemas.d.ts +121 -484
- package/dist/schemas.js +55 -114
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-CmECZnkl.d.cts → tasks-C4aYbWVv.d.cts} +944 -148
- package/dist/{inquiries-CmECZnkl.d.ts → tasks-C4aYbWVv.d.ts} +944 -148
- package/package.json +5 -5
- package/dist/chunk-ML55PVP7.js.map +0 -1
- package/dist/chunk-QS6ZRQUZ.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -11,14 +11,12 @@ import {
|
|
|
11
11
|
AccessLevel,
|
|
12
12
|
AgentTasksApi,
|
|
13
13
|
AgentsApi,
|
|
14
|
-
ApiError,
|
|
15
14
|
ApiKeysApi,
|
|
16
15
|
AppConnectionsApi,
|
|
17
16
|
AppsApi,
|
|
18
17
|
AssignmentsApi,
|
|
19
18
|
AuthApi,
|
|
20
19
|
BUILTIN_ASSISTANT_CHAT_TYPES,
|
|
21
|
-
BaseApiClient,
|
|
22
20
|
BuildersApi,
|
|
23
21
|
BulkMemberResultStatus,
|
|
24
22
|
BusinessIndustry,
|
|
@@ -27,6 +25,7 @@ import {
|
|
|
27
25
|
CHAT_TYPES,
|
|
28
26
|
CalendarsApi,
|
|
29
27
|
CallsApi,
|
|
28
|
+
CapabilityClass,
|
|
30
29
|
ChatsApi,
|
|
31
30
|
ConfluenceApi,
|
|
32
31
|
ConnectionSyncApi,
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
DEFAULT_THINKING_SPEECH_PHRASES,
|
|
40
39
|
DEFAULT_VOICE_INFERENCE_MODEL,
|
|
41
40
|
DataTypesApi,
|
|
41
|
+
DeclaredDataUse,
|
|
42
42
|
DiscordBotsApi,
|
|
43
43
|
DriverMode,
|
|
44
44
|
EmailDnsRecordType,
|
|
@@ -67,6 +67,8 @@ import {
|
|
|
67
67
|
McpServerState,
|
|
68
68
|
McpServersApi,
|
|
69
69
|
MemberFeature,
|
|
70
|
+
MemberImportMatchInfoMatchType,
|
|
71
|
+
MemberImportPreviewRowAction,
|
|
70
72
|
MemberType,
|
|
71
73
|
MembersApi,
|
|
72
74
|
MenuItemResponseItemType,
|
|
@@ -93,11 +95,15 @@ import {
|
|
|
93
95
|
PERMISSION_NONE,
|
|
94
96
|
PERMISSION_USE,
|
|
95
97
|
PERMISSION_VERIFY,
|
|
98
|
+
PIDS_DISPOSITIONS,
|
|
99
|
+
PIDS_SOURCES,
|
|
100
|
+
POSITIVE_RATING_THRESHOLD,
|
|
96
101
|
PersonasApi,
|
|
97
102
|
PhoneNumbersApi,
|
|
98
103
|
ProductType,
|
|
99
104
|
PromptsApi,
|
|
100
105
|
PronunciationsApi,
|
|
106
|
+
QUERY_VALUELESS_OPS,
|
|
101
107
|
QualificationsApi,
|
|
102
108
|
REALTIME_MODEL_CUSTOM,
|
|
103
109
|
REALTIME_MODEL_GEMINI,
|
|
@@ -135,13 +141,13 @@ import {
|
|
|
135
141
|
TTS_MODEL_ELEVENLABS_FLASH,
|
|
136
142
|
TTS_MODEL_ELEVENLABS_MULTILINGUAL,
|
|
137
143
|
TTS_MODEL_ELEVENLABS_TURBO,
|
|
138
|
-
TTS_MODEL_POCKET,
|
|
139
144
|
TTS_PREVIEW_PROVIDERS,
|
|
140
145
|
TasksApi,
|
|
141
146
|
TemplatesApi,
|
|
142
147
|
ToolkitState,
|
|
143
148
|
ToolkitsApi,
|
|
144
149
|
VoiceApi,
|
|
150
|
+
WIDGET_SLUGS,
|
|
145
151
|
WorkflowAccessWarningResourceType,
|
|
146
152
|
WorkflowNotesApi,
|
|
147
153
|
WorkflowsApi,
|
|
@@ -161,6 +167,7 @@ import {
|
|
|
161
167
|
bindChatsMethods,
|
|
162
168
|
bindCommunicationsMethods,
|
|
163
169
|
bindCustomersMethods,
|
|
170
|
+
bindDashboardsMethods,
|
|
164
171
|
bindDataTypesMethods,
|
|
165
172
|
bindEventsMethods,
|
|
166
173
|
bindExperimentsMethods,
|
|
@@ -168,12 +175,14 @@ import {
|
|
|
168
175
|
bindIntegrationsMethods,
|
|
169
176
|
bindJourneysMethods,
|
|
170
177
|
bindMembersMethods,
|
|
178
|
+
bindMotdMethods,
|
|
171
179
|
bindOperatorMethods,
|
|
172
180
|
bindOrgMethods,
|
|
173
181
|
bindPersonasMethods,
|
|
174
182
|
bindPromptsMethods,
|
|
175
183
|
bindPronunciationsMethods,
|
|
176
184
|
bindQualificationsMethods,
|
|
185
|
+
bindQueriesMethods,
|
|
177
186
|
bindResellersMethods,
|
|
178
187
|
bindSitesMethods,
|
|
179
188
|
bindSupportRequestMethods,
|
|
@@ -194,25 +203,26 @@ import {
|
|
|
194
203
|
getApplicableResourceSlugs,
|
|
195
204
|
getApplicableResources,
|
|
196
205
|
getAvailableFeaturesForUpgrade,
|
|
197
|
-
getCookieValue,
|
|
198
206
|
getFeature,
|
|
199
207
|
getFeaturesByCategory,
|
|
200
208
|
getFeaturesByVisibility,
|
|
201
209
|
getMissingDependencies,
|
|
202
210
|
getResourceMetadata,
|
|
211
|
+
getRevisionState,
|
|
203
212
|
getScopeFromProductType,
|
|
204
213
|
getTTSProvider,
|
|
205
214
|
getVoiceModelId,
|
|
206
215
|
initializeFeatures,
|
|
207
216
|
isChatType,
|
|
208
217
|
isFeatureAvailable,
|
|
218
|
+
isPositiveRating,
|
|
209
219
|
isRegistryInitialized,
|
|
210
220
|
isSMSDeliveryFailureStatus,
|
|
211
221
|
parseExperimentStatCount,
|
|
212
222
|
requiresAssistantParticipant,
|
|
213
223
|
usesBuiltinAssistant,
|
|
214
224
|
validateFeatureDependencies
|
|
215
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-YESHLUL7.js";
|
|
216
226
|
import {
|
|
217
227
|
AttendeeResponseStatus,
|
|
218
228
|
AttendeeStatus,
|
|
@@ -223,10 +233,107 @@ import {
|
|
|
223
233
|
CalendarSource,
|
|
224
234
|
DataCategory,
|
|
225
235
|
DataFieldType,
|
|
236
|
+
DataRecordRetirementResponseReason,
|
|
226
237
|
DataSensitivity,
|
|
227
238
|
DataTypeRecordScope,
|
|
228
239
|
IndexStatus
|
|
229
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-V7ZKEH4V.js";
|
|
241
|
+
import {
|
|
242
|
+
ApiError,
|
|
243
|
+
BaseApiClient,
|
|
244
|
+
getCookieValue
|
|
245
|
+
} from "./chunk-FSSXKQR5.js";
|
|
246
|
+
|
|
247
|
+
// src/types/generated/customer_activity.ts
|
|
248
|
+
var CustomerActivityClassifierDetectorName = {
|
|
249
|
+
assignment_chat_classifier: "assignment_chat_classifier",
|
|
250
|
+
manager_chat_classifier: "manager_chat_classifier",
|
|
251
|
+
concierge_chat_classifier: "concierge_chat_classifier",
|
|
252
|
+
chat_review: "chat_review"
|
|
253
|
+
};
|
|
254
|
+
var CustomerActivityClassifierLabel = {
|
|
255
|
+
user_distress: "user_distress",
|
|
256
|
+
user_confusion: "user_confusion",
|
|
257
|
+
health_topic_mentioned: "health_topic_mentioned",
|
|
258
|
+
health_advice_given: "health_advice_given",
|
|
259
|
+
escalation_failure: "escalation_failure",
|
|
260
|
+
repeated_tool_failure: "repeated_tool_failure",
|
|
261
|
+
transcription_quality: "transcription_quality",
|
|
262
|
+
repetitive_loop: "repetitive_loop"
|
|
263
|
+
};
|
|
264
|
+
var CustomerActivityEventSource = {
|
|
265
|
+
system: "system",
|
|
266
|
+
customer: "customer",
|
|
267
|
+
classifier: "classifier",
|
|
268
|
+
operator: "operator"
|
|
269
|
+
};
|
|
270
|
+
var CustomerActivityEventStatus = {
|
|
271
|
+
new: "new",
|
|
272
|
+
reviewed: "reviewed"
|
|
273
|
+
};
|
|
274
|
+
var CustomerActivityReviewOutcome = {
|
|
275
|
+
no_action_needed: "no_action_needed",
|
|
276
|
+
support_request_created: "support_request_created",
|
|
277
|
+
bug_filed: "bug_filed",
|
|
278
|
+
linked_existing_work: "linked_existing_work",
|
|
279
|
+
classifier_feedback: "classifier_feedback",
|
|
280
|
+
test_activity: "test_activity"
|
|
281
|
+
};
|
|
282
|
+
var CustomerActivitySeverity = {
|
|
283
|
+
none: "none",
|
|
284
|
+
minimal: "minimal",
|
|
285
|
+
low: "low",
|
|
286
|
+
medium: "medium",
|
|
287
|
+
high: "high",
|
|
288
|
+
critical: "critical"
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// src/types/generated/phi_posture.ts
|
|
292
|
+
var PhiPolicyReason = {
|
|
293
|
+
initial_classification: "initial_classification",
|
|
294
|
+
customer_confirmation: "customer_confirmation",
|
|
295
|
+
agreement_verified: "agreement_verified",
|
|
296
|
+
scope_change: "scope_change",
|
|
297
|
+
periodic_review: "periodic_review",
|
|
298
|
+
correction: "correction",
|
|
299
|
+
incident_response: "incident_response"
|
|
300
|
+
};
|
|
301
|
+
var PhiPolicySource = {
|
|
302
|
+
customer_attestation: "customer_attestation",
|
|
303
|
+
contract_review: "contract_review",
|
|
304
|
+
staff_review: "staff_review",
|
|
305
|
+
legacy_inventory: "legacy_inventory"
|
|
306
|
+
};
|
|
307
|
+
var PhiPostureTransitionResponseTargetType = {
|
|
308
|
+
organization: "organization",
|
|
309
|
+
workspace: "workspace"
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// src/types/generated/workspace.ts
|
|
313
|
+
var PhiDataPolicy = {
|
|
314
|
+
unclassified: "unclassified",
|
|
315
|
+
phi_prohibited: "phi_prohibited",
|
|
316
|
+
phi_permitted: "phi_permitted"
|
|
317
|
+
};
|
|
318
|
+
var PhiPostureDecision = {
|
|
319
|
+
allow_non_phi: "allow_non_phi",
|
|
320
|
+
warn_non_phi: "warn_non_phi",
|
|
321
|
+
review_required: "review_required",
|
|
322
|
+
authorization_required: "authorization_required",
|
|
323
|
+
conflict: "conflict"
|
|
324
|
+
};
|
|
325
|
+
var PhiPostureReasonCode = {
|
|
326
|
+
org_unclassified: "org_unclassified",
|
|
327
|
+
workspace_unclassified: "workspace_unclassified",
|
|
328
|
+
non_phi_policy_aligned: "non_phi_policy_aligned",
|
|
329
|
+
phi_expected_workspace_prohibited: "phi_expected_workspace_prohibited",
|
|
330
|
+
phi_authorization_not_evaluated: "phi_authorization_not_evaluated",
|
|
331
|
+
non_phi_org_workspace_permitted: "non_phi_org_workspace_permitted",
|
|
332
|
+
phi_permitted_org_not_expected: "phi_permitted_org_not_expected",
|
|
333
|
+
organization_review_expired: "organization_review_expired",
|
|
334
|
+
workspace_review_expired: "workspace_review_expired",
|
|
335
|
+
invalid_state: "invalid_state"
|
|
336
|
+
};
|
|
230
337
|
export {
|
|
231
338
|
AIModelsApi,
|
|
232
339
|
AbilitiesApi,
|
|
@@ -263,12 +370,19 @@ export {
|
|
|
263
370
|
CalendarSource,
|
|
264
371
|
CalendarsApi,
|
|
265
372
|
CallsApi,
|
|
373
|
+
CapabilityClass,
|
|
266
374
|
ChatsApi,
|
|
267
375
|
ConfluenceApi,
|
|
268
376
|
ConnectionSyncApi,
|
|
269
377
|
ConsentMethod,
|
|
270
378
|
CriterionType,
|
|
271
379
|
CustomToolkitsApi,
|
|
380
|
+
CustomerActivityClassifierDetectorName,
|
|
381
|
+
CustomerActivityClassifierLabel,
|
|
382
|
+
CustomerActivityEventSource,
|
|
383
|
+
CustomerActivityEventStatus,
|
|
384
|
+
CustomerActivityReviewOutcome,
|
|
385
|
+
CustomerActivitySeverity,
|
|
272
386
|
CustomersApi,
|
|
273
387
|
DEFAULT_CHAT_MODEL,
|
|
274
388
|
DEFAULT_CUSTOM_VOICE_MODEL,
|
|
@@ -276,9 +390,11 @@ export {
|
|
|
276
390
|
DEFAULT_VOICE_INFERENCE_MODEL,
|
|
277
391
|
DataCategory,
|
|
278
392
|
DataFieldType,
|
|
393
|
+
DataRecordRetirementResponseReason,
|
|
279
394
|
DataSensitivity,
|
|
280
395
|
DataTypeRecordScope,
|
|
281
396
|
DataTypesApi,
|
|
397
|
+
DeclaredDataUse,
|
|
282
398
|
DiscordBotsApi,
|
|
283
399
|
DriverMode,
|
|
284
400
|
EmailDnsRecordType,
|
|
@@ -308,6 +424,8 @@ export {
|
|
|
308
424
|
McpServerState,
|
|
309
425
|
McpServersApi,
|
|
310
426
|
MemberFeature,
|
|
427
|
+
MemberImportMatchInfoMatchType,
|
|
428
|
+
MemberImportPreviewRowAction,
|
|
311
429
|
MemberType,
|
|
312
430
|
MembersApi,
|
|
313
431
|
MenuItemResponseItemType,
|
|
@@ -335,11 +453,21 @@ export {
|
|
|
335
453
|
PERMISSION_NONE,
|
|
336
454
|
PERMISSION_USE,
|
|
337
455
|
PERMISSION_VERIFY,
|
|
456
|
+
PIDS_DISPOSITIONS,
|
|
457
|
+
PIDS_SOURCES,
|
|
458
|
+
POSITIVE_RATING_THRESHOLD,
|
|
338
459
|
PersonasApi,
|
|
460
|
+
PhiDataPolicy,
|
|
461
|
+
PhiPolicyReason,
|
|
462
|
+
PhiPolicySource,
|
|
463
|
+
PhiPostureDecision,
|
|
464
|
+
PhiPostureReasonCode,
|
|
465
|
+
PhiPostureTransitionResponseTargetType,
|
|
339
466
|
PhoneNumbersApi,
|
|
340
467
|
ProductType,
|
|
341
468
|
PromptsApi,
|
|
342
469
|
PronunciationsApi,
|
|
470
|
+
QUERY_VALUELESS_OPS,
|
|
343
471
|
QualificationsApi,
|
|
344
472
|
REALTIME_MODEL_CUSTOM,
|
|
345
473
|
REALTIME_MODEL_GEMINI,
|
|
@@ -377,13 +505,13 @@ export {
|
|
|
377
505
|
TTS_MODEL_ELEVENLABS_FLASH,
|
|
378
506
|
TTS_MODEL_ELEVENLABS_MULTILINGUAL,
|
|
379
507
|
TTS_MODEL_ELEVENLABS_TURBO,
|
|
380
|
-
TTS_MODEL_POCKET,
|
|
381
508
|
TTS_PREVIEW_PROVIDERS,
|
|
382
509
|
TasksApi,
|
|
383
510
|
TemplatesApi,
|
|
384
511
|
ToolkitState,
|
|
385
512
|
ToolkitsApi,
|
|
386
513
|
VoiceApi,
|
|
514
|
+
WIDGET_SLUGS,
|
|
387
515
|
WorkflowAccessWarningResourceType,
|
|
388
516
|
WorkflowNotesApi,
|
|
389
517
|
WorkflowAccessWarningResourceType as WorkflowResourceType,
|
|
@@ -404,6 +532,7 @@ export {
|
|
|
404
532
|
bindChatsMethods,
|
|
405
533
|
bindCommunicationsMethods,
|
|
406
534
|
bindCustomersMethods,
|
|
535
|
+
bindDashboardsMethods,
|
|
407
536
|
bindDataTypesMethods,
|
|
408
537
|
bindEventsMethods,
|
|
409
538
|
bindExperimentsMethods,
|
|
@@ -411,12 +540,14 @@ export {
|
|
|
411
540
|
bindIntegrationsMethods,
|
|
412
541
|
bindJourneysMethods,
|
|
413
542
|
bindMembersMethods,
|
|
543
|
+
bindMotdMethods,
|
|
414
544
|
bindOperatorMethods,
|
|
415
545
|
bindOrgMethods,
|
|
416
546
|
bindPersonasMethods,
|
|
417
547
|
bindPromptsMethods,
|
|
418
548
|
bindPronunciationsMethods,
|
|
419
549
|
bindQualificationsMethods,
|
|
550
|
+
bindQueriesMethods,
|
|
420
551
|
bindResellersMethods,
|
|
421
552
|
bindSitesMethods,
|
|
422
553
|
bindSupportRequestMethods,
|
|
@@ -443,12 +574,14 @@ export {
|
|
|
443
574
|
getFeaturesByVisibility,
|
|
444
575
|
getMissingDependencies,
|
|
445
576
|
getResourceMetadata,
|
|
577
|
+
getRevisionState,
|
|
446
578
|
getScopeFromProductType,
|
|
447
579
|
getTTSProvider,
|
|
448
580
|
getVoiceModelId,
|
|
449
581
|
initializeFeatures,
|
|
450
582
|
isChatType,
|
|
451
583
|
isFeatureAvailable,
|
|
584
|
+
isPositiveRating,
|
|
452
585
|
isRegistryInitialized,
|
|
453
586
|
isSMSDeliveryFailureStatus,
|
|
454
587
|
parseExperimentStatCount,
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/types/generated/customer_activity.ts","../src/types/generated/phi_posture.ts","../src/types/generated/workspace.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: customer_activity\n */\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} 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} as const;\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 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 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} 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","/**\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\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} 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';\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 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 subscriptionProductId?: number | 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 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 locale?: string | null;\n timezone?: string | null;\n pendingSetupSpecIds?: number[];\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\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\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 name: string;\n slug?: string | null;\n templateWorkspaceUuid?: string | null;\n productId: number;\n planPeriod?: string;\n}\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 * 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}\n\nexport type OrgWorkspaceResponseFeatureStatus = {[key: string]: string} | null;\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 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 RecordFieldInfo {\n slug: string;\n name: string;\n type: string;\n operators: string[];\n enumValues?: unknown[] | null;\n}\n\nexport interface RunQueryRequest {\n query: Query;\n mode?: RunQueryRequestMode;\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}\n\nexport type RunQueryResponseItems = { [key: string]: unknown }[] | null;\n\nexport type RunQueryResponseRows = { [key: string]: unknown }[] | null;\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 */\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}\n\n/**\n * Update workspace defaults.\n */\nexport interface UpdateWorkspaceDefaultsRequest {\n defaultPhoneNumberId?: number | null;\n defaultAgentId?: number | null;\n escalationBusinessHours?: string | null;\n escalationOnlineMessageTemplate?: string | null;\n escalationOfflineMessageTemplate?: string | null;\n escalationNotifiedMessageTemplate?: string | null;\n escalationPausedMessageTemplate?: string | null;\n emailFooter?: string | null;\n pauseOnEscalate?: boolean | null;\n enableAudioRecording?: boolean | null;\n enableVoicemailDetection?: boolean | null;\n transcriptionModel?: string | null;\n}\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 * 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}\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 agents: 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 * 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\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 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 locale?: string | null;\n timezone?: string | null;\n pendingSetupSpecIds?: number[];\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 defaultAgentId: number | null;\n workspaceFolderId?: number | null;\n escalationBusinessHours: string | null;\n escalationOnlineMessageTemplate: string | null;\n escalationOfflineMessageTemplate: string | null;\n escalationNotifiedMessageTemplate: string | null;\n escalationPausedMessageTemplate: string | null;\n emailFooter: string | null;\n pauseOnEscalate: boolean;\n sesDomain: string;\n enableAudioRecording: boolean;\n enableVoicemailDetection: boolean;\n transcriptionModel?: string | null;\n defaultChatModel: string;\n defaultRealtimeModel: string;\n defaultInferenceModel: string;\n defaultVoiceModel: string;\n firstRunMode?: string | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,IAAM,yCAAyC;AAAA,EACpD,4BAA4B;AAAA,EAC5B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,aAAa;AACf;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;AACnB;AAoEO,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;AACjB;AAKO,IAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AACZ;;;AChIO,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;AACpB;AA0CO,IAAM,yCAAyC;AAAA,EACpD,cAAc;AAAA,EACd,WAAW;AACb;;;AC+MO,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,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,eAAe;AACjB;","names":[]}
|
package/dist/realtime.cjs
CHANGED
|
@@ -296,6 +296,7 @@ var OperatorSessionClient = class {
|
|
|
296
296
|
constructor(handlers = {}) {
|
|
297
297
|
this.handlers = handlers;
|
|
298
298
|
}
|
|
299
|
+
handlers;
|
|
299
300
|
ws = null;
|
|
300
301
|
audioContext = null;
|
|
301
302
|
mediaStream = null;
|
|
@@ -306,6 +307,7 @@ var OperatorSessionClient = class {
|
|
|
306
307
|
playbackSources = [];
|
|
307
308
|
micActive = false;
|
|
308
309
|
onHold = false;
|
|
310
|
+
muted = false;
|
|
309
311
|
receivedRemoteAudio = false;
|
|
310
312
|
heartbeatTimer = null;
|
|
311
313
|
sessionCloseNotified = false;
|
|
@@ -415,6 +417,7 @@ var OperatorSessionClient = class {
|
|
|
415
417
|
}
|
|
416
418
|
if (msg.type === "CUSTOM" && msg.name === "operator.call.ended") {
|
|
417
419
|
this.onHold = false;
|
|
420
|
+
this.muted = false;
|
|
418
421
|
this.receivedRemoteAudio = false;
|
|
419
422
|
this.stopMicrophone();
|
|
420
423
|
this.stopPlayback();
|
|
@@ -476,6 +479,44 @@ var OperatorSessionClient = class {
|
|
|
476
479
|
await this.startMicrophone();
|
|
477
480
|
this.sendCustom("operator.call.place", { member_id: memberId });
|
|
478
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Answer an inbound operator call the caller has already been routed to.
|
|
484
|
+
*
|
|
485
|
+
* Symmetric with {@link placeCall} but for the inbound direction: instead of
|
|
486
|
+
* dialing an outbound leg it tells the backend to bridge the already-ringing
|
|
487
|
+
* caller to this operator session. The backend (see
|
|
488
|
+
* `lib/operator_session_handler.py::_answer_inbound_call`) registers the
|
|
489
|
+
* audio bridge, marks the ring state `answered`, and replies with
|
|
490
|
+
* `operator.call.started` — after which callee PCM arrives as `voice.audio`
|
|
491
|
+
* events (played via {@link playPcm16}) and mic audio streams the other way,
|
|
492
|
+
* exactly like an outbound call.
|
|
493
|
+
*
|
|
494
|
+
* Must be called once the session is ready (state `connected`). Starts the
|
|
495
|
+
* microphone before sending so the operator's audio is flowing the instant
|
|
496
|
+
* the bridge registers.
|
|
497
|
+
*/
|
|
498
|
+
async answerCall(interactionId) {
|
|
499
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
500
|
+
throw new Error("Operator session WebSocket is not connected");
|
|
501
|
+
}
|
|
502
|
+
if (this.sessionState !== "connected") {
|
|
503
|
+
throw new Error("Operator session is not ready");
|
|
504
|
+
}
|
|
505
|
+
await this.startMicrophone();
|
|
506
|
+
this.sendCustom("operator.call.answer", { interaction_id: interactionId });
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Mute or unmute the operator's outbound microphone. Muting gates mic frames
|
|
510
|
+
* locally (the caller stops hearing the operator) while callee audio keeps
|
|
511
|
+
* playing — distinct from {@link setHold}, which is a two-way pause the
|
|
512
|
+
* backend is told about. Purely client-side; no server round-trip.
|
|
513
|
+
*/
|
|
514
|
+
setMuted(muted) {
|
|
515
|
+
this.muted = muted;
|
|
516
|
+
}
|
|
517
|
+
isMuted() {
|
|
518
|
+
return this.muted;
|
|
519
|
+
}
|
|
479
520
|
hangUp() {
|
|
480
521
|
try {
|
|
481
522
|
this.sendCustom("operator.call.hangup");
|
|
@@ -524,6 +565,7 @@ var OperatorSessionClient = class {
|
|
|
524
565
|
processor.onaudioprocess = (event) => {
|
|
525
566
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) return;
|
|
526
567
|
if (this.onHold) return;
|
|
568
|
+
if (this.muted) return;
|
|
527
569
|
if (this.callPhase !== "dialing" && this.callPhase !== "live" && this.callPhase !== "onHold") {
|
|
528
570
|
return;
|
|
529
571
|
}
|
|
@@ -618,6 +660,7 @@ var OperatorSessionClient = class {
|
|
|
618
660
|
}
|
|
619
661
|
this.audioContext = null;
|
|
620
662
|
this.onHold = false;
|
|
663
|
+
this.muted = false;
|
|
621
664
|
this.receivedRemoteAudio = false;
|
|
622
665
|
this.setSessionState("idle");
|
|
623
666
|
this.setCallPhase("idle");
|