@gravity-rail/sdk 0.22.0 → 0.32.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.
Files changed (55) hide show
  1. package/README.md +57 -8
  2. package/dist/agui.d.cts +1 -1
  3. package/dist/agui.d.ts +1 -1
  4. package/dist/audio.d.cts +1 -1
  5. package/dist/audio.d.ts +1 -1
  6. package/dist/{client-C10qSd6b.d.ts → chat-interaction-BKdImgZ5.d.ts} +5604 -1531
  7. package/dist/{client-Ct0soeip.d.cts → chat-interaction-DLfC_h_P.d.cts} +5604 -1531
  8. package/dist/{chunk-3HAV5XUJ.js → chunk-HRUMZ46V.js} +1 -1
  9. package/dist/chunk-HRUMZ46V.js.map +1 -0
  10. package/dist/{chunk-WMA6YCAS.js → chunk-N446FGCT.js} +1230 -201
  11. package/dist/chunk-N446FGCT.js.map +1 -0
  12. package/dist/{chunk-7OLBLLV7.js → chunk-P2E6LU7I.js} +57 -7
  13. package/dist/chunk-P2E6LU7I.js.map +1 -0
  14. package/dist/helpers.cjs +54 -1
  15. package/dist/helpers.cjs.map +1 -1
  16. package/dist/helpers.d.cts +3 -2
  17. package/dist/helpers.d.ts +3 -2
  18. package/dist/helpers.js +11 -3
  19. package/dist/helpers.js.map +1 -1
  20. package/dist/index.cjs +2291 -148
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +509 -6
  23. package/dist/index.d.ts +509 -6
  24. package/dist/index.js +1032 -23
  25. package/dist/index.js.map +1 -1
  26. package/dist/internal.cjs +1320 -220
  27. package/dist/internal.cjs.map +1 -1
  28. package/dist/internal.d.cts +33 -49
  29. package/dist/internal.d.ts +33 -49
  30. package/dist/internal.js +73 -33
  31. package/dist/internal.js.map +1 -1
  32. package/dist/realtime.cjs +279 -14
  33. package/dist/realtime.cjs.map +1 -1
  34. package/dist/realtime.d.cts +169 -17
  35. package/dist/realtime.d.ts +169 -17
  36. package/dist/realtime.js +264 -13
  37. package/dist/realtime.js.map +1 -1
  38. package/dist/{revision-state-CCPTiW-i.d.cts → revision-state-Bsq5dKwi.d.cts} +236 -5
  39. package/dist/{revision-state-C6aM-PHu.d.ts → revision-state-CQTYcIRG.d.ts} +236 -5
  40. package/dist/schemas.cjs +3 -1
  41. package/dist/schemas.cjs.map +1 -1
  42. package/dist/schemas.d.cts +31 -13
  43. package/dist/schemas.d.ts +31 -13
  44. package/dist/schemas.js +4 -2
  45. package/dist/schemas.js.map +1 -1
  46. package/dist/{tasks-WH_VfzMv.d.cts → tasks-B-31JPuq.d.cts} +298 -114
  47. package/dist/{tasks-WH_VfzMv.d.ts → tasks-B-31JPuq.d.ts} +298 -114
  48. package/dist/types-0c6_NGU4.d.cts +90 -0
  49. package/dist/types-0c6_NGU4.d.ts +90 -0
  50. package/package.json +3 -3
  51. package/dist/chunk-3HAV5XUJ.js.map +0 -1
  52. package/dist/chunk-7OLBLLV7.js.map +0 -1
  53. package/dist/chunk-WMA6YCAS.js.map +0 -1
  54. package/dist/types-DkYyrvoC.d.cts +0 -19
  55. package/dist/types-DkYyrvoC.d.ts +0 -19
package/dist/internal.cjs CHANGED
@@ -31,18 +31,12 @@ __export(internal_exports, {
31
31
  AccessGrantTrigger: () => AccessGrantTrigger,
32
32
  AccessGrantsApi: () => AccessGrantsApi,
33
33
  AccessLevel: () => AccessLevel2,
34
- ActivityActorKind: () => ActivityActorKind,
35
- ActivityAggregationKind: () => ActivityAggregationKind,
36
- ActivityCaptureState: () => ActivityCaptureState,
37
- ActivityConfigAction: () => ActivityConfigAction,
38
- ActivityConfigArea: () => ActivityConfigArea,
39
- ActivityCoverageLimitation: () => ActivityCoverageLimitation,
40
- ActivityDirection: () => ActivityDirection,
41
- ActivityEmptyReason: () => ActivityEmptyReason,
42
- ActivityEventType: () => ActivityEventType,
43
- ActivityEventTypePreset: () => ActivityEventTypePreset,
44
- ActivityGoalImpact: () => ActivityGoalImpact,
45
- ActivityTimelineProjection: () => ActivityTimelineProjection,
34
+ ActivityEventFamily: () => ActivityEventFamily,
35
+ ActivityGrain: () => ActivityGrain,
36
+ ActivityGroupBy: () => ActivityGroupBy,
37
+ ActivityOpenItemOrder: () => ActivityOpenItemOrder,
38
+ ActivityOutcome: () => ActivityOutcome,
39
+ ActivityWindowBasis: () => ActivityWindowBasis,
46
40
  AddonMutationResponseScope: () => AddonMutationResponseScope,
47
41
  AgentTasksApi: () => AgentTasksApi,
48
42
  AgentsApi: () => AgentsApi,
@@ -71,6 +65,10 @@ __export(internal_exports, {
71
65
  CalendarsApi: () => CalendarsApi,
72
66
  CallsApi: () => CallsApi,
73
67
  CapabilityClass: () => CapabilityClass,
68
+ ChannelMessageDirection: () => ChannelMessageDirection,
69
+ ChannelMessageSource: () => ChannelMessageSource,
70
+ ChannelMessagesUnavailableReason: () => ChannelMessagesUnavailableReason,
71
+ ChatInteractionController: () => ChatInteractionController,
74
72
  ChatsApi: () => ChatsApi,
75
73
  ConfluenceApi: () => ConfluenceApi,
76
74
  ConnectionSyncApi: () => ConnectionSyncApi,
@@ -85,6 +83,9 @@ __export(internal_exports, {
85
83
  CustomerActivitySeverity: () => CustomerActivitySeverity,
86
84
  CustomerActivitySlaThresholdSource: () => CustomerActivitySlaThresholdSource,
87
85
  CustomersApi: () => CustomersApi,
86
+ DEFAULT_AGENT_CHAT_MODEL: () => DEFAULT_AGENT_CHAT_MODEL,
87
+ DEFAULT_AGENT_REALTIME_MODEL: () => DEFAULT_AGENT_REALTIME_MODEL,
88
+ DEFAULT_AGENT_REALTIME_MODEL_CONFIG: () => DEFAULT_AGENT_REALTIME_MODEL_CONFIG,
88
89
  DEFAULT_CHAT_MODEL: () => DEFAULT_CHAT_MODEL,
89
90
  DEFAULT_CUSTOM_VOICE_MODEL: () => DEFAULT_CUSTOM_VOICE_MODEL,
90
91
  DEFAULT_THINKING_SPEECH_PHRASES: () => DEFAULT_THINKING_SPEECH_PHRASES,
@@ -98,6 +99,7 @@ __export(internal_exports, {
98
99
  DeclaredDataUse: () => DeclaredDataUse,
99
100
  DiscordBotsApi: () => DiscordBotsApi,
100
101
  DriverMode: () => DriverMode,
102
+ EhrWritebackOutcomeResponseStatus: () => EhrWritebackOutcomeResponseStatus,
101
103
  EmailDnsRecordType: () => EmailDnsRecordType,
102
104
  EventRuleActionType: () => EventRuleActionType,
103
105
  EventRuleEventType: () => EventRuleEventType,
@@ -111,10 +113,16 @@ __export(internal_exports, {
111
113
  FhirConnectionsApi: () => FhirConnectionsApi,
112
114
  FhirVendor: () => FhirVendor,
113
115
  FilesApi: () => FilesApi,
114
- FormValueDisposition: () => FormValueDisposition,
115
116
  GravityRailClient: () => GravityRailClient,
116
117
  HealthieApi: () => HealthieApi,
117
118
  HubspotApi: () => HubspotApi,
119
+ ImportReadinessIssueCode: () => ImportReadinessIssueCode,
120
+ ImportReadinessIssueResourceType: () => ImportReadinessIssueResourceType,
121
+ ImportSkippedRuleResourceGroupResourceType: () => ImportSkippedRuleResourceGroupResourceType,
122
+ ImportSkippedRuleResponseNeededResourceTypesItem: () => ImportSkippedRuleResponseNeededResourceTypesItem,
123
+ ImportSkippedRuleResponseParentKind: () => ImportSkippedRuleResponseParentKind,
124
+ ImportSkippedRuleResponseReasonCode: () => ImportSkippedRuleResponseReasonCode,
125
+ ImportSkippedRuleResponseStatus: () => ImportSkippedRuleResponseStatus,
118
126
  InboxesApi: () => InboxesApi,
119
127
  IndexStatus: () => IndexStatus,
120
128
  InquiriesApi: () => InquiriesApi,
@@ -123,12 +131,14 @@ __export(internal_exports, {
123
131
  JourneysApi: () => JourneysApi,
124
132
  MASKED_SECRET_SENTINEL: () => MASKED_SECRET_SENTINEL,
125
133
  MEMBER_ENTITLEMENT_STATUSES: () => MEMBER_ENTITLEMENT_STATUSES,
134
+ MEMBER_RELATIONSHIP_KINDS: () => MEMBER_RELATIONSHIP_KINDS,
126
135
  MEMBER_SUBSCRIPTION_STATUSES: () => MEMBER_SUBSCRIPTION_STATUSES,
127
136
  McpServerState: () => McpServerState,
128
137
  McpServersApi: () => McpServersApi,
129
138
  MemberFeature: () => MemberFeature,
130
139
  MemberImportMatchInfoMatchType: () => MemberImportMatchInfoMatchType,
131
140
  MemberImportPreviewRowAction: () => MemberImportPreviewRowAction,
141
+ MemberRelationshipKind: () => MemberRelationshipKind,
132
142
  MemberType: () => MemberType,
133
143
  MembersApi: () => MembersApi,
134
144
  MenuItemResponseItemType: () => MenuItemResponseItemType,
@@ -188,8 +198,11 @@ __export(internal_exports, {
188
198
  REALTIME_MODEL_OPENAI: () => REALTIME_MODEL_OPENAI,
189
199
  REALTIME_MODEL_OPENAI_2: () => REALTIME_MODEL_OPENAI_2,
190
200
  REALTIME_MODEL_OPENAI_MINI: () => REALTIME_MODEL_OPENAI_MINI,
201
+ RefResolutionStatus: () => RefResolutionStatus,
191
202
  Region: () => Region,
192
203
  RegistrationIdentifier: () => RegistrationIdentifier,
204
+ RelatedMemberRole: () => RelatedMemberRole,
205
+ RelationshipCardinality: () => RelationshipCardinality,
193
206
  ReportsApi: () => ReportsApi,
194
207
  ResellersApi: () => ResellersApi,
195
208
  Resource: () => Resource,
@@ -221,8 +234,13 @@ __export(internal_exports, {
221
234
  TTS_PREVIEW_PROVIDERS: () => TTS_PREVIEW_PROVIDERS,
222
235
  TasksApi: () => TasksApi,
223
236
  TemplatesApi: () => TemplatesApi,
237
+ TestChatRunLane: () => TestChatRunLane,
238
+ TestChatRunOutcome: () => TestChatRunOutcome,
224
239
  ToolkitState: () => ToolkitState,
225
240
  ToolkitsApi: () => ToolkitsApi,
241
+ UiPromptPresentedKindValues: () => UiPromptPresentedKind,
242
+ UiPromptResponseKindValues: () => UiPromptResponseKind,
243
+ UiPromptResponseStatusValues: () => UiPromptResponseStatus,
226
244
  VoiceApi: () => VoiceApi,
227
245
  WIDGET_SLUGS: () => WIDGET_SLUGS,
228
246
  WORKFLOW_IMPLICIT_USE_SCOPE: () => WORKFLOW_IMPLICIT_USE_SCOPE,
@@ -239,7 +257,7 @@ __export(internal_exports, {
239
257
  areDependenciesSatisfied: () => areDependenciesSatisfied,
240
258
  asIdentifiedMemberContactConflict: () => asIdentifiedMemberContactConflict,
241
259
  bindAccessGrantsMethods: () => bindAccessGrantsMethods,
242
- bindActivityTimelineMethods: () => bindActivityTimelineMethods,
260
+ bindActivityMethods: () => bindActivityMethods,
243
261
  bindAgentTasksMethods: () => bindAgentTasksMethods,
244
262
  bindAgentsMethods: () => bindAgentsMethods,
245
263
  bindAppsMethods: () => bindAppsMethods,
@@ -257,6 +275,7 @@ __export(internal_exports, {
257
275
  bindExperimentsMethods: () => bindExperimentsMethods,
258
276
  bindFilesMethods: () => bindFilesMethods,
259
277
  bindIntegrationsMethods: () => bindIntegrationsMethods,
278
+ bindInterventionRequestsMethods: () => bindInterventionRequestsMethods,
260
279
  bindJourneysMethods: () => bindJourneysMethods,
261
280
  bindMembersMethods: () => bindMembersMethods,
262
281
  bindMetricsMethods: () => bindMetricsMethods,
@@ -461,7 +480,9 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
461
480
  var BulkMemberResultStatus = {
462
481
  created: "created",
463
482
  updated: "updated",
464
- failed: "failed"
483
+ failed: "failed",
484
+ conflict: "conflict",
485
+ skipped: "skipped"
465
486
  };
466
487
  var MemberImportMatchInfoMatchType = {
467
488
  external_id: "external_id",
@@ -475,6 +496,7 @@ var MemberImportPreviewRowAction = {
475
496
  update: "update",
476
497
  unchanged: "unchanged",
477
498
  conflict: "conflict",
499
+ skipped: "skipped",
478
500
  error: "error"
479
501
  };
480
502
 
@@ -623,6 +645,8 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
623
645
  EventRuleActionType2["CONNECTOR_OPERATION"] = "connector:operation";
624
646
  EventRuleActionType2["ECW_REFRESH_MEMBER_ENCOUNTERS"] = "ecw:refresh_member_encounters";
625
647
  EventRuleActionType2["PLAY_AUDIO"] = "audio:play";
648
+ EventRuleActionType2["CHARLESTON_SEND_PMD_PAGE"] = "charleston:send_pmd_page";
649
+ EventRuleActionType2["PATIENTSYNC_TRANSFER"] = "patientsync:transfer";
626
650
  return EventRuleActionType2;
627
651
  })(EventRuleActionType || {});
628
652
  function eventRuleActionParams(params) {
@@ -644,6 +668,7 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
644
668
  WorkspaceFeature2["BROWSER"] = "browser";
645
669
  WorkspaceFeature2["WEB_SEARCH"] = "web_search";
646
670
  WorkspaceFeature2["CALENDAR"] = "calendar";
671
+ WorkspaceFeature2["JOURNEY_V2_EDITOR"] = "journey_v2_editor";
647
672
  WorkspaceFeature2["EXPERIMENTS"] = "experiments";
648
673
  WorkspaceFeature2["MAILBOX_USER_INPUT"] = "mailbox_user_input";
649
674
  WorkspaceFeature2["FORKED_TRAJECTORIES"] = "forked_trajectories";
@@ -827,6 +852,7 @@ var ModelProvider = {
827
852
  elevenlabs: "elevenlabs",
828
853
  deepgram: "deepgram",
829
854
  xai: "xai",
855
+ fireworks: "fireworks",
830
856
  custom: "custom"
831
857
  };
832
858
  var ModelType = {
@@ -929,6 +955,24 @@ var FhirClientType = /* @__PURE__ */ ((FhirClientType2) => {
929
955
  return FhirClientType2;
930
956
  })(FhirClientType || {});
931
957
 
958
+ // src/types/generated/qualification.ts
959
+ var TestChatRunLane = {
960
+ text: "text",
961
+ web_realtime: "web_realtime",
962
+ core_agent_only: "core_agent_only",
963
+ unsupported: "unsupported",
964
+ unknown: "unknown"
965
+ };
966
+ var TestChatRunOutcome = {
967
+ simulator_end: "simulator_end",
968
+ terminal_tool: "terminal_tool",
969
+ agent_silent: "agent_silent",
970
+ max_turns: "max_turns",
971
+ human_end: "human_end",
972
+ configuration_failure: "configuration_failure",
973
+ instrument_failure: "instrument_failure"
974
+ };
975
+
932
976
  // src/types/qualification-types.ts
933
977
  var CriterionType = /* @__PURE__ */ ((CriterionType2) => {
934
978
  CriterionType2["EXPRESSION"] = "expression";
@@ -987,10 +1031,242 @@ var ConsentMethod = /* @__PURE__ */ ((ConsentMethod2) => {
987
1031
  return ConsentMethod2;
988
1032
  })(ConsentMethod || {});
989
1033
 
1034
+ // src/types/generated/member_relationship.ts
1035
+ var MemberRelationshipKind = {
1036
+ parent_of: "parent_of",
1037
+ sibling_of: "sibling_of",
1038
+ spouse_of: "spouse_of",
1039
+ caregiver_of: "caregiver_of",
1040
+ emergency_contact_of: "emergency_contact_of",
1041
+ next_of_kin_of: "next_of_kin_of",
1042
+ legal_guardian_of: "legal_guardian_of",
1043
+ healthcare_agent_of: "healthcare_agent_of",
1044
+ doctor_of: "doctor_of",
1045
+ primary_contact_of: "primary_contact_of"
1046
+ };
1047
+ var RelatedMemberRole = {
1048
+ parent: "parent",
1049
+ child: "child",
1050
+ sibling: "sibling",
1051
+ spouse: "spouse",
1052
+ caregiver: "caregiver",
1053
+ care_recipient: "care_recipient",
1054
+ emergency_contact: "emergency_contact",
1055
+ emergency_contact_for: "emergency_contact_for",
1056
+ next_of_kin: "next_of_kin",
1057
+ next_of_kin_for: "next_of_kin_for",
1058
+ legal_guardian: "legal_guardian",
1059
+ legal_guardian_for: "legal_guardian_for",
1060
+ healthcare_agent: "healthcare_agent",
1061
+ healthcare_agent_for: "healthcare_agent_for",
1062
+ doctor: "doctor",
1063
+ patient: "patient",
1064
+ primary_contact: "primary_contact",
1065
+ primary_contact_for: "primary_contact_for"
1066
+ };
1067
+ var RelationshipCardinality = {
1068
+ many_to_many: "many_to_many",
1069
+ one_to_one: "one_to_one",
1070
+ one_per_target: "one_per_target"
1071
+ };
1072
+
1073
+ // src/types/generated/member_relationship_catalog.ts
1074
+ var MEMBER_RELATIONSHIP_KINDS = [
1075
+ {
1076
+ "kind": "parent_of",
1077
+ "cardinality": "many_to_many",
1078
+ "symmetric": false,
1079
+ "grantsChartAccess": false,
1080
+ "roles": [
1081
+ {
1082
+ "role": "parent",
1083
+ "label": "Parent",
1084
+ "inverseLabel": "Child",
1085
+ "description": "This person is a parent of the member. For a minor, also add Legal guardian if they should read the chart."
1086
+ },
1087
+ {
1088
+ "role": "child",
1089
+ "label": "Child",
1090
+ "inverseLabel": "Parent",
1091
+ "description": "This person is a child of the member."
1092
+ }
1093
+ ]
1094
+ },
1095
+ {
1096
+ "kind": "sibling_of",
1097
+ "cardinality": "many_to_many",
1098
+ "symmetric": true,
1099
+ "grantsChartAccess": false,
1100
+ "roles": [
1101
+ {
1102
+ "role": "sibling",
1103
+ "label": "Sibling",
1104
+ "inverseLabel": "Sibling",
1105
+ "description": "These members are siblings."
1106
+ }
1107
+ ]
1108
+ },
1109
+ {
1110
+ "kind": "spouse_of",
1111
+ "cardinality": "one_to_one",
1112
+ "symmetric": true,
1113
+ "grantsChartAccess": false,
1114
+ "roles": [
1115
+ {
1116
+ "role": "spouse",
1117
+ "label": "Spouse",
1118
+ "inverseLabel": "Spouse",
1119
+ "description": "These members are spouses or partners."
1120
+ }
1121
+ ]
1122
+ },
1123
+ {
1124
+ "kind": "caregiver_of",
1125
+ "cardinality": "many_to_many",
1126
+ "symmetric": false,
1127
+ "grantsChartAccess": false,
1128
+ "roles": [
1129
+ {
1130
+ "role": "caregiver",
1131
+ "label": "Caregiver",
1132
+ "inverseLabel": "Care recipient",
1133
+ "description": "This person provides care for the member at home."
1134
+ },
1135
+ {
1136
+ "role": "care_recipient",
1137
+ "label": "Care recipient",
1138
+ "inverseLabel": "Caregiver",
1139
+ "description": "This person receives care from the member."
1140
+ }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "kind": "emergency_contact_of",
1145
+ "cardinality": "many_to_many",
1146
+ "symmetric": false,
1147
+ "grantsChartAccess": false,
1148
+ "roles": [
1149
+ {
1150
+ "role": "emergency_contact",
1151
+ "label": "Emergency contact",
1152
+ "inverseLabel": "Emergency contact for",
1153
+ "description": "This person is the member's emergency contact."
1154
+ },
1155
+ {
1156
+ "role": "emergency_contact_for",
1157
+ "label": "Emergency contact for",
1158
+ "inverseLabel": "Emergency contact",
1159
+ "description": "The member is listed as this person's emergency contact."
1160
+ }
1161
+ ]
1162
+ },
1163
+ {
1164
+ "kind": "next_of_kin_of",
1165
+ "cardinality": "one_per_target",
1166
+ "symmetric": false,
1167
+ "grantsChartAccess": false,
1168
+ "roles": [
1169
+ {
1170
+ "role": "next_of_kin",
1171
+ "label": "Next of kin",
1172
+ "inverseLabel": "Next of kin for",
1173
+ "description": "This person is the member's designated next of kin. A member has at most one."
1174
+ },
1175
+ {
1176
+ "role": "next_of_kin_for",
1177
+ "label": "Next of kin for",
1178
+ "inverseLabel": "Next of kin",
1179
+ "description": "The member is this person's designated next of kin."
1180
+ }
1181
+ ]
1182
+ },
1183
+ {
1184
+ "kind": "legal_guardian_of",
1185
+ "cardinality": "many_to_many",
1186
+ "symmetric": false,
1187
+ "grantsChartAccess": true,
1188
+ "roles": [
1189
+ {
1190
+ "role": "legal_guardian",
1191
+ "label": "Legal guardian",
1192
+ "inverseLabel": "Legal guardian for",
1193
+ "description": "Court-appointed guardian, or parent/person with parental responsibility for a minor."
1194
+ },
1195
+ {
1196
+ "role": "legal_guardian_for",
1197
+ "label": "Legal guardian for",
1198
+ "inverseLabel": "Legal guardian",
1199
+ "description": "The member is this person's legal guardian."
1200
+ }
1201
+ ]
1202
+ },
1203
+ {
1204
+ "kind": "healthcare_agent_of",
1205
+ "cardinality": "many_to_many",
1206
+ "symmetric": false,
1207
+ "grantsChartAccess": true,
1208
+ "roles": [
1209
+ {
1210
+ "role": "healthcare_agent",
1211
+ "label": "Healthcare agent",
1212
+ "inverseLabel": "Healthcare agent for",
1213
+ "description": "Healthcare power of attorney or health proxy."
1214
+ },
1215
+ {
1216
+ "role": "healthcare_agent_for",
1217
+ "label": "Healthcare agent for",
1218
+ "inverseLabel": "Healthcare agent",
1219
+ "description": "The member is this person's healthcare agent (healthcare power of attorney or health proxy)."
1220
+ }
1221
+ ]
1222
+ },
1223
+ {
1224
+ "kind": "doctor_of",
1225
+ "cardinality": "many_to_many",
1226
+ "symmetric": false,
1227
+ "grantsChartAccess": true,
1228
+ "roles": [
1229
+ {
1230
+ "role": "doctor",
1231
+ "label": "Doctor",
1232
+ "inverseLabel": "Patient",
1233
+ "description": "This person is a treating clinician for the member."
1234
+ },
1235
+ {
1236
+ "role": "patient",
1237
+ "label": "Patient",
1238
+ "inverseLabel": "Doctor",
1239
+ "description": "This person is a patient of the member."
1240
+ }
1241
+ ]
1242
+ },
1243
+ {
1244
+ "kind": "primary_contact_of",
1245
+ "cardinality": "one_per_target",
1246
+ "symmetric": false,
1247
+ "grantsChartAccess": true,
1248
+ "roles": [
1249
+ {
1250
+ "role": "primary_contact",
1251
+ "label": "Primary contact",
1252
+ "inverseLabel": "Primary contact for",
1253
+ "description": "This person is the organization's primary contact for the member. A member has at most one."
1254
+ },
1255
+ {
1256
+ "role": "primary_contact_for",
1257
+ "label": "Primary contact for",
1258
+ "inverseLabel": "Primary contact",
1259
+ "description": "The member is this person's assigned primary contact inside the organization."
1260
+ }
1261
+ ]
1262
+ }
1263
+ ];
1264
+
990
1265
  // src/types/config-health-types.ts
991
1266
  var CONFIG_HEALTH_FACADE_CHECK_SLUGS = [
992
1267
  "workflow.config",
993
1268
  "journey.authoring",
1269
+ "journey.v2_validation",
994
1270
  "workflow.access",
995
1271
  "routine.workflow_access",
996
1272
  "workspace.validation"
@@ -999,85 +1275,20 @@ function isConfigHealthFacadeCheckSlug(value) {
999
1275
  return CONFIG_HEALTH_FACADE_CHECK_SLUGS.includes(value);
1000
1276
  }
1001
1277
 
1002
- // src/types/generated/activity_timeline.ts
1003
- var ActivityActorKind = {
1004
- member: "member",
1005
- agent: "agent",
1006
- operator: "operator",
1007
- event_rule: "event_rule",
1008
- api_key: "api_key",
1009
- system: "system"
1010
- };
1011
- var ActivityAggregationKind = {
1012
- burst: "burst",
1013
- conversation_session: "conversation_session",
1014
- operation: "operation"
1015
- };
1016
- var ActivityCaptureState = {
1017
- active: "active",
1018
- not_started: "not_started"
1019
- };
1020
- var ActivityConfigAction = {
1021
- created: "created",
1022
- updated: "updated",
1023
- deleted: "deleted"
1278
+ // src/types/generated/ui_prompt.ts
1279
+ var UiPromptPresentedKind = {
1280
+ render_ui: "render_ui",
1281
+ present_choice_list: "present_choice_list",
1282
+ inline_connect: "inline_connect"
1024
1283
  };
1025
- var ActivityConfigArea = {
1026
- inbox: "inbox",
1027
- phone_number: "phone_number",
1028
- business_hours: "business_hours",
1029
- escalation_settings: "escalation_settings",
1030
- workspace_settings: "workspace_settings"
1284
+ var UiPromptResponseKind = {
1285
+ render_ui: "render_ui",
1286
+ present_choice_list: "present_choice_list",
1287
+ inline_connect: "inline_connect"
1031
1288
  };
1032
- var ActivityCoverageLimitation = {
1033
- none: "none",
1034
- capture_started_at_cutover: "capture_started_at_cutover",
1035
- legacy_baseline_incomplete: "legacy_baseline_incomplete",
1036
- deletion_may_remove_history: "deletion_may_remove_history",
1037
- config_capture_started: "config_capture_started"
1038
- };
1039
- var ActivityDirection = {
1040
- inbound: "inbound",
1041
- outbound: "outbound"
1042
- };
1043
- var ActivityEmptyReason = {
1044
- collection: "collection",
1045
- period: "period",
1046
- filtered: "filtered"
1047
- };
1048
- var ActivityEventType = {
1049
- workflow_started: "workflow_started",
1050
- assignment_task_transition: "assignment_task_transition",
1051
- journey_status_changed: "journey_status_changed",
1052
- journey_step_status_changed: "journey_step_status_changed",
1053
- journey_goal_status_changed: "journey_goal_status_changed",
1054
- chat_started: "chat_started",
1055
- message: "message",
1056
- call: "call",
1057
- form_field_changed: "form_field_changed",
1058
- config_changed: "config_changed"
1059
- };
1060
- var ActivityEventTypePreset = {
1061
- communications: "communications",
1062
- formUpdates: "formUpdates",
1063
- workflowTask: "workflowTask",
1064
- journey: "journey",
1065
- configuration: "configuration"
1066
- };
1067
- var ActivityGoalImpact = {
1068
- neutral: "neutral",
1069
- success: "success",
1070
- attention: "attention",
1071
- failure: "failure"
1072
- };
1073
- var ActivityTimelineProjection = {
1074
- timeline: "timeline"
1075
- };
1076
- var FormValueDisposition = {
1077
- shown: "shown",
1078
- omitted_long: "omitted_long",
1079
- omitted_structured: "omitted_structured",
1080
- omitted_burst: "omitted_burst"
1289
+ var UiPromptResponseStatus = {
1290
+ submitted: "submitted",
1291
+ declined: "declined"
1081
1292
  };
1082
1293
 
1083
1294
  // src/types/experiment-types.ts
@@ -1162,12 +1373,58 @@ var QUERY_VALUELESS_OPS = /* @__PURE__ */ new Set([
1162
1373
  "exists"
1163
1374
  ]);
1164
1375
 
1376
+ // src/types/generated/activity_feed.ts
1377
+ var ActivityGrain = {
1378
+ month: "month",
1379
+ week: "week",
1380
+ day: "day",
1381
+ hour: "hour",
1382
+ event: "event"
1383
+ };
1384
+ var ActivityGroupBy = {
1385
+ workspace: "workspace",
1386
+ event_type: "event_type",
1387
+ family: "family",
1388
+ workspace_family: "workspace_family"
1389
+ };
1390
+ var ActivityOpenItemOrder = {
1391
+ priority: "priority",
1392
+ recency: "recency"
1393
+ };
1394
+ var ActivityWindowBasis = {
1395
+ absolute: "absolute",
1396
+ workspace_local: "workspace_local"
1397
+ };
1398
+
1399
+ // src/types/generated/family.ts
1400
+ var ActivityEventFamily = {
1401
+ people: "people",
1402
+ conversations: "conversations",
1403
+ journeys: "journeys",
1404
+ automation: "automation",
1405
+ operators: "operators",
1406
+ administration: "administration"
1407
+ };
1408
+ var ActivityOutcome = {
1409
+ ok: "ok",
1410
+ attention: "attention",
1411
+ failed: "failed"
1412
+ };
1413
+
1414
+ // src/types/generated/entity_ref.ts
1415
+ var RefResolutionStatus = {
1416
+ resolved: "resolved",
1417
+ unresolved: "unresolved",
1418
+ unsupported: "unsupported"
1419
+ };
1420
+
1165
1421
  // src/types/generated/customer_activity.ts
1166
1422
  var CustomerActivityClassifierDetectorName = {
1167
1423
  assignment_chat_classifier: "assignment_chat_classifier",
1168
1424
  manager_chat_classifier: "manager_chat_classifier",
1169
1425
  concierge_chat_classifier: "concierge_chat_classifier",
1170
- chat_review: "chat_review"
1426
+ chat_review: "chat_review",
1427
+ a2p_agent_inferred_stop: "a2p_agent_inferred_stop"
1171
1428
  };
1172
1429
  var CustomerActivityClassifierLabel = {
1173
1430
  user_distress: "user_distress",
@@ -1198,7 +1455,8 @@ var CustomerActivityReviewOutcome = {
1198
1455
  bug_filed: "bug_filed",
1199
1456
  linked_existing_work: "linked_existing_work",
1200
1457
  classifier_feedback: "classifier_feedback",
1201
- test_activity: "test_activity"
1458
+ test_activity: "test_activity",
1459
+ a2p_suppression_reversed: "a2p_suppression_reversed"
1202
1460
  };
1203
1461
  var CustomerActivitySeverity = {
1204
1462
  none: "none",
@@ -1473,6 +1731,30 @@ function getAllResourceSlugs() {
1473
1731
  return Object.keys(RESOURCE_METADATA);
1474
1732
  }
1475
1733
 
1734
+ // src/types/generated/channel_message.ts
1735
+ var ChannelMessageDirection = {
1736
+ inbound: "inbound",
1737
+ outbound: "outbound"
1738
+ };
1739
+ var ChannelMessageSource = {
1740
+ sms_record: "sms_record",
1741
+ other_chat: "other_chat"
1742
+ };
1743
+
1744
+ // src/types/generated/chat.ts
1745
+ var ChannelMessagesUnavailableReason = {
1746
+ not_single_channel: "not_single_channel",
1747
+ no_phone_number: "no_phone_number",
1748
+ no_counterpart_phone: "no_counterpart_phone"
1749
+ };
1750
+
1751
+ // src/types/generated/ehr_writeback.ts
1752
+ var EhrWritebackOutcomeResponseStatus = {
1753
+ accepted: "accepted",
1754
+ skipped: "skipped",
1755
+ failed: "failed"
1756
+ };
1757
+
1476
1758
  // src/types/chat-types.ts
1477
1759
  var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
1478
1760
  "failed",
@@ -1576,6 +1858,46 @@ var PilotStage = {
1576
1858
  churned: "churned"
1577
1859
  };
1578
1860
 
1861
+ // src/types/generated/import_skipped_rule.ts
1862
+ var ImportReadinessIssueCode = {
1863
+ phone_not_provisioned: "phone_not_provisioned",
1864
+ phone_missing_default_workflow: "phone_missing_default_workflow",
1865
+ inbox_missing_default_workflow: "inbox_missing_default_workflow",
1866
+ workflow_missing_default_phone: "workflow_missing_default_phone"
1867
+ };
1868
+ var ImportReadinessIssueResourceType = {
1869
+ phone: "phone",
1870
+ inbox: "inbox",
1871
+ workflow: "workflow"
1872
+ };
1873
+ var ImportSkippedRuleResourceGroupResourceType = {
1874
+ phone: "phone",
1875
+ inbox: "inbox",
1876
+ member: "member"
1877
+ };
1878
+ var ImportSkippedRuleResponseNeededResourceTypesItem = {
1879
+ phone: "phone",
1880
+ inbox: "inbox",
1881
+ member: "member"
1882
+ };
1883
+ var ImportSkippedRuleResponseParentKind = {
1884
+ routine: "routine",
1885
+ journey_step: "journey_step",
1886
+ task: "task",
1887
+ workflow: "workflow",
1888
+ other: "other"
1889
+ };
1890
+ var ImportSkippedRuleResponseReasonCode = {
1891
+ missing_binding: "missing_binding",
1892
+ invalid_event_rule_cel: "invalid_event_rule_cel",
1893
+ unresolved_journey_scope: "unresolved_journey_scope"
1894
+ };
1895
+ var ImportSkippedRuleResponseStatus = {
1896
+ outstanding: "outstanding",
1897
+ reconnected: "reconnected",
1898
+ dismissed: "dismissed"
1899
+ };
1900
+
1579
1901
  // src/app-context.ts
1580
1902
  function formatAppContextAsMarkdown(context) {
1581
1903
  if (!context) {
@@ -1764,6 +2086,12 @@ function isChatType(value) {
1764
2086
 
1765
2087
  // src/constants/models.ts
1766
2088
  var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
2089
+ var DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-5.6-luna";
2090
+ var DEFAULT_AGENT_REALTIME_MODEL = "xai:realtime:voice-agent-2";
2091
+ var DEFAULT_AGENT_REALTIME_MODEL_CONFIG = {
2092
+ ttsModel: "native",
2093
+ voiceModel: "xai:voice:cosmo"
2094
+ };
1767
2095
  var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
1768
2096
  var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
1769
2097
 
@@ -1872,7 +2200,9 @@ var SCOPES = {
1872
2200
  "chats:write": {
1873
2201
  name: "chats:write",
1874
2202
  category: "chats" /* CHATS */,
1875
- description: "Send messages in conversations",
2203
+ // Cross-member: acting in a conversation that is not yours. Sending in
2204
+ // your own needs no scope (see the chats:read note on "all").
2205
+ description: "Modify other members' conversations",
1876
2206
  implies: ["chats:read"]
1877
2207
  },
1878
2208
  "chats:admin": {
@@ -2462,6 +2792,9 @@ function isApiValidationError(value) {
2462
2792
  const v = value;
2463
2793
  return typeof v.field === "string" && typeof v.kind === "string" && typeof v.message === "string";
2464
2794
  }
2795
+ function logApiClientError(_error) {
2796
+ console.warn("API request failed");
2797
+ }
2465
2798
  var ApiError = class extends Error {
2466
2799
  statusCode;
2467
2800
  /** Legacy string-array errors — kept for non-validation callers. */
@@ -2480,6 +2813,7 @@ var ApiError = class extends Error {
2480
2813
  errorData;
2481
2814
  constructor(message, statusCode, errors, validationErrors) {
2482
2815
  super(message);
2816
+ this.name = "ApiError";
2483
2817
  this.statusCode = statusCode;
2484
2818
  this.errors = errors;
2485
2819
  this.validationErrors = validationErrors;
@@ -2739,9 +3073,10 @@ ${formattedErrors}`, response.status);
2739
3073
  const message = errorData.detail ? `${errorData.detail}: ${details}` : `Validation failed: ${details}`;
2740
3074
  throw new ApiError(message, response.status, stringErrors);
2741
3075
  }
2742
- const structuredError = errorData.detail || errorData;
3076
+ const detail = errorData.detail;
3077
+ const structuredError = detail && typeof detail === "object" ? detail : errorData;
2743
3078
  if (structuredError && typeof structuredError === "object" && (structuredError.error === true || structuredError.code)) {
2744
- const message = structuredError.message || structuredError.code || "Unknown error";
3079
+ const message = typeof detail === "string" && detail || structuredError.message || structuredError.code || "Unknown error";
2745
3080
  const error = new ApiError(message, response.status);
2746
3081
  error.errorData = structuredError;
2747
3082
  throw error;
@@ -2758,7 +3093,7 @@ ${formattedErrors}`, response.status);
2758
3093
  }
2759
3094
  return response.json();
2760
3095
  } catch (error) {
2761
- console.warn(error);
3096
+ logApiClientError(error);
2762
3097
  throw error;
2763
3098
  }
2764
3099
  }
@@ -2865,7 +3200,7 @@ ${formattedErrors}`, response.status);
2865
3200
  }
2866
3201
  return response;
2867
3202
  } catch (error) {
2868
- console.warn(error);
3203
+ logApiClientError(error);
2869
3204
  throw error;
2870
3205
  }
2871
3206
  }
@@ -2911,7 +3246,7 @@ ${formattedErrors}`, response.status);
2911
3246
  }
2912
3247
  return response.json();
2913
3248
  } catch (error) {
2914
- console.warn(error);
3249
+ logApiClientError(error);
2915
3250
  throw error;
2916
3251
  }
2917
3252
  }
@@ -4152,17 +4487,6 @@ var CallsApi = class extends BaseApiClient {
4152
4487
  `w/${wid}/calls${params.toString() ? `?${params.toString()}` : ""}`
4153
4488
  );
4154
4489
  }
4155
- /** Initiate a new outbound call. */
4156
- async initiateCall(wid, request) {
4157
- return this.fetch(`w/${wid}/call`, {
4158
- method: "POST",
4159
- body: JSON.stringify(request)
4160
- });
4161
- }
4162
- /** Get a voice authentication token for real-time audio. */
4163
- async getVoiceToken(wid) {
4164
- return this.fetch(`w/${wid}/voice/token`);
4165
- }
4166
4490
  /** Get message timing data for a chat recording. */
4167
4491
  async getMessageTiming(wid, chatId) {
4168
4492
  return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
@@ -4288,6 +4612,26 @@ var ChatsApi = class extends BaseApiClient {
4288
4612
  async getChat(wid, id) {
4289
4613
  return this.fetch(`w/${wid}/chats/${id}`);
4290
4614
  }
4615
+ /**
4616
+ * Get a short-lived, interactive AgentCore browser view for this Chat.
4617
+ *
4618
+ * The signed URL is deliberately response-local. Callers must keep it in
4619
+ * memory only and request a fresh value when reopening the view.
4620
+ */
4621
+ async getChatBrowserLiveView(wid, chatId) {
4622
+ const response = await this.fetchRaw(`w/${wid}/chats/${chatId}/browser/live-view`);
4623
+ if (response.status === 204) return null;
4624
+ return response.json();
4625
+ }
4626
+ /**
4627
+ * Which machine resources this Chat is running right now.
4628
+ *
4629
+ * Infrastructure state only — no Chat content — so it is safe to poll while
4630
+ * a Chat is open.
4631
+ */
4632
+ async getChatMachineResources(wid, chatId) {
4633
+ return this.fetch(`w/${wid}/chats/${chatId}/machine-resources`);
4634
+ }
4291
4635
  /**
4292
4636
  * Create-chat preflight for SMS: is a conversation already live between this
4293
4637
  * workspace number and this member?
@@ -4315,6 +4659,23 @@ var ChatsApi = class extends BaseApiClient {
4315
4659
  async getChatCallbacks(wid, chatId) {
4316
4660
  return this.fetch(`w/${wid}/chats/${chatId}/callbacks`);
4317
4661
  }
4662
+ /**
4663
+ * List EHR write-back outcomes for a chat (newest first).
4664
+ *
4665
+ * Operator surface: the endpoint requires `chats:read` in addition to the
4666
+ * chat's own object authorization, so a chat owner reading their own chat
4667
+ * does not reach it. The response carries IDs and closed-vocabulary codes
4668
+ * only — no note body, summary, member fields, or provider messages.
4669
+ */
4670
+ async getChatEhrWritebackOutcomes(wid, chatId, options = {}) {
4671
+ const params = new URLSearchParams();
4672
+ if (options.limit !== void 0) params.append("limit", options.limit.toString());
4673
+ if (options.cursor) params.append("cursor", options.cursor);
4674
+ const queryString = params.toString();
4675
+ return this.fetch(
4676
+ `w/${wid}/chats/${chatId}/ehr-writeback-outcomes${queryString ? `?${queryString}` : ""}`
4677
+ );
4678
+ }
4318
4679
  /** Cancel a pending scheduled callback on a chat. */
4319
4680
  async cancelChatCallback(wid, chatId, callbackId) {
4320
4681
  return this.fetch(
@@ -4326,6 +4687,18 @@ var ChatsApi = class extends BaseApiClient {
4326
4687
  async getChatTodos(wid, chatId) {
4327
4688
  return this.fetch(`w/${wid}/chats/${chatId}/todos`);
4328
4689
  }
4690
+ /**
4691
+ * The caller's own live inline-connect link for a chat.
4692
+ *
4693
+ * An `inline_connect` prompt (`UiPromptPresented.connect`) names the
4694
+ * connection but carries no URL; fetch it here when the member chooses to
4695
+ * connect. 404 when nothing is live for the caller in this chat.
4696
+ */
4697
+ async getInlineConnectLink(wid, chatId, appSlug) {
4698
+ return this.fetch(
4699
+ `w/${wid}/chats/${chatId}/inline-connect/${encodeURIComponent(appSlug)}/link`
4700
+ );
4701
+ }
4329
4702
  /** Get loaded and revealed skills for a chat. */
4330
4703
  async getChatSkills(wid, chatId) {
4331
4704
  return this.fetch(`w/${wid}/chats/${chatId}/skills`);
@@ -4360,6 +4733,23 @@ var ChatsApi = class extends BaseApiClient {
4360
4733
  method: "PUT"
4361
4734
  });
4362
4735
  }
4736
+ /** Start an interaction within an existing Chat without changing its channel. */
4737
+ async createChatInteractionSession(wid, chatId, request) {
4738
+ return this.fetch(
4739
+ `w/${wid}/chats/${chatId}/interaction-sessions`,
4740
+ {
4741
+ method: "POST",
4742
+ body: JSON.stringify(request)
4743
+ }
4744
+ );
4745
+ }
4746
+ /** End one mode session and append its replacement in the same Chat. */
4747
+ async transitionChatInteractionSession(wid, chatId, sessionId, request) {
4748
+ return this.fetch(
4749
+ `w/${wid}/chats/${chatId}/interaction-sessions/${encodeURIComponent(sessionId)}/transition`,
4750
+ { method: "POST", body: JSON.stringify(request) }
4751
+ );
4752
+ }
4363
4753
  /** Create a new chat. */
4364
4754
  async createChat(wid, chat) {
4365
4755
  const { agentMemberId, ...rest } = chat;
@@ -4450,10 +4840,11 @@ var ChatsApi = class extends BaseApiClient {
4450
4840
  }
4451
4841
  /** List messages in a chat with optional pagination.
4452
4842
  * ``id`` is the numeric chat id (documented) or the chat uuid (accepted). */
4453
- async getChatMessages(wid, id, limit, offset) {
4843
+ async getChatMessages(wid, id, limit, offset, before) {
4454
4844
  const params = new URLSearchParams();
4455
4845
  if (limit) params.append("limit", limit.toString());
4456
4846
  if (offset) params.append("offset", offset.toString());
4847
+ if (before) params.append("before", before);
4457
4848
  return this.fetch(
4458
4849
  `w/${wid}/chats/${id}/messages${params.toString() ? `?${params.toString()}` : ""}`
4459
4850
  );
@@ -4873,6 +5264,35 @@ var DashboardsApi = class extends BaseApiClient {
4873
5264
 
4874
5265
  // src/api/data-types.ts
4875
5266
  var DataTypesApi = class extends BaseApiClient {
5267
+ /** Read the local Form's draft and optimistic publication counters. */
5268
+ async getDataTypeDraft(wid, id) {
5269
+ return this.fetch(`w/${wid}/data-types/${id}/schema-draft`);
5270
+ }
5271
+ /** Save a draft without changing the schema used to validate live records. */
5272
+ async saveDataTypeDraft(wid, id, request) {
5273
+ return this.fetch(`w/${wid}/data-types/${id}/schema-draft`, {
5274
+ method: "PUT",
5275
+ body: JSON.stringify(request)
5276
+ });
5277
+ }
5278
+ /** Publish the expected draft as the next immutable local schema version. */
5279
+ async publishDataTypeDraft(wid, id, request) {
5280
+ return this.fetch(`w/${wid}/data-types/${id}/schema-publish`, {
5281
+ method: "POST",
5282
+ body: JSON.stringify(request)
5283
+ });
5284
+ }
5285
+ /** List schema history newest first; use the last version as the next cursor. */
5286
+ async getDataTypeVersions(wid, id, options) {
5287
+ const params = new URLSearchParams();
5288
+ if (options?.beforeVersion !== void 0)
5289
+ params.set("beforeVersion", String(options.beforeVersion));
5290
+ if (options?.limit !== void 0) params.set("limit", String(options.limit));
5291
+ const query = params.toString();
5292
+ return this.fetch(
5293
+ `w/${wid}/data-types/${id}/schema-versions${query ? `?${query}` : ""}`
5294
+ );
5295
+ }
4876
5296
  /** List all data types for a workspace, optionally filtering by archived status. */
4877
5297
  async getDataTypes(wid, options) {
4878
5298
  const params = new URLSearchParams();
@@ -4941,7 +5361,6 @@ var DataTypesApi = class extends BaseApiClient {
4941
5361
  const params = new URLSearchParams();
4942
5362
  if (options?.memberId !== void 0) params.append("member_id", options.memberId.toString());
4943
5363
  if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
4944
- if (options?.recordId !== void 0) params.append("record_id", options.recordId.toString());
4945
5364
  if (options?.search) params.append("search", options.search);
4946
5365
  if (options?.searchField) params.append("search_field", options.searchField);
4947
5366
  if (options?.dataRecordFilterId != null) {
@@ -5097,36 +5516,35 @@ function isUuid(value) {
5097
5516
 
5098
5517
  // src/api/devices.ts
5099
5518
  var DevicesApi = class extends BaseApiClient {
5100
- /** List devices visible to the caller (own devices, or all with devices:admin). */
5101
- async getDevices(wid, options = {}) {
5102
- const qs = options.mine ? "?mine=true" : "";
5103
- return this.fetch(`w/${wid}/devices${qs}`);
5519
+ /** List devices owned by the current Account. */
5520
+ async getDevices() {
5521
+ return this.fetch("account/devices");
5104
5522
  }
5105
- /** Fetch one device by UUID. Non-owners without devices:admin receive 404. */
5106
- async getDevice(wid, deviceUuid) {
5107
- return this.fetch(`w/${wid}/devices/${deviceUuid}`);
5523
+ /** Fetch one device owned by the current Account. Other devices return 404. */
5524
+ async getDevice(deviceUuid) {
5525
+ return this.fetch(`account/devices/${deviceUuid}`);
5108
5526
  }
5109
5527
  /** List shippable companion-device products (Lantern, later SKUs). */
5110
- async getDeviceKinds(wid) {
5111
- return this.fetch(`w/${wid}/devices/kinds`);
5528
+ async getDeviceKinds() {
5529
+ return this.fetch("account/devices/kinds");
5112
5530
  }
5113
- /** Claim a pairing code shown on a companion device. Requires devices:write. */
5114
- async claimDevicePairing(wid, body) {
5115
- return this.fetch(`w/${wid}/devices/pairing/claim`, {
5531
+ /** Claim a pairing code shown on a companion device for the current Account. */
5532
+ async claimDevicePairing(body) {
5533
+ return this.fetch("account/devices/pairing/claim", {
5116
5534
  method: "POST",
5117
5535
  body: JSON.stringify(body)
5118
5536
  });
5119
5537
  }
5120
- /** Update display name and/or LAN capability flags. Requires devices:write. */
5121
- async updateDevice(wid, deviceUuid, body) {
5122
- return this.fetch(`w/${wid}/devices/${deviceUuid}`, {
5538
+ /** Update display name and/or LAN capability flags on an owned device. */
5539
+ async updateDevice(deviceUuid, body) {
5540
+ return this.fetch(`account/devices/${deviceUuid}`, {
5123
5541
  method: "PATCH",
5124
5542
  body: JSON.stringify(body)
5125
5543
  });
5126
5544
  }
5127
- /** Revoke a device credential. The device must pair again. Requires devices:write. */
5128
- async revokeDevice(wid, deviceUuid) {
5129
- return this.fetch(`w/${wid}/devices/${deviceUuid}/revoke`, {
5545
+ /** Revoke an owned device credential. The device must pair again. */
5546
+ async revokeDevice(deviceUuid) {
5547
+ return this.fetch(`account/devices/${deviceUuid}/revoke`, {
5130
5548
  method: "POST",
5131
5549
  body: JSON.stringify({})
5132
5550
  });
@@ -5555,6 +5973,22 @@ var EventsApi = class extends BaseApiClient {
5555
5973
  }
5556
5974
  );
5557
5975
  }
5976
+ /**
5977
+ * Preview what would stop a draft Routine placing its scheduled outbound
5978
+ * calls — the Member voice opt-out, a missing member phone, or a
5979
+ * workspace number that is stale, archived, or not voice-enabled.
5980
+ * Non-persisting and advisory. The audience is reported as counts only,
5981
+ * never as Member rows.
5982
+ */
5983
+ async previewRoutineVoiceReadiness(wid, request) {
5984
+ return this.fetch(
5985
+ `w/${wid}/routines/preview-voice-readiness`,
5986
+ {
5987
+ method: "POST",
5988
+ body: JSON.stringify(request)
5989
+ }
5990
+ );
5991
+ }
5558
5992
  /** List routines with optional pagination and active status filtering. */
5559
5993
  async getRoutines(wid, options = {}) {
5560
5994
  const params = new URLSearchParams();
@@ -5564,6 +5998,8 @@ var EventsApi = class extends BaseApiClient {
5564
5998
  if (options.sortOrder) params.append("sortOrder", options.sortOrder);
5565
5999
  if (options.owner) params.append("owner", options.owner);
5566
6000
  if (options.ownerId) params.append("ownerId", options.ownerId.toString());
6001
+ if (options.agentId) params.append("agentId", options.agentId.toString());
6002
+ if (options.agentOnly) params.append("agentOnly", "true");
5567
6003
  return this.fetch(
5568
6004
  `w/${wid}/routines${params.toString() ? `?${params.toString()}` : ""}`
5569
6005
  );
@@ -6533,7 +6969,14 @@ var InboxesApi = class extends BaseApiClient {
6533
6969
  async getInboxes(wid) {
6534
6970
  return this.fetch(`w/${wid}/inboxes`);
6535
6971
  }
6536
- /** Get an inbox by ID. */
6972
+ /**
6973
+ * Get an inbox by ID or UUID.
6974
+ *
6975
+ * The route has always taken either (`inbox_id: str = Path(..., description=
6976
+ * "Inbox ID or UUID")`); the signature said `number`, which put the UUID path
6977
+ * out of reach for a caller holding an inbox ref from the activity feed —
6978
+ * where refs are UUID-only by design.
6979
+ */
6537
6980
  async getInbox(wid, id) {
6538
6981
  return this.fetch(`w/${wid}/inboxes/${id}`);
6539
6982
  }
@@ -7251,17 +7694,11 @@ var MembersApi = class extends BaseApiClient {
7251
7694
  * operator can decide whether to skip or explicitly overwrite before
7252
7695
  * committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
7253
7696
  */
7254
- async previewImportMembers(wid, file, newMemberRoleId, options) {
7697
+ async previewImportMembers(wid, file, newMemberRoleId) {
7255
7698
  const formData = new FormData();
7256
7699
  formData.append("file", file);
7257
7700
  const params = new URLSearchParams();
7258
7701
  params.append("new_member_role_id", newMemberRoleId.toString());
7259
- if (options?.trustEmailAddresses) {
7260
- params.append("trust_email_addresses", "true");
7261
- }
7262
- if (options?.trustPhoneNumbers) {
7263
- params.append("trust_phone_numbers", "true");
7264
- }
7265
7702
  const response = await this.fetchRaw(
7266
7703
  `w/${wid}/members/import/preview?${params.toString()}`,
7267
7704
  {
@@ -7288,12 +7725,6 @@ var MembersApi = class extends BaseApiClient {
7288
7725
  formData.append("file", file);
7289
7726
  const params = new URLSearchParams();
7290
7727
  params.append("new_member_role_id", newMemberRoleId.toString());
7291
- if (options?.trustEmailAddresses) {
7292
- params.append("trust_email_addresses", "true");
7293
- }
7294
- if (options?.trustPhoneNumbers) {
7295
- params.append("trust_phone_numbers", "true");
7296
- }
7297
7728
  if (options?.identityConflictPolicy) {
7298
7729
  params.append("identity_conflict_policy", options.identityConflictPolicy);
7299
7730
  }
@@ -7542,13 +7973,179 @@ var MembersApi = class extends BaseApiClient {
7542
7973
  async getMemberSyncLinks(wid, memberId) {
7543
7974
  return this.fetch(`w/${wid}/members/${memberId}/sync-links`);
7544
7975
  }
7976
+ async getMemberRelationships(wid, memberId, params) {
7977
+ const search = new URLSearchParams();
7978
+ if (params?.page) search.set("page", String(params.page));
7979
+ if (params?.pageSize) search.set("pageSize", String(params.pageSize));
7980
+ if (params?.kind) search.set("kind", params.kind);
7981
+ const qs = search.toString();
7982
+ return this.fetch(
7983
+ `w/${wid}/members/${memberId}/relationships${qs ? `?${qs}` : ""}`
7984
+ );
7985
+ }
7986
+ async createMemberRelationship(wid, memberId, body) {
7987
+ return this.fetch(`w/${wid}/members/${memberId}/relationships`, {
7988
+ method: "POST",
7989
+ body: JSON.stringify(body)
7990
+ });
7991
+ }
7992
+ async archiveMemberRelationship(wid, memberId, relationshipId) {
7993
+ return this.fetch(
7994
+ `w/${wid}/members/${memberId}/relationships/${relationshipId}`,
7995
+ { method: "DELETE" }
7996
+ );
7997
+ }
7545
7998
  };
7546
7999
 
7547
- // src/api/activity-timeline.ts
7548
- var ActivityTimelineApi = class extends BaseApiClient {
7549
- /** One page of activity. Omit `cursor` for a fresh snapshot. */
7550
- async queryActivityTimeline(wid, request = {}) {
7551
- return this.fetch(`w/${wid}/activity-timeline/query`, {
8000
+ // src/api/activity.ts
8001
+ var ActivityApi = class extends BaseApiClient {
8002
+ /** The account mount: this caller's whole estate, at any grain. */
8003
+ async queryActivity(request) {
8004
+ return this.fetch("activity/query", {
8005
+ method: "POST",
8006
+ body: JSON.stringify(request)
8007
+ });
8008
+ }
8009
+ /**
8010
+ * Latest admitted event for each workspace-qualified Activity subject.
8011
+ * Scope authorization and any event-type leaf authorization are both
8012
+ * applied before a subject is returned.
8013
+ */
8014
+ async queryActivityLatestSubjects(request) {
8015
+ return this.fetch("activity/latest-subjects", {
8016
+ method: "POST",
8017
+ body: JSON.stringify(request)
8018
+ });
8019
+ }
8020
+ /**
8021
+ * The account mount's priority lane — one queue per human. `openedAfter`
8022
+ * may bound the active backlog without changing the priority policy.
8023
+ */
8024
+ async queryActivityOpenItems(request = {}) {
8025
+ return this.fetch("activity/open-items", {
8026
+ method: "POST",
8027
+ body: JSON.stringify(request)
8028
+ });
8029
+ }
8030
+ /**
8031
+ * The account mount's one view: one stream of occurrences, some carrying
8032
+ * open state. The window bounds the event axis; open items older than it
8033
+ * arrive as `olderOpenCount`, never hidden.
8034
+ */
8035
+ async queryActivityOneView(request) {
8036
+ return this.fetch("activity/one-view", {
8037
+ method: "POST",
8038
+ body: JSON.stringify(request)
8039
+ });
8040
+ }
8041
+ /** The account mount's badge numbers. */
8042
+ async getActivityCounts(request = {}) {
8043
+ return this.fetch("activity/counts", {
8044
+ method: "POST",
8045
+ body: JSON.stringify(request)
8046
+ });
8047
+ }
8048
+ /**
8049
+ * What this caller's estate admits, so a client renders honest controls.
8050
+ *
8051
+ * Account mount only, and deliberately so: the org and workspace mounts
8052
+ * answer the same question through the surfaces that already serve their
8053
+ * membership. Not an authorization decision — every read re-derives that.
8054
+ */
8055
+ async getActivityCapabilities() {
8056
+ return this.fetch("activity/capabilities", { method: "GET" });
8057
+ }
8058
+ /** The org mount. `org:info` is the entry gate; `org:read` widens the rows. */
8059
+ async queryOrgActivity(orgUuid, request) {
8060
+ return this.fetch(`o/${orgUuid}/activity/query`, {
8061
+ method: "POST",
8062
+ body: JSON.stringify(request)
8063
+ });
8064
+ }
8065
+ async queryOrgActivityLatestSubjects(orgUuid, request) {
8066
+ return this.fetch(`o/${orgUuid}/activity/latest-subjects`, {
8067
+ method: "POST",
8068
+ body: JSON.stringify(request)
8069
+ });
8070
+ }
8071
+ /** The org mount's priority lane. */
8072
+ async queryOrgActivityOpenItems(orgUuid, request = {}) {
8073
+ return this.fetch(`o/${orgUuid}/activity/open-items`, {
8074
+ method: "POST",
8075
+ body: JSON.stringify(request)
8076
+ });
8077
+ }
8078
+ /** The org mount's one view. */
8079
+ async queryOrgActivityOneView(orgUuid, request) {
8080
+ return this.fetch(`o/${orgUuid}/activity/one-view`, {
8081
+ method: "POST",
8082
+ body: JSON.stringify(request)
8083
+ });
8084
+ }
8085
+ /** The org mount's badge numbers. */
8086
+ async getOrgActivityCounts(orgUuid, request = {}) {
8087
+ return this.fetch(`o/${orgUuid}/activity/counts`, {
8088
+ method: "POST",
8089
+ body: JSON.stringify(request)
8090
+ });
8091
+ }
8092
+ /** The workspace mount. The request's own member session carries its scopes. */
8093
+ async queryWorkspaceActivity(workspaceUuid, request) {
8094
+ return this.fetch(`w/${workspaceUuid}/activity/query`, {
8095
+ method: "POST",
8096
+ body: JSON.stringify(request)
8097
+ });
8098
+ }
8099
+ async queryWorkspaceActivityLatestSubjects(workspaceUuid, request) {
8100
+ return this.fetch(`w/${workspaceUuid}/activity/latest-subjects`, {
8101
+ method: "POST",
8102
+ body: JSON.stringify(request)
8103
+ });
8104
+ }
8105
+ /** The workspace mount's priority lane. */
8106
+ async queryWorkspaceActivityOpenItems(workspaceUuid, request = {}) {
8107
+ return this.fetch(`w/${workspaceUuid}/activity/open-items`, {
8108
+ method: "POST",
8109
+ body: JSON.stringify(request)
8110
+ });
8111
+ }
8112
+ /** The workspace mount's one view. */
8113
+ async queryWorkspaceActivityOneView(workspaceUuid, request) {
8114
+ return this.fetch(`w/${workspaceUuid}/activity/one-view`, {
8115
+ method: "POST",
8116
+ body: JSON.stringify(request)
8117
+ });
8118
+ }
8119
+ /** The workspace mount's badge numbers. */
8120
+ async getWorkspaceActivityCounts(workspaceUuid, request = {}) {
8121
+ return this.fetch(`w/${workspaceUuid}/activity/counts`, {
8122
+ method: "POST",
8123
+ body: JSON.stringify(request)
8124
+ });
8125
+ }
8126
+ /**
8127
+ * Hydrate a page of typed refs in one round trip.
8128
+ *
8129
+ * The relief valve the design names for chatty hydration, and the by-UUID
8130
+ * read path most entity kinds otherwise lack: nineteen kinds resolve here,
8131
+ * each through the workspace's own live authorizers under the caller's
8132
+ * session. One request per workspace per listing, instead of one per ref.
8133
+ *
8134
+ * **Every requested ref comes back**, in the order it was sent and
8135
+ * deduplicated on `(kind, uuid)`. A ref the caller may not see is an entry
8136
+ * with `status: 'unresolved'` — never a 404, and never an omission, so a
8137
+ * page's ability to render never depends on what it happens to name.
8138
+ * `status: 'unsupported'` means this build has no by-UUID path for that
8139
+ * kind at all (account, org, workspace, domain, subscription and the
8140
+ * commerce kinds; see the resolve registry for each one's reason) — those
8141
+ * resolve through the mount that owns them, and retrying here will not
8142
+ * help.
8143
+ *
8144
+ * PHI: resolved labels are member-identifying data. They belong in the UI
8145
+ * and nowhere else — never a log line, never an error message.
8146
+ */
8147
+ async resolveEntityRefs(workspaceUuid, request) {
8148
+ return this.fetch(`w/${workspaceUuid}/entity-refs/resolve`, {
7552
8149
  method: "POST",
7553
8150
  body: JSON.stringify(request)
7554
8151
  });
@@ -7742,6 +8339,10 @@ var MondayIntegrationApi = class extends BaseApiClient {
7742
8339
 
7743
8340
  // src/api/intervention-requests.ts
7744
8341
  var InterventionRequestsApi = class extends BaseApiClient {
8342
+ /** List every visible Chat that currently needs attention in Agent Mode. */
8343
+ async getAgentModeAttention(wid) {
8344
+ return this.fetch(`w/${wid}/agent-mode/attention`);
8345
+ }
7745
8346
  /** List intervention requests in a workspace, newest first. */
7746
8347
  async getInterventionRequests(wid, params = {}) {
7747
8348
  const query = new URLSearchParams();
@@ -7755,6 +8356,23 @@ var InterventionRequestsApi = class extends BaseApiClient {
7755
8356
  `w/${wid}/intervention-requests${qs ? `?${qs}` : ""}`
7756
8357
  );
7757
8358
  }
8359
+ /**
8360
+ * Resolve one intervention request. One row, one resolution — whoever takes
8361
+ * it closes it for everyone who was notified. Resolving an already-resolved
8362
+ * request is a 409 conflict; a non-escalation request is a 409 too.
8363
+ *
8364
+ * The JSON body (empty when no note is supplied) is required as a CSRF
8365
+ * barrier (GRA-6284), so a cross-site form POST cannot reach it.
8366
+ */
8367
+ async resolveInterventionRequest(wid, requestId, params = {}) {
8368
+ return this.fetch(
8369
+ `w/${wid}/intervention-requests/${requestId}/resolve`,
8370
+ {
8371
+ method: "POST",
8372
+ body: JSON.stringify(params)
8373
+ }
8374
+ );
8375
+ }
7758
8376
  };
7759
8377
 
7760
8378
  // src/api/notification-rules.ts
@@ -7836,12 +8454,6 @@ var OperatorApi = class extends BaseApiClient {
7836
8454
  async getPresenceStatus(wid) {
7837
8455
  return this.fetch(`w/${wid}/presence/me`);
7838
8456
  }
7839
- /** Disconnect the current member's presence session. */
7840
- async disconnectPresence(wid) {
7841
- return this.fetch(`w/${wid}/presence/disconnect-self`, {
7842
- method: "POST"
7843
- });
7844
- }
7845
8457
  // Operator chat message methods
7846
8458
  /** Get paginated chat messages for an operator chat. */
7847
8459
  async getOperatorChatMessages(wid, chatId, limit = 50, offset = 0) {
@@ -8411,6 +9023,28 @@ var OrgApi = class extends BaseApiClient {
8411
9023
  async getLegalEntity(orgUuid, legalEntityUuid) {
8412
9024
  return this.fetch(`o/${orgUuid}/legal-entities/${legalEntityUuid}`);
8413
9025
  }
9026
+ /**
9027
+ * Read one registration draft for a legal entity.
9028
+ *
9029
+ * A draft is what the operator has typed but not submitted. It exists so
9030
+ * data entry is never gated on a prerequisite: someone can write down the
9031
+ * caller-ID name today and submit it the day the business is verified.
9032
+ */
9033
+ async getRegistrationDraft(orgUuid, legalEntityUuid, kind) {
9034
+ return this.fetch(
9035
+ `o/${orgUuid}/legal-entities/${legalEntityUuid}/registration-drafts/${kind}`
9036
+ );
9037
+ }
9038
+ /**
9039
+ * Save one registration draft. Always accepted — the server refuses only
9040
+ * an oversized body, never an unfinished one.
9041
+ */
9042
+ async saveRegistrationDraft(orgUuid, legalEntityUuid, kind, data) {
9043
+ return this.fetch(
9044
+ `o/${orgUuid}/legal-entities/${legalEntityUuid}/registration-drafts/${kind}`,
9045
+ { method: "PUT", body: JSON.stringify({ data }) }
9046
+ );
9047
+ }
8414
9048
  /** Cached voice trust product state (CNAM / SHAKEN-STIR / Voice Integrity) for one legal entity. */
8415
9049
  async getVoiceTrustProducts(orgUuid, legalEntityUuid) {
8416
9050
  return this.fetch(
@@ -8584,6 +9218,42 @@ var OrgApi = class extends BaseApiClient {
8584
9218
  }
8585
9219
  );
8586
9220
  }
9221
+ // =========================================================================
9222
+ // Organization webhook endpoints (GRA-8314)
9223
+ // =========================================================================
9224
+ async listOrgWebhookEndpoints(orgIdOrUuid) {
9225
+ return this.fetch(`o/${orgIdOrUuid}/webhooks`);
9226
+ }
9227
+ /**
9228
+ * The subscribable event-type vocabulary for the org UI's event-type
9229
+ * picker — exactly what the create/update validators accept, so the UI
9230
+ * never offers a type the API would reject.
9231
+ */
9232
+ async listOrgWebhookEventTypes(orgIdOrUuid) {
9233
+ return this.fetch(`o/${orgIdOrUuid}/webhooks/event-types`);
9234
+ }
9235
+ async createOrgWebhookEndpoint(orgIdOrUuid, data) {
9236
+ return this.fetch(`o/${orgIdOrUuid}/webhooks`, {
9237
+ method: "POST",
9238
+ body: JSON.stringify(data)
9239
+ });
9240
+ }
9241
+ async updateOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
9242
+ return this.fetch(`o/${orgIdOrUuid}/webhooks/${endpointUuid}`, {
9243
+ method: "PATCH",
9244
+ body: JSON.stringify(data)
9245
+ });
9246
+ }
9247
+ async deleteOrgWebhookEndpoint(orgIdOrUuid, endpointUuid) {
9248
+ return this.fetch(`o/${orgIdOrUuid}/webhooks/${endpointUuid}`, {
9249
+ method: "DELETE"
9250
+ });
9251
+ }
9252
+ async listOrgWebhookEndpointDeliveries(orgIdOrUuid, endpointUuid, limit = 50) {
9253
+ return this.fetch(
9254
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
9255
+ );
9256
+ }
8587
9257
  };
8588
9258
  function businessProfilePath(orgUuid, legalEntityUuid) {
8589
9259
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -9004,6 +9674,8 @@ var PersonasApi = class extends BaseApiClient {
9004
9674
  const q = new URLSearchParams();
9005
9675
  if (params?.page !== void 0) q.set("page", String(params.page));
9006
9676
  if (params?.pageSize !== void 0) q.set("pageSize", String(params.pageSize));
9677
+ if (params?.includeArchived !== void 0)
9678
+ q.set("includeArchived", String(params.includeArchived));
9007
9679
  const qs = q.toString() ? `?${q.toString()}` : "";
9008
9680
  return this.fetch(`w/${wid}/personas${qs}`);
9009
9681
  }
@@ -9022,6 +9694,18 @@ var PersonasApi = class extends BaseApiClient {
9022
9694
  body: JSON.stringify(data)
9023
9695
  });
9024
9696
  }
9697
+ async archivePersona(wid, id) {
9698
+ return this.fetch(`w/${wid}/personas/${id}/archive`, {
9699
+ method: "POST",
9700
+ body: JSON.stringify({})
9701
+ });
9702
+ }
9703
+ async unarchivePersona(wid, id) {
9704
+ return this.fetch(`w/${wid}/personas/${id}/unarchive`, {
9705
+ method: "POST",
9706
+ body: JSON.stringify({})
9707
+ });
9708
+ }
9025
9709
  async deletePersona(wid, id) {
9026
9710
  return this.fetch(`w/${wid}/personas/${id}`, { method: "DELETE" });
9027
9711
  }
@@ -10723,6 +11407,59 @@ var JourneysApi = class extends BaseApiClient {
10723
11407
  async getJourneyAuthoring(wid, journeyId) {
10724
11408
  return this.fetch(`w/${wid}/journeys/${journeyId}/authoring`);
10725
11409
  }
11410
+ /**
11411
+ * Atomically replace a v2 Journey's whole definition (Journey v2 plan §3.8).
11412
+ *
11413
+ * ONE request carries the ordered touches, the wait into each touch, the
11414
+ * ordered Endings, action associations, goals, and
11415
+ * `expectedUpdatedAt` for optimistic concurrency. It is a full replacement,
11416
+ * not a patch — omitting `goals` is the one exception and leaves them alone.
11417
+ *
11418
+ * Returns the AUTHORING projection (`Journey`): the caller just wrote the
11419
+ * CEL and holds the `journeys:write` scope that authorizes reading it back.
11420
+ *
11421
+ * Refusals are HTTP 409 with a stable `code`:
11422
+ * * `journey_v2_execution_model_mismatch` — the Journey is legacy; use the
11423
+ * step/connection/goal endpoints.
11424
+ * * `journey_v2_structural_edit_not_allowed` — it is live; pause it first.
11425
+ * * `journey_v2_definition_conflict` — someone saved first; reload.
11426
+ * * `journey_v2_invalid_topology` — the resulting graph is not executable;
11427
+ * the body carries `issues` (codes and resource uuids, never CEL).
11428
+ */
11429
+ async putJourneyV2Definition(wid, journeyId, data) {
11430
+ return this.fetch(`w/${wid}/journeys/${journeyId}/v2-definition`, {
11431
+ method: "PUT",
11432
+ body: JSON.stringify(data)
11433
+ });
11434
+ }
11435
+ /**
11436
+ * Dry-run the v2 publish validator against the STORED definition.
11437
+ *
11438
+ * Answers "could I activate this right now?" without attempting the
11439
+ * transition. Issues carry closed codes and resource uuids only — never CEL
11440
+ * and never member data — so they are safe to render or log.
11441
+ */
11442
+ async getJourneyV2Validation(wid, journeyId) {
11443
+ return this.fetch(
11444
+ `w/${wid}/journeys/${journeyId}/v2-definition/validation`
11445
+ );
11446
+ }
11447
+ /**
11448
+ * MemberFilter ids and names, for the Journey authoring picker.
11449
+ *
11450
+ * A v2 wait, route or Ending may carry a structured MemberFilter predicate
11451
+ * and the author selects it by NAME (rule-filters plan §3.10). This is the
11452
+ * catalogue for that control and the whole of what it needs: two scalars per
11453
+ * filter, no `query` predicate, no rules, no counts.
11454
+ *
11455
+ * Authorized on `journeys:write` alone — deliberately NOT the Members
11456
+ * surface's `MembersApi.getMemberFilters`, which is `members:read`
11457
+ * because it returns each filter's predicate. Journey authoring should not
11458
+ * require Member-read access to name a cohort.
11459
+ */
11460
+ async getJourneyFilterOptions(wid) {
11461
+ return this.fetch(`w/${wid}/journeys/filter-options`);
11462
+ }
10726
11463
  /** Create a new journey. Returns the READ projection (`JourneyRead`). */
10727
11464
  async createJourney(wid, data) {
10728
11465
  return this.fetch(`w/${wid}/journeys`, {
@@ -10730,7 +11467,14 @@ var JourneysApi = class extends BaseApiClient {
10730
11467
  body: JSON.stringify(data)
10731
11468
  });
10732
11469
  }
10733
- /** Update an existing journey. Returns the READ projection (`JourneyRead`). */
11470
+ /**
11471
+ * Update an existing journey. Returns the READ projection (`JourneyRead`).
11472
+ *
11473
+ * `executionModel` is excluded: it is a CREATE-only field. Flipping a live
11474
+ * Journey's engine is a guarded, audited migration operation (Journey v2
11475
+ * plan §3.11), so the server has no update counterpart and sending one here
11476
+ * would silently do nothing.
11477
+ */
10734
11478
  async updateJourney(wid, journeyId, data) {
10735
11479
  return this.fetch(`w/${wid}/journeys/${journeyId}`, {
10736
11480
  method: "PUT",
@@ -10837,8 +11581,6 @@ var JourneysApi = class extends BaseApiClient {
10837
11581
  qs.set("currentTaskId", String(params.currentTaskId));
10838
11582
  if (params?.runtimeFailureEdgeId !== void 0)
10839
11583
  qs.set("runtimeFailureEdgeId", String(params.runtimeFailureEdgeId));
10840
- if (params?.memberJourneyId !== void 0)
10841
- qs.set("memberJourneyId", String(params.memberJourneyId));
10842
11584
  const query = qs.toString();
10843
11585
  return this.fetch(
10844
11586
  `w/${wid}/journeys/${journeyId}/members${query ? `?${query}` : ""}`
@@ -10992,6 +11734,15 @@ var WorkflowsApi = class extends BaseApiClient {
10992
11734
  async getWorkflow(wid, id) {
10993
11735
  return this.fetch(`w/${wid}/workflows/${id}`);
10994
11736
  }
11737
+ async getWorkflowOpeningTurnConversionReport(wid, id) {
11738
+ return this.fetch(`w/${wid}/workflows/${id}/opening-turn/conversion-report`);
11739
+ }
11740
+ async convertWorkflowStartTaskOpeningMessage(wid, id, expectedRuleId) {
11741
+ return this.fetch(`w/${wid}/workflows/${id}/opening-turn/convert-start-task-message`, {
11742
+ method: "POST",
11743
+ body: JSON.stringify({ expectedRuleId })
11744
+ });
11745
+ }
10995
11746
  /** Get activity metrics for a single workflow. */
10996
11747
  async getWorkflowActivity(wid, id, options) {
10997
11748
  const params = options?.days ? `?days=${options.days}` : "";
@@ -11476,11 +12227,31 @@ var WorkspaceInvitationsApi = class extends BaseApiClient {
11476
12227
  };
11477
12228
 
11478
12229
  // src/api/workspaces.ts
12230
+ function planFields(options) {
12231
+ if (!options) return {};
12232
+ const fields = {};
12233
+ if (options.intent !== void 0) fields.intent = options.intent;
12234
+ if (options.expectedPlanFingerprint !== void 0) {
12235
+ fields.expectedPlanFingerprint = options.expectedPlanFingerprint;
12236
+ }
12237
+ if (options.bindings !== void 0 && options.bindings.length > 0) {
12238
+ fields.bindings = options.bindings;
12239
+ }
12240
+ return fields;
12241
+ }
11479
12242
  var WorkspacesApi = class extends BaseApiClient {
11480
12243
  /** List all workspaces accessible to the current user. */
11481
12244
  async getWorkspaces() {
11482
12245
  return this.fetch("w/");
11483
12246
  }
12247
+ /**
12248
+ * Compact rows for the workspaces a companion device could enter — the
12249
+ * Lantern picker. Filtered by the same admission policy a device
12250
+ * credential is gated by, without needing the device credential.
12251
+ */
12252
+ async getDeviceAdmissibleWorkspaces() {
12253
+ return this.fetch("w/?can_use_device=1");
12254
+ }
11484
12255
  /** List all publicly visible workspaces. */
11485
12256
  async getPublicWorkspaces() {
11486
12257
  return this.fetch("w/public");
@@ -11774,18 +12545,62 @@ var WorkspacesApi = class extends BaseApiClient {
11774
12545
  const qs = searchParams.toString();
11775
12546
  return this.fetch(`w/${wid}/export${qs ? `?${qs}` : ""}`);
11776
12547
  }
11777
- /** Preview the result of importing workspace configuration without applying changes. */
11778
- async previewWorkspaceImport(wid, exportData, importMappings, createNew, autoMap) {
12548
+ /** Preview the result of importing workspace configuration without applying changes.
12549
+ *
12550
+ * Pass `options.intent = 'template_reapply'` to get the deterministic
12551
+ * re-apply plan: `planRows`, `sourceFingerprint` and `planFingerprint` come
12552
+ * back beside the legacy preview items, and the fingerprint is what
12553
+ * `importWorkspace` must be given to apply exactly that projection.
12554
+ */
12555
+ async previewWorkspaceImport(wid, exportData, importMappings, createNew, autoMap, options) {
11779
12556
  return this.fetch(`w/${wid}/preview-import`, {
11780
12557
  method: "POST",
11781
12558
  body: JSON.stringify({
11782
12559
  exportData,
11783
12560
  importMappings,
11784
12561
  createNew,
11785
- autoMap
12562
+ autoMap,
12563
+ ...planFields(options)
11786
12564
  })
11787
12565
  });
11788
12566
  }
12567
+ /**
12568
+ * Plan a workspace export ZIP against this workspace without importing it.
12569
+ *
12570
+ * The sibling of `previewWorkspaceImport`, and it exists for one reason: a
12571
+ * JSON preview has no archive, so it cannot decide whether File BYTES would
12572
+ * be replaced — that decision compares the archive's blob digest against the
12573
+ * destination's current content digest.
12574
+ */
12575
+ async previewWorkspaceImportZip(wid, archive, options) {
12576
+ const { exportData, importMappings, createNew, autoMap, ...planOptions } = options ?? {};
12577
+ const payload = {
12578
+ importMappings: importMappings ?? {},
12579
+ createNew: createNew ?? {},
12580
+ ...planFields(planOptions)
12581
+ };
12582
+ if (exportData) payload.exportData = exportData;
12583
+ if (autoMap) payload.autoMap = autoMap;
12584
+ const form = new FormData();
12585
+ form.append(
12586
+ "request",
12587
+ new Blob([JSON.stringify(payload)], { type: "application/json" }),
12588
+ "import.json"
12589
+ );
12590
+ form.append("archive", archive, "workspace-export.zip");
12591
+ return this.fetch(`w/${wid}/preview-import.zip`, {
12592
+ method: "POST",
12593
+ body: form
12594
+ });
12595
+ }
12596
+ /**
12597
+ * Everything a template re-apply adds to an import or a preview.
12598
+ *
12599
+ * `bindings` values are sent in the request body only. They are never
12600
+ * projected from a response and must never be logged: the point of a
12601
+ * binding is that a webhook endpoint and a signing secret belong to ONE
12602
+ * target workspace.
12603
+ */
11789
12604
  /** Download a workspace export ZIP (``export.json`` + file blobs). */
11790
12605
  async exportWorkspaceZip(wid, workflowId, scope, exclude) {
11791
12606
  const searchParams = new URLSearchParams();
@@ -11799,46 +12614,138 @@ var WorkspacesApi = class extends BaseApiClient {
11799
12614
  /** Import workspace configuration from exported JSON, or from a ZIP archive.
11800
12615
  * Pass ``archive`` (the ZIP from ``exportWorkspaceZip``) to restore file
11801
12616
  * contents. ``exportData`` may be omitted when the ZIP contains it.
11802
- */
11803
- async importWorkspace(wid, exportData, importMappings, createNew, archive) {
11804
- const payload = {
11805
- importMappings,
11806
- createNew
11807
- };
11808
- if (exportData) {
11809
- payload.exportData = exportData;
11810
- }
12617
+ *
12618
+ * ``activateWebhookRules`` is safety-default false: imported
12619
+ * ``webhook:send`` EventRules are force-disabled unless the operator
12620
+ * opts in. An exported-inactive rule stays inactive either way.
12621
+ *
12622
+ * With ``options.intent = 'template_reapply'`` this is the GUARDED apply.
12623
+ * It requires ``options.expectedPlanFingerprint`` — the digest a preview
12624
+ * returned — and answers 200 ``success``, 200 ``noop`` (the target already
12625
+ * matched the template, so nothing at all was recorded), 409
12626
+ * ``stale_import_plan`` or 409 ``import_plan_refused``. Both 409s commit
12627
+ * nothing and carry the complete values-free ``planRows``.
12628
+ */
12629
+ async importWorkspace(wid, exportData, importMappings, createNew, archive, activateWebhookRules, autoMap, options) {
11811
12630
  if (archive) {
11812
- const form = new FormData();
11813
- form.append(
11814
- "request",
11815
- new Blob([JSON.stringify(payload)], { type: "application/json" }),
11816
- "import.json"
11817
- );
11818
- form.append("archive", archive, "workspace-export.zip");
11819
- return this.fetch(`w/${wid}/import.zip`, {
11820
- method: "POST",
11821
- body: form
12631
+ return this.importWorkspaceZip(wid, archive, {
12632
+ ...options,
12633
+ exportData,
12634
+ importMappings,
12635
+ createNew,
12636
+ autoMap,
12637
+ activateWebhookRules
11822
12638
  });
11823
12639
  }
11824
12640
  if (!exportData) {
11825
12641
  throw new Error("exportData is required for JSON import");
11826
12642
  }
12643
+ const payload = {
12644
+ exportData,
12645
+ importMappings,
12646
+ createNew,
12647
+ ...planFields(options)
12648
+ };
12649
+ if (activateWebhookRules) {
12650
+ payload.activateWebhookRules = activateWebhookRules;
12651
+ }
12652
+ if (autoMap) {
12653
+ payload.autoMap = autoMap;
12654
+ }
11827
12655
  return this.fetch(`w/${wid}/import`, {
11828
12656
  method: "POST",
11829
12657
  body: JSON.stringify(payload)
11830
12658
  });
11831
12659
  }
12660
+ /**
12661
+ * Apply a workspace export ZIP to this workspace.
12662
+ *
12663
+ * The apply sibling of `previewWorkspaceImportZip`, and the same multipart
12664
+ * shape: the archive travels as `archive`, everything else as one JSON
12665
+ * `request` part. `exportData` defaults to `export.json` inside the ZIP, so
12666
+ * it is sent only to override it.
12667
+ *
12668
+ * With `options.intent = 'template_reapply'` this is the GUARDED apply. It
12669
+ * requires `options.expectedPlanFingerprint` — the digest a preview
12670
+ * returned — and answers 200 `success`, 200 `noop` (the target already
12671
+ * matched the template, so nothing at all was recorded), 409
12672
+ * `stale_import_plan` or 409 `import_plan_refused`. Both 409s commit
12673
+ * nothing and carry the complete values-free `planRows`.
12674
+ *
12675
+ * `options.bindings` values are sent in the request body only. They are
12676
+ * never projected from a response and must never be logged: the point of a
12677
+ * binding is that a webhook endpoint and a signing secret belong to ONE
12678
+ * target workspace.
12679
+ */
12680
+ async importWorkspaceZip(wid, archive, options) {
12681
+ const {
12682
+ exportData,
12683
+ importMappings,
12684
+ createNew,
12685
+ autoMap,
12686
+ activateWebhookRules,
12687
+ ...planOptions
12688
+ } = options ?? {};
12689
+ const payload = {
12690
+ importMappings: importMappings ?? {},
12691
+ createNew: createNew ?? {},
12692
+ ...planFields(planOptions)
12693
+ };
12694
+ if (exportData) payload.exportData = exportData;
12695
+ if (activateWebhookRules) payload.activateWebhookRules = activateWebhookRules;
12696
+ if (autoMap) payload.autoMap = autoMap;
12697
+ const form = new FormData();
12698
+ form.append(
12699
+ "request",
12700
+ new Blob([JSON.stringify(payload)], { type: "application/json" }),
12701
+ "import.json"
12702
+ );
12703
+ form.append("archive", archive, "workspace-export.zip");
12704
+ return this.fetch(`w/${wid}/import.zip`, {
12705
+ method: "POST",
12706
+ body: form
12707
+ });
12708
+ }
12709
+ /**
12710
+ * Reconnectable EventRules skipped by the latest workspace import, grouped
12711
+ * by the missing phone / inbox / member. Templates and action params are
12712
+ * not returned.
12713
+ */
12714
+ async getImportSkippedRules(wid, status) {
12715
+ const params = new URLSearchParams();
12716
+ if (status !== void 0) {
12717
+ params.set("status", status);
12718
+ }
12719
+ const qs = params.toString();
12720
+ return this.fetch(
12721
+ `w/${wid}/import/skipped-rules${qs ? `?${qs}` : ""}`
12722
+ );
12723
+ }
12724
+ /** Current bounded phone, inbox, and phone-chat binding gaps after an import. */
12725
+ async getImportReadiness(wid) {
12726
+ return this.fetch(`w/${wid}/import/readiness`);
12727
+ }
12728
+ /**
12729
+ * Re-point every outstanding skipped EventRule that needed the same source
12730
+ * resource onto a re-provisioned one, recreating each rule from its
12731
+ * preserved definition. Repeat calls no-op on already-reconnected rows.
12732
+ */
12733
+ async rebuildImportSkippedRules(wid, body) {
12734
+ return this.fetch(
12735
+ `w/${wid}/import/skipped-rules/rebuild`,
12736
+ { method: "POST", body: JSON.stringify(body) }
12737
+ );
12738
+ }
11832
12739
  /** Preview a workspace import using the legacy untyped interface. */
11833
12740
  // Legacy method for backward compatibility
11834
- async previewImportWorkspace(wid, exportData, importMappings = {}, createNew = {}) {
12741
+ async previewImportWorkspace(wid, exportData, importMappings = {}, createNew = {}, autoMap) {
12742
+ const payload = { exportData, importMappings, createNew };
12743
+ if (autoMap) {
12744
+ payload.autoMap = autoMap;
12745
+ }
11835
12746
  return this.fetch(`w/${wid}/preview-import`, {
11836
12747
  method: "POST",
11837
- body: JSON.stringify({
11838
- exportData,
11839
- importMappings,
11840
- createNew
11841
- })
12748
+ body: JSON.stringify(payload)
11842
12749
  });
11843
12750
  }
11844
12751
  /** List available themes for a workspace. */
@@ -11923,7 +12830,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11923
12830
  connectionSync: new ConnectionSyncApi(apiKey, baseUrl, customFetch),
11924
12831
  mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
11925
12832
  members: new MembersApi(apiKey, baseUrl, customFetch),
11926
- activityTimeline: new ActivityTimelineApi(apiKey, baseUrl, customFetch),
12833
+ activity: new ActivityApi(apiKey, baseUrl, customFetch),
11927
12834
  motd: new MotdApi(apiKey, baseUrl, customFetch),
11928
12835
  trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
11929
12836
  confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
@@ -11970,6 +12877,8 @@ var WORKSPACE_METHOD_NAMES = [
11970
12877
  "archiveDataType",
11971
12878
  "archiveJourney",
11972
12879
  "archiveMember",
12880
+ "archiveMemberRelationship",
12881
+ "archivePersona",
11973
12882
  "archivePhoneNumber",
11974
12883
  "archiveStep",
11975
12884
  "archiveTask",
@@ -12022,6 +12931,8 @@ var WORKSPACE_METHOD_NAMES = [
12022
12931
  "createCalendarEventType",
12023
12932
  "createCalendarSchedule",
12024
12933
  "createChat",
12934
+ "createChatInteractionSession",
12935
+ "transitionChatInteractionSession",
12025
12936
  "createChatCompletion",
12026
12937
  "createChatFilter",
12027
12938
  "createChatLabel",
@@ -12051,6 +12962,7 @@ var WORKSPACE_METHOD_NAMES = [
12051
12962
  "createMemberFilter",
12052
12963
  "createMemberLabel",
12053
12964
  "createMemberMemory",
12965
+ "createMemberRelationship",
12054
12966
  "createMemberRole",
12055
12967
  "createMenuItem",
12056
12968
  "createNotificationRule",
@@ -12153,7 +13065,6 @@ var WORKSPACE_METHOD_NAMES = [
12153
13065
  "disconnectConfluence",
12154
13066
  "disconnectHubspot",
12155
13067
  "disconnectMondayConnection",
12156
- "disconnectPresence",
12157
13068
  "disconnectSalesforce",
12158
13069
  "discordLinkPreflight",
12159
13070
  "discoverOAuthMetadata",
@@ -12216,6 +13127,7 @@ var WORKSPACE_METHOD_NAMES = [
12216
13127
  "getAccessGrant",
12217
13128
  "getAccessGrants",
12218
13129
  "getAgent",
13130
+ "getAgentModeAttention",
12219
13131
  "getAgentTask",
12220
13132
  "getAgentTaskMessages",
12221
13133
  "getAgentTasks",
@@ -12247,7 +13159,9 @@ var WORKSPACE_METHOD_NAMES = [
12247
13159
  "getCharlestonTestDeliveryRecipients",
12248
13160
  "getChat",
12249
13161
  "getChatAssignmentTasks",
13162
+ "getChatBrowserLiveView",
12250
13163
  "getChatCallbacks",
13164
+ "getChatEhrWritebackOutcomes",
12251
13165
  "getChatEmails",
12252
13166
  "getChatFilter",
12253
13167
  "getChatFilterByUuid",
@@ -12256,6 +13170,7 @@ var WORKSPACE_METHOD_NAMES = [
12256
13170
  "getChatLabel",
12257
13171
  "getChatLabelByUuid",
12258
13172
  "getChatLabels",
13173
+ "getChatMachineResources",
12259
13174
  "getChatMessages",
12260
13175
  "getChatModelOverride",
12261
13176
  "getChatPhoneCalls",
@@ -12296,6 +13211,8 @@ var WORKSPACE_METHOD_NAMES = [
12296
13211
  "getDataRecordFilters",
12297
13212
  "getDataRecords",
12298
13213
  "getDataType",
13214
+ "getDataTypeDraft",
13215
+ "getDataTypeVersions",
12299
13216
  "getDataTypeByUuid",
12300
13217
  "getDataTypeBySlug",
12301
13218
  "getDataTypes",
@@ -12339,9 +13256,15 @@ var WORKSPACE_METHOD_NAMES = [
12339
13256
  "listChatRecordings",
12340
13257
  "previewQuery",
12341
13258
  "publishSiteSource",
12342
- "queryActivityTimeline",
13259
+ "publishDataTypeDraft",
13260
+ "saveDataTypeDraft",
13261
+ "queryWorkspaceActivity",
13262
+ "queryWorkspaceActivityLatestSubjects",
13263
+ "queryWorkspaceActivityOpenItems",
13264
+ "queryWorkspaceActivityOneView",
12343
13265
  "registerDiscordSlashCommands",
12344
13266
  "reopenWorkspaceSupportRequest",
13267
+ "resolveEntityRefs",
12345
13268
  "resetSiteSource",
12346
13269
  "resolveFilePath",
12347
13270
  "getFileLabel",
@@ -12369,16 +13292,22 @@ var WORKSPACE_METHOD_NAMES = [
12369
13292
  "getHubspotSyncLogs",
12370
13293
  "getHubspotTransformPresets",
12371
13294
  "getICalFeedUrl",
13295
+ "getImportSkippedRules",
13296
+ "getImportReadiness",
13297
+ "rebuildImportSkippedRules",
12372
13298
  "getInbox",
12373
13299
  "getInboxEmail",
12374
13300
  "getInboxEmails",
12375
13301
  "getInboxThreads",
12376
13302
  "getInboxes",
13303
+ "getInterventionRequests",
12377
13304
  "getJourney",
12378
13305
  "getJourneyAuthoring",
13306
+ "getJourneyFilterOptions",
12379
13307
  "getJourneyHealth",
12380
13308
  "getJourneyMembers",
12381
13309
  "getJourneyNotes",
13310
+ "getJourneyV2Validation",
12382
13311
  "getJourneys",
12383
13312
  "getLinkablePhones",
12384
13313
  "getLinkedHealthieMembers",
@@ -12406,6 +13335,7 @@ var WORKSPACE_METHOD_NAMES = [
12406
13335
  "getMemberMemories",
12407
13336
  "getMemberMemory",
12408
13337
  "getMemberRecordCounts",
13338
+ "getMemberRelationships",
12409
13339
  "getMemberRole",
12410
13340
  "getMemberRoleCleanupPlan",
12411
13341
  "getMemberRoleByUuid",
@@ -12454,8 +13384,6 @@ var WORKSPACE_METHOD_NAMES = [
12454
13384
  "getPublicFolder",
12455
13385
  "getPublicFolderFiles",
12456
13386
  "getPublicProducts",
12457
- "previewPromoCode",
12458
- "startPromoPlanTrial",
12459
13387
  "getQualification",
12460
13388
  "getQualifications",
12461
13389
  "getRecordingInfo",
@@ -12510,10 +13438,10 @@ var WORKSPACE_METHOD_NAMES = [
12510
13438
  "getUnreadNotificationCount",
12511
13439
  "getUsageDashboard",
12512
13440
  "getVariableRegistry",
12513
- "getVoiceToken",
12514
13441
  "getVoiceUsageReport",
12515
13442
  "getWebhookLogs",
12516
13443
  "getWorkflow",
13444
+ "getWorkflowOpeningTurnConversionReport",
12517
13445
  "getWorkflowAccessValidation",
12518
13446
  "getWorkflowActivity",
12519
13447
  "getWorkflowConfigValidation",
@@ -12530,6 +13458,7 @@ var WORKSPACE_METHOD_NAMES = [
12530
13458
  "getWorkflows",
12531
13459
  "getWorkflowsActivityBatch",
12532
13460
  "getWorkspace",
13461
+ "getWorkspaceActivityCounts",
12533
13462
  "getWorkspaceBuilder",
12534
13463
  "getWorkspaceBuilders",
12535
13464
  "getWorkspaceCounts",
@@ -12549,7 +13478,7 @@ var WORKSPACE_METHOD_NAMES = [
12549
13478
  "importMembers",
12550
13479
  "importSalesforceMembers",
12551
13480
  "importWorkspace",
12552
- "initiateCall",
13481
+ "importWorkspaceZip",
12553
13482
  "initiateOutboundCall",
12554
13483
  "inspectPrompt",
12555
13484
  "installHubspot",
@@ -12606,14 +13535,17 @@ var WORKSPACE_METHOD_NAMES = [
12606
13535
  "previewMemberWorkflowVoice",
12607
13536
  "previewRenameFieldSlug",
12608
13537
  "previewImportWorkspace",
13538
+ "previewRoutineVoiceReadiness",
12609
13539
  "previewRoutineWorkflowAccess",
12610
13540
  "previewSchedule",
12611
13541
  "previewTTS",
12612
13542
  "previewTemplate",
12613
13543
  "previewThinkingSound",
12614
13544
  "previewWorkspaceImport",
13545
+ "previewWorkspaceImportZip",
12615
13546
  "provisionClientWorkspace",
12616
13547
  "publishWorkflowRevision",
13548
+ "putJourneyV2Definition",
12617
13549
  "rateMessage",
12618
13550
  "getChatFeedback",
12619
13551
  "reenrollMember",
@@ -12634,6 +13566,7 @@ var WORKSPACE_METHOD_NAMES = [
12634
13566
  "resetRoutineRuns",
12635
13567
  "resolveAccessGrant",
12636
13568
  "resolveAnonymousMember",
13569
+ "resolveInterventionRequest",
12637
13570
  "restoreFileVersion",
12638
13571
  "revokeAccessGrant",
12639
13572
  "revokeApiKey",
@@ -12674,6 +13607,7 @@ var WORKSPACE_METHOD_NAMES = [
12674
13607
  "unarchiveChat",
12675
13608
  "unarchiveDataType",
12676
13609
  "unarchiveMember",
13610
+ "unarchivePersona",
12677
13611
  "unarchiveStep",
12678
13612
  "unarchiveTask",
12679
13613
  "unarchiveWorkflow",
@@ -12762,6 +13696,7 @@ var WORKSPACE_METHOD_NAMES = [
12762
13696
  "uploadFile",
12763
13697
  "updateVoicemailStatus",
12764
13698
  "updateWorkflow",
13699
+ "convertWorkflowStartTaskOpeningMessage",
12765
13700
  "updateWorkflowContributor",
12766
13701
  "updateWorkflowNote",
12767
13702
  "updateWorkflowRevisionMetadata",
@@ -12808,6 +13743,13 @@ function bindAccessGrantsMethods(target, accessGrants) {
12808
13743
  target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
12809
13744
  }
12810
13745
 
13746
+ // src/client/bindings/intervention-requests.ts
13747
+ function bindInterventionRequestsMethods(target, interventionRequests) {
13748
+ target.getAgentModeAttention = interventionRequests.getAgentModeAttention.bind(interventionRequests);
13749
+ target.getInterventionRequests = interventionRequests.getInterventionRequests.bind(interventionRequests);
13750
+ target.resolveInterventionRequest = interventionRequests.resolveInterventionRequest.bind(interventionRequests);
13751
+ }
13752
+
12811
13753
  // src/client/bindings/agent-tasks.ts
12812
13754
  function bindAgentTasksMethods(target, api) {
12813
13755
  target.getAgentTasks = api.getAgentTasks.bind(api);
@@ -12848,10 +13790,15 @@ function bindTasksMethods(target, tasks, abilities) {
12848
13790
 
12849
13791
  // src/client/bindings/chats.ts
12850
13792
  function bindChatsMethods(target, chats) {
13793
+ target.createChatInteractionSession = chats.createChatInteractionSession.bind(chats);
13794
+ target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
12851
13795
  target.getChats = chats.getChats.bind(chats);
12852
13796
  target.getChat = chats.getChat.bind(chats);
13797
+ target.getChatBrowserLiveView = chats.getChatBrowserLiveView.bind(chats);
13798
+ target.getChatMachineResources = chats.getChatMachineResources.bind(chats);
12853
13799
  target.getCurrentSmsChat = chats.getCurrentSmsChat.bind(chats);
12854
13800
  target.getChatCallbacks = chats.getChatCallbacks.bind(chats);
13801
+ target.getChatEhrWritebackOutcomes = chats.getChatEhrWritebackOutcomes.bind(chats);
12855
13802
  target.cancelChatCallback = chats.cancelChatCallback.bind(chats);
12856
13803
  target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
12857
13804
  target.getChatTodos = chats.getChatTodos.bind(chats);
@@ -12904,8 +13851,6 @@ function bindChatsMethods(target, chats) {
12904
13851
  // src/client/bindings/calls.ts
12905
13852
  function bindCallsMethods(target, calls, cel) {
12906
13853
  target.getPhoneCalls = calls.getPhoneCalls.bind(calls);
12907
- target.initiateCall = calls.initiateCall.bind(calls);
12908
- target.getVoiceToken = calls.getVoiceToken.bind(calls);
12909
13854
  target.getMessageTiming = calls.getMessageTiming.bind(calls);
12910
13855
  target.getRecordingInfo = calls.getRecordingInfo.bind(calls);
12911
13856
  target.listChatRecordings = calls.listChatRecordings.bind(calls);
@@ -12926,9 +13871,25 @@ function bindDashboardsMethods(target, dashboards) {
12926
13871
  target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
12927
13872
  }
12928
13873
 
12929
- // src/client/bindings/activity-timeline.ts
12930
- function bindActivityTimelineMethods(target, activityTimeline) {
12931
- target.queryActivityTimeline = activityTimeline.queryActivityTimeline.bind(activityTimeline);
13874
+ // src/client/bindings/activity.ts
13875
+ function bindActivityMethods(target, activity) {
13876
+ target.queryActivity = activity.queryActivity.bind(activity);
13877
+ target.queryActivityLatestSubjects = activity.queryActivityLatestSubjects.bind(activity);
13878
+ target.queryActivityOpenItems = activity.queryActivityOpenItems.bind(activity);
13879
+ target.queryActivityOneView = activity.queryActivityOneView.bind(activity);
13880
+ target.getActivityCounts = activity.getActivityCounts.bind(activity);
13881
+ target.getActivityCapabilities = activity.getActivityCapabilities.bind(activity);
13882
+ target.queryOrgActivity = activity.queryOrgActivity.bind(activity);
13883
+ target.queryOrgActivityLatestSubjects = activity.queryOrgActivityLatestSubjects.bind(activity);
13884
+ target.queryOrgActivityOpenItems = activity.queryOrgActivityOpenItems.bind(activity);
13885
+ target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
13886
+ target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
13887
+ target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
13888
+ target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
13889
+ target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
13890
+ target.queryWorkspaceActivityOneView = activity.queryWorkspaceActivityOneView.bind(activity);
13891
+ target.getWorkspaceActivityCounts = activity.getWorkspaceActivityCounts.bind(activity);
13892
+ target.resolveEntityRefs = activity.resolveEntityRefs.bind(activity);
12932
13893
  }
12933
13894
 
12934
13895
  // src/client/bindings/motd.ts
@@ -12950,6 +13911,10 @@ function bindTrackedLinksMethods(target, trackedLinks) {
12950
13911
 
12951
13912
  // src/client/bindings/data-types.ts
12952
13913
  function bindDataTypesMethods(target, dataTypes) {
13914
+ target.getDataTypeDraft = dataTypes.getDataTypeDraft.bind(dataTypes);
13915
+ target.saveDataTypeDraft = dataTypes.saveDataTypeDraft.bind(dataTypes);
13916
+ target.publishDataTypeDraft = dataTypes.publishDataTypeDraft.bind(dataTypes);
13917
+ target.getDataTypeVersions = dataTypes.getDataTypeVersions.bind(dataTypes);
12953
13918
  target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
12954
13919
  target.getDataType = dataTypes.getDataType.bind(dataTypes);
12955
13920
  target.getDataTypeByUuid = dataTypes.getDataTypeByUuid.bind(dataTypes);
@@ -13035,6 +14000,8 @@ function bindMembersMethods(target, members) {
13035
14000
  target.createMemberRole = members.createMemberRole.bind(members);
13036
14001
  target.updateMemberRole = members.updateMemberRole.bind(members);
13037
14002
  target.deleteMemberRole = members.deleteMemberRole.bind(members);
14003
+ target.getMemberRoleCleanupPlan = members.getMemberRoleCleanupPlan.bind(members);
14004
+ target.mergeMemberRoles = members.mergeMemberRoles.bind(members);
13038
14005
  target.getMemberFields = members.getMemberFields.bind(members);
13039
14006
  target.getMemberFieldDefinitions = members.getMemberFieldDefinitions.bind(members);
13040
14007
  target.createMemberField = members.createMemberField.bind(members);
@@ -13052,11 +14019,15 @@ function bindMembersMethods(target, members) {
13052
14019
  target.createMemberMemory = members.createMemberMemory.bind(members);
13053
14020
  target.deleteMemberMemory = members.deleteMemberMemory.bind(members);
13054
14021
  target.getMemberSyncLinks = members.getMemberSyncLinks.bind(members);
14022
+ target.getMemberRelationships = members.getMemberRelationships.bind(members);
14023
+ target.createMemberRelationship = members.createMemberRelationship.bind(members);
14024
+ target.archiveMemberRelationship = members.archiveMemberRelationship.bind(members);
13055
14025
  }
13056
14026
 
13057
14027
  // src/client/bindings/workspaces.ts
13058
14028
  function bindWorkspacesMethods(target, workspaces, signupRequests) {
13059
14029
  target.getWorkspaces = workspaces.getWorkspaces.bind(workspaces);
14030
+ target.getDeviceAdmissibleWorkspaces = workspaces.getDeviceAdmissibleWorkspaces.bind(workspaces);
13060
14031
  target.getPublicWorkspaces = workspaces.getPublicWorkspaces.bind(workspaces);
13061
14032
  target.getWorkspace = workspaces.getWorkspace.bind(workspaces);
13062
14033
  target.createWorkspace = workspaces.createWorkspace.bind(workspaces);
@@ -13087,6 +14058,8 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
13087
14058
  target.getProduct = workspaces.getProduct.bind(workspaces);
13088
14059
  target.getWorkspaceProduct = workspaces.getWorkspaceProduct.bind(workspaces);
13089
14060
  target.getPublicProducts = workspaces.getPublicProducts.bind(workspaces);
14061
+ target.previewPromoCode = workspaces.previewPromoCode.bind(workspaces);
14062
+ target.startPromoPlanTrial = workspaces.startPromoPlanTrial.bind(workspaces);
13090
14063
  target.getPublicProduct = workspaces.getPublicProduct.bind(workspaces);
13091
14064
  target.createProduct = workspaces.createProduct.bind(workspaces);
13092
14065
  target.updateProduct = workspaces.updateProduct.bind(workspaces);
@@ -13094,7 +14067,12 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
13094
14067
  target.exportWorkspace = workspaces.exportWorkspace.bind(workspaces);
13095
14068
  target.exportWorkspaceZip = workspaces.exportWorkspaceZip.bind(workspaces);
13096
14069
  target.previewWorkspaceImport = workspaces.previewWorkspaceImport.bind(workspaces);
14070
+ target.previewWorkspaceImportZip = workspaces.previewWorkspaceImportZip.bind(workspaces);
13097
14071
  target.importWorkspace = workspaces.importWorkspace.bind(workspaces);
14072
+ target.importWorkspaceZip = workspaces.importWorkspaceZip.bind(workspaces);
14073
+ target.getImportSkippedRules = workspaces.getImportSkippedRules.bind(workspaces);
14074
+ target.getImportReadiness = workspaces.getImportReadiness.bind(workspaces);
14075
+ target.rebuildImportSkippedRules = workspaces.rebuildImportSkippedRules.bind(workspaces);
13098
14076
  target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
13099
14077
  target.getWorkspaceThemes = workspaces.getWorkspaceThemes.bind(workspaces);
13100
14078
  target.updateWorkspaceThemes = workspaces.updateWorkspaceThemes.bind(workspaces);
@@ -13302,9 +14280,11 @@ function bindEventsMethods(target, events) {
13302
14280
  target.updateRoutine = events.updateRoutine.bind(events);
13303
14281
  target.deleteRoutine = events.deleteRoutine.bind(events);
13304
14282
  target.runRoutine = events.runRoutine.bind(events);
14283
+ target.getRoutineConfigEvents = events.getRoutineConfigEvents.bind(events);
13305
14284
  target.getRoutineRuns = events.getRoutineRuns.bind(events);
13306
14285
  target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
13307
14286
  target.previewSchedule = events.previewSchedule.bind(events);
14287
+ target.previewRoutineVoiceReadiness = events.previewRoutineVoiceReadiness.bind(events);
13308
14288
  target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
13309
14289
  }
13310
14290
 
@@ -13329,6 +14309,8 @@ function bindExperimentsMethods(target, experiments) {
13329
14309
  function bindWorkflowsMethods(target, workflows, workflowNotes, voice, supervisors) {
13330
14310
  target.getWorkflows = workflows.getWorkflows.bind(workflows);
13331
14311
  target.getWorkflow = workflows.getWorkflow.bind(workflows);
14312
+ target.getWorkflowOpeningTurnConversionReport = workflows.getWorkflowOpeningTurnConversionReport.bind(workflows);
14313
+ target.convertWorkflowStartTaskOpeningMessage = workflows.convertWorkflowStartTaskOpeningMessage.bind(workflows);
13332
14314
  target.getWorkflowActivity = workflows.getWorkflowActivity.bind(workflows);
13333
14315
  target.getWorkflowsActivityBatch = workflows.getWorkflowsActivityBatch.bind(workflows);
13334
14316
  target.getWorkflowDiagram = workflows.getWorkflowDiagram.bind(workflows);
@@ -13749,7 +14731,6 @@ function bindOperatorMethods(target, operatorGroups) {
13749
14731
  target.removeGroupMember = operatorGroups.removeGroupMember.bind(operatorGroups);
13750
14732
  target.getLiveOperators = operatorGroups.getLiveOperators.bind(operatorGroups);
13751
14733
  target.getPresenceStatus = operatorGroups.getPresenceStatus.bind(operatorGroups);
13752
- target.disconnectPresence = operatorGroups.disconnectPresence.bind(operatorGroups);
13753
14734
  target.getOperatorChatMessages = operatorGroups.getOperatorChatMessages.bind(operatorGroups);
13754
14735
  target.sendOperatorMessage = operatorGroups.sendOperatorMessage.bind(operatorGroups);
13755
14736
  }
@@ -13777,6 +14758,8 @@ function bindOrgMethods(target, org) {
13777
14758
  target.listLegalEntities = org.listLegalEntities.bind(org);
13778
14759
  target.getLegalEntity = org.getLegalEntity.bind(org);
13779
14760
  target.createLegalEntity = org.createLegalEntity.bind(org);
14761
+ target.getRegistrationDraft = org.getRegistrationDraft.bind(org);
14762
+ target.saveRegistrationDraft = org.saveRegistrationDraft.bind(org);
13780
14763
  target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
13781
14764
  target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
13782
14765
  target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
@@ -13808,6 +14791,9 @@ function bindJourneysMethods(target, journeys) {
13808
14791
  target.getJourneys = journeys.getJourneys.bind(journeys);
13809
14792
  target.getJourney = journeys.getJourney.bind(journeys);
13810
14793
  target.getJourneyAuthoring = journeys.getJourneyAuthoring.bind(journeys);
14794
+ target.putJourneyV2Definition = journeys.putJourneyV2Definition.bind(journeys);
14795
+ target.getJourneyV2Validation = journeys.getJourneyV2Validation.bind(journeys);
14796
+ target.getJourneyFilterOptions = journeys.getJourneyFilterOptions.bind(journeys);
13811
14797
  target.getJourneyHealth = journeys.getJourneyHealth.bind(journeys);
13812
14798
  target.createJourney = journeys.createJourney.bind(journeys);
13813
14799
  target.updateJourney = journeys.updateJourney.bind(journeys);
@@ -13863,6 +14849,8 @@ function bindPersonasMethods(target, personas) {
13863
14849
  target.getPersona = personas.getPersona.bind(personas);
13864
14850
  target.createPersona = personas.createPersona.bind(personas);
13865
14851
  target.updatePersona = personas.updatePersona.bind(personas);
14852
+ target.archivePersona = personas.archivePersona.bind(personas);
14853
+ target.unarchivePersona = personas.unarchivePersona.bind(personas);
13866
14854
  target.deletePersona = personas.deletePersona.bind(personas);
13867
14855
  }
13868
14856
 
@@ -13962,8 +14950,11 @@ var GravityRailClient = class {
13962
14950
  // Chats API
13963
14951
  getChats;
13964
14952
  getChat;
14953
+ getChatBrowserLiveView;
14954
+ getChatMachineResources;
13965
14955
  getCurrentSmsChat;
13966
14956
  getChatCallbacks;
14957
+ getChatEhrWritebackOutcomes;
13967
14958
  cancelChatCallback;
13968
14959
  getChatTokenUsage;
13969
14960
  getChatTodos;
@@ -13975,6 +14966,8 @@ var GravityRailClient = class {
13975
14966
  archiveChat;
13976
14967
  unarchiveChat;
13977
14968
  createChat;
14969
+ createChatInteractionSession;
14970
+ transitionChatInteractionSession;
13978
14971
  createWorkflowOutboundVoiceChat;
13979
14972
  deleteChat;
13980
14973
  updateChat;
@@ -14013,8 +15006,6 @@ var GravityRailClient = class {
14013
15006
  getChatFilterCount;
14014
15007
  // Calls API
14015
15008
  getPhoneCalls;
14016
- initiateCall;
14017
- getVoiceToken;
14018
15009
  getMessageTiming;
14019
15010
  getRecordingInfo;
14020
15011
  listChatRecordings;
@@ -14023,6 +15014,10 @@ var GravityRailClient = class {
14023
15014
  validateCelExpression;
14024
15015
  // Data Types API
14025
15016
  getDataTypes;
15017
+ getDataTypeDraft;
15018
+ saveDataTypeDraft;
15019
+ publishDataTypeDraft;
15020
+ getDataTypeVersions;
14026
15021
  getDataType;
14027
15022
  getDataTypeByUuid;
14028
15023
  getDataTypeBySlug;
@@ -14118,6 +15113,10 @@ var GravityRailClient = class {
14118
15113
  deleteMemberMemory;
14119
15114
  // Member Sync Links
14120
15115
  getMemberSyncLinks;
15116
+ // Member Relationships
15117
+ getMemberRelationships;
15118
+ createMemberRelationship;
15119
+ archiveMemberRelationship;
14121
15120
  // Agent Tasks API (operator-facing async sub-agent inspection/cancel)
14122
15121
  getAgentTasks;
14123
15122
  getAgentTask;
@@ -14155,6 +15154,8 @@ var GravityRailClient = class {
14155
15154
  getPersona;
14156
15155
  createPersona;
14157
15156
  updatePersona;
15157
+ archivePersona;
15158
+ unarchivePersona;
14158
15159
  deletePersona;
14159
15160
  // Metrics API (customer-defined outcome metrics)
14160
15161
  listMetrics;
@@ -14174,8 +15175,26 @@ var GravityRailClient = class {
14174
15175
  getDashboardChannelStats;
14175
15176
  getDashboardWorkflowAssignmentStats;
14176
15177
  getConfigurationHealth;
14177
- // Activity Timeline API
14178
- queryActivityTimeline;
15178
+ // Activity Spine serving API — one query shape, three mounts
15179
+ // (docs/projects/active/activity-spine.md).
15180
+ queryActivity;
15181
+ queryActivityLatestSubjects;
15182
+ queryActivityOpenItems;
15183
+ queryActivityOneView;
15184
+ getActivityCounts;
15185
+ getActivityCapabilities;
15186
+ queryOrgActivity;
15187
+ queryOrgActivityLatestSubjects;
15188
+ queryOrgActivityOpenItems;
15189
+ queryOrgActivityOneView;
15190
+ getOrgActivityCounts;
15191
+ queryWorkspaceActivity;
15192
+ queryWorkspaceActivityLatestSubjects;
15193
+ queryWorkspaceActivityOpenItems;
15194
+ queryWorkspaceActivityOneView;
15195
+ getWorkspaceActivityCounts;
15196
+ // Hydration: typed refs in, display summaries out, one round trip.
15197
+ resolveEntityRefs;
14179
15198
  // MOTD API
14180
15199
  getMotd;
14181
15200
  // Tracked Links analytics (#10934)
@@ -14191,6 +15210,9 @@ var GravityRailClient = class {
14191
15210
  getJourneys;
14192
15211
  getJourney;
14193
15212
  getJourneyAuthoring;
15213
+ putJourneyV2Definition;
15214
+ getJourneyV2Validation;
15215
+ getJourneyFilterOptions;
14194
15216
  getJourneyHealth;
14195
15217
  createJourney;
14196
15218
  updateJourney;
@@ -14245,7 +15267,6 @@ var GravityRailClient = class {
14245
15267
  removeGroupMember;
14246
15268
  getLiveOperators;
14247
15269
  getPresenceStatus;
14248
- disconnectPresence;
14249
15270
  getOperatorChatMessages;
14250
15271
  sendOperatorMessage;
14251
15272
  // Access Grants API
@@ -14258,10 +15279,15 @@ var GravityRailClient = class {
14258
15279
  getAccessGrants;
14259
15280
  getMemberGrants;
14260
15281
  getGranteeGrants;
15282
+ // Intervention Requests API
15283
+ getAgentModeAttention;
15284
+ getInterventionRequests;
15285
+ resolveInterventionRequest;
14261
15286
  // Prompts API
14262
15287
  inspectPrompt;
14263
15288
  // Workspaces API
14264
15289
  getWorkspaces;
15290
+ getDeviceAdmissibleWorkspaces;
14265
15291
  getPublicWorkspaces;
14266
15292
  getWorkspace;
14267
15293
  createWorkspace;
@@ -14301,7 +15327,12 @@ var GravityRailClient = class {
14301
15327
  exportWorkspace;
14302
15328
  exportWorkspaceZip;
14303
15329
  previewWorkspaceImport;
15330
+ previewWorkspaceImportZip;
14304
15331
  importWorkspace;
15332
+ importWorkspaceZip;
15333
+ getImportSkippedRules;
15334
+ getImportReadiness;
15335
+ rebuildImportSkippedRules;
14305
15336
  previewImportWorkspace;
14306
15337
  getWorkspaceThemes;
14307
15338
  updateWorkspaceThemes;
@@ -14336,6 +15367,8 @@ var GravityRailClient = class {
14336
15367
  listLegalEntities;
14337
15368
  getLegalEntity;
14338
15369
  createLegalEntity;
15370
+ getRegistrationDraft;
15371
+ saveRegistrationDraft;
14339
15372
  getVoiceTrustProducts;
14340
15373
  syncVoiceTrustProducts;
14341
15374
  createOrganizationWorkspace;
@@ -14527,10 +15560,13 @@ var GravityRailClient = class {
14527
15560
  getRoutineRuns;
14528
15561
  resetRoutineRuns;
14529
15562
  previewSchedule;
15563
+ previewRoutineVoiceReadiness;
14530
15564
  previewRoutineWorkflowAccess;
14531
15565
  // Workflows API
14532
15566
  getWorkflows;
14533
15567
  getWorkflow;
15568
+ getWorkflowOpeningTurnConversionReport;
15569
+ convertWorkflowStartTaskOpeningMessage;
14534
15570
  getWorkflowActivity;
14535
15571
  getWorkflowsActivityBatch;
14536
15572
  getWorkflowDiagram;
@@ -15006,7 +16042,7 @@ var GravityRailClient = class {
15006
16042
  bindMetricsMethods(this, apis.metrics);
15007
16043
  bindQueriesMethods(this, apis.queries);
15008
16044
  bindDashboardsMethods(this, apis.dashboards);
15009
- bindActivityTimelineMethods(this, apis.activityTimeline);
16045
+ bindActivityMethods(this, apis.activity);
15010
16046
  bindMotdMethods(this, apis.motd);
15011
16047
  bindTrackedLinksMethods(this, apis.trackedLinks);
15012
16048
  bindJourneysMethods(this, apis.journeys);
@@ -15014,6 +16050,7 @@ var GravityRailClient = class {
15014
16050
  bindOperatorMethods(this, apis.operatorGroups);
15015
16051
  bindOrgMethods(this, apis.org);
15016
16052
  bindAccessGrantsMethods(this, apis.accessGrants);
16053
+ bindInterventionRequestsMethods(this, apis.interventionRequests);
15017
16054
  bindPromptsMethods(this, apis.prompts);
15018
16055
  bindWorkspacesMethods(this, apis.workspaces, apis.workspaceInvitations);
15019
16056
  bindAuthMethods(this, apis.auth, apis.assignments);
@@ -15166,6 +16203,50 @@ var GravityRailClient = class {
15166
16203
  return void 0;
15167
16204
  }
15168
16205
  };
16206
+
16207
+ // src/helpers/chat-interaction.ts
16208
+ var ChatInteractionController = class {
16209
+ constructor(api, workspaceId, chatId) {
16210
+ this.api = api;
16211
+ this.workspaceId = workspaceId;
16212
+ this.chatId = chatId;
16213
+ }
16214
+ api;
16215
+ workspaceId;
16216
+ chatId;
16217
+ current;
16218
+ pending;
16219
+ tail = Promise.resolve();
16220
+ clientSessionId = crypto.randomUUID();
16221
+ /** Serialize switches and reuse request IDs when a response is lost. */
16222
+ ensure(mode) {
16223
+ const operation = this.tail.then(async () => {
16224
+ if (this.pending) await this.applyPending();
16225
+ if (this.current?.mode !== mode) {
16226
+ this.pending = { mode, requestId: crypto.randomUUID() };
16227
+ await this.applyPending();
16228
+ }
16229
+ if (!this.current) throw new Error("Interaction session unavailable");
16230
+ return this.current;
16231
+ });
16232
+ this.tail = operation.catch(() => void 0);
16233
+ return operation;
16234
+ }
16235
+ async applyPending() {
16236
+ const pending = this.pending;
16237
+ if (!pending) return;
16238
+ this.current = this.current ? await this.api.transitionChatInteractionSession(
16239
+ this.workspaceId,
16240
+ this.chatId,
16241
+ this.current.id,
16242
+ pending
16243
+ ) : await this.api.createChatInteractionSession(this.workspaceId, this.chatId, {
16244
+ ...pending,
16245
+ clientSessionId: this.clientSessionId
16246
+ });
16247
+ this.pending = void 0;
16248
+ }
16249
+ };
15169
16250
  // Annotate the CommonJS export names for ESM import in node:
15170
16251
  0 && (module.exports = {
15171
16252
  AGENT_NOTE_ORIGINS,
@@ -15179,18 +16260,12 @@ var GravityRailClient = class {
15179
16260
  AccessGrantTrigger,
15180
16261
  AccessGrantsApi,
15181
16262
  AccessLevel,
15182
- ActivityActorKind,
15183
- ActivityAggregationKind,
15184
- ActivityCaptureState,
15185
- ActivityConfigAction,
15186
- ActivityConfigArea,
15187
- ActivityCoverageLimitation,
15188
- ActivityDirection,
15189
- ActivityEmptyReason,
15190
- ActivityEventType,
15191
- ActivityEventTypePreset,
15192
- ActivityGoalImpact,
15193
- ActivityTimelineProjection,
16263
+ ActivityEventFamily,
16264
+ ActivityGrain,
16265
+ ActivityGroupBy,
16266
+ ActivityOpenItemOrder,
16267
+ ActivityOutcome,
16268
+ ActivityWindowBasis,
15194
16269
  AddonMutationResponseScope,
15195
16270
  AgentTasksApi,
15196
16271
  AgentsApi,
@@ -15219,6 +16294,10 @@ var GravityRailClient = class {
15219
16294
  CalendarsApi,
15220
16295
  CallsApi,
15221
16296
  CapabilityClass,
16297
+ ChannelMessageDirection,
16298
+ ChannelMessageSource,
16299
+ ChannelMessagesUnavailableReason,
16300
+ ChatInteractionController,
15222
16301
  ChatsApi,
15223
16302
  ConfluenceApi,
15224
16303
  ConnectionSyncApi,
@@ -15233,6 +16312,9 @@ var GravityRailClient = class {
15233
16312
  CustomerActivitySeverity,
15234
16313
  CustomerActivitySlaThresholdSource,
15235
16314
  CustomersApi,
16315
+ DEFAULT_AGENT_CHAT_MODEL,
16316
+ DEFAULT_AGENT_REALTIME_MODEL,
16317
+ DEFAULT_AGENT_REALTIME_MODEL_CONFIG,
15236
16318
  DEFAULT_CHAT_MODEL,
15237
16319
  DEFAULT_CUSTOM_VOICE_MODEL,
15238
16320
  DEFAULT_THINKING_SPEECH_PHRASES,
@@ -15246,6 +16328,7 @@ var GravityRailClient = class {
15246
16328
  DeclaredDataUse,
15247
16329
  DiscordBotsApi,
15248
16330
  DriverMode,
16331
+ EhrWritebackOutcomeResponseStatus,
15249
16332
  EmailDnsRecordType,
15250
16333
  EventRuleActionType,
15251
16334
  EventRuleEventType,
@@ -15259,10 +16342,16 @@ var GravityRailClient = class {
15259
16342
  FhirConnectionsApi,
15260
16343
  FhirVendor,
15261
16344
  FilesApi,
15262
- FormValueDisposition,
15263
16345
  GravityRailClient,
15264
16346
  HealthieApi,
15265
16347
  HubspotApi,
16348
+ ImportReadinessIssueCode,
16349
+ ImportReadinessIssueResourceType,
16350
+ ImportSkippedRuleResourceGroupResourceType,
16351
+ ImportSkippedRuleResponseNeededResourceTypesItem,
16352
+ ImportSkippedRuleResponseParentKind,
16353
+ ImportSkippedRuleResponseReasonCode,
16354
+ ImportSkippedRuleResponseStatus,
15266
16355
  InboxesApi,
15267
16356
  IndexStatus,
15268
16357
  InquiriesApi,
@@ -15271,12 +16360,14 @@ var GravityRailClient = class {
15271
16360
  JourneysApi,
15272
16361
  MASKED_SECRET_SENTINEL,
15273
16362
  MEMBER_ENTITLEMENT_STATUSES,
16363
+ MEMBER_RELATIONSHIP_KINDS,
15274
16364
  MEMBER_SUBSCRIPTION_STATUSES,
15275
16365
  McpServerState,
15276
16366
  McpServersApi,
15277
16367
  MemberFeature,
15278
16368
  MemberImportMatchInfoMatchType,
15279
16369
  MemberImportPreviewRowAction,
16370
+ MemberRelationshipKind,
15280
16371
  MemberType,
15281
16372
  MembersApi,
15282
16373
  MenuItemResponseItemType,
@@ -15336,8 +16427,11 @@ var GravityRailClient = class {
15336
16427
  REALTIME_MODEL_OPENAI,
15337
16428
  REALTIME_MODEL_OPENAI_2,
15338
16429
  REALTIME_MODEL_OPENAI_MINI,
16430
+ RefResolutionStatus,
15339
16431
  Region,
15340
16432
  RegistrationIdentifier,
16433
+ RelatedMemberRole,
16434
+ RelationshipCardinality,
15341
16435
  ReportsApi,
15342
16436
  ResellersApi,
15343
16437
  Resource,
@@ -15369,8 +16463,13 @@ var GravityRailClient = class {
15369
16463
  TTS_PREVIEW_PROVIDERS,
15370
16464
  TasksApi,
15371
16465
  TemplatesApi,
16466
+ TestChatRunLane,
16467
+ TestChatRunOutcome,
15372
16468
  ToolkitState,
15373
16469
  ToolkitsApi,
16470
+ UiPromptPresentedKindValues,
16471
+ UiPromptResponseKindValues,
16472
+ UiPromptResponseStatusValues,
15374
16473
  VoiceApi,
15375
16474
  WIDGET_SLUGS,
15376
16475
  WORKFLOW_IMPLICIT_USE_SCOPE,
@@ -15387,7 +16486,7 @@ var GravityRailClient = class {
15387
16486
  areDependenciesSatisfied,
15388
16487
  asIdentifiedMemberContactConflict,
15389
16488
  bindAccessGrantsMethods,
15390
- bindActivityTimelineMethods,
16489
+ bindActivityMethods,
15391
16490
  bindAgentTasksMethods,
15392
16491
  bindAgentsMethods,
15393
16492
  bindAppsMethods,
@@ -15405,6 +16504,7 @@ var GravityRailClient = class {
15405
16504
  bindExperimentsMethods,
15406
16505
  bindFilesMethods,
15407
16506
  bindIntegrationsMethods,
16507
+ bindInterventionRequestsMethods,
15408
16508
  bindJourneysMethods,
15409
16509
  bindMembersMethods,
15410
16510
  bindMetricsMethods,