@gravity-rail/sdk 0.21.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-B0eh2BEY.d.cts → chat-interaction-BKdImgZ5.d.ts} +8006 -3570
  7. package/dist/{client-CFz-BGmY.d.ts → chat-interaction-DLfC_h_P.d.cts} +8006 -3570
  8. package/dist/{chunk-3HAV5XUJ.js → chunk-HRUMZ46V.js} +1 -1
  9. package/dist/chunk-HRUMZ46V.js.map +1 -0
  10. package/dist/{chunk-24L4RD4Z.js → chunk-N446FGCT.js} +1247 -203
  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 +2302 -144
  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 +1337 -222
  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-fJ9PM15N.d.cts → revision-state-Bsq5dKwi.d.cts} +236 -5
  39. package/dist/{revision-state-KfOztBkY.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-24L4RD4Z.js.map +0 -1
  52. package/dist/chunk-3HAV5XUJ.js.map +0 -1
  53. package/dist/chunk-7OLBLLV7.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"
1031
- };
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"
1284
+ var UiPromptResponseKind = {
1285
+ render_ui: "render_ui",
1286
+ present_choice_list: "present_choice_list",
1287
+ inline_connect: "inline_connect"
1038
1288
  };
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
  }
@@ -6585,10 +7028,18 @@ var InboxesApi = class extends BaseApiClient {
6585
7028
  });
6586
7029
  }
6587
7030
  /** Reply to an email from the inbox. */
6588
- async replyToEmail(wid, inboxId, emailId, content) {
7031
+ async replyToEmail(wid, inboxId, emailId, content, htmlContent) {
7032
+ const body = { content, htmlContent };
6589
7033
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply`, {
6590
7034
  method: "POST",
6591
- body: JSON.stringify({ content })
7035
+ body: JSON.stringify(body)
7036
+ });
7037
+ }
7038
+ /** Compose and send a new email from an inbox. */
7039
+ async sendInboxEmail(wid, inboxId, body) {
7040
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails`, {
7041
+ method: "POST",
7042
+ body: JSON.stringify(body)
6592
7043
  });
6593
7044
  }
6594
7045
  /**
@@ -7243,17 +7694,11 @@ var MembersApi = class extends BaseApiClient {
7243
7694
  * operator can decide whether to skip or explicitly overwrite before
7244
7695
  * committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
7245
7696
  */
7246
- async previewImportMembers(wid, file, newMemberRoleId, options) {
7697
+ async previewImportMembers(wid, file, newMemberRoleId) {
7247
7698
  const formData = new FormData();
7248
7699
  formData.append("file", file);
7249
7700
  const params = new URLSearchParams();
7250
7701
  params.append("new_member_role_id", newMemberRoleId.toString());
7251
- if (options?.trustEmailAddresses) {
7252
- params.append("trust_email_addresses", "true");
7253
- }
7254
- if (options?.trustPhoneNumbers) {
7255
- params.append("trust_phone_numbers", "true");
7256
- }
7257
7702
  const response = await this.fetchRaw(
7258
7703
  `w/${wid}/members/import/preview?${params.toString()}`,
7259
7704
  {
@@ -7280,12 +7725,6 @@ var MembersApi = class extends BaseApiClient {
7280
7725
  formData.append("file", file);
7281
7726
  const params = new URLSearchParams();
7282
7727
  params.append("new_member_role_id", newMemberRoleId.toString());
7283
- if (options?.trustEmailAddresses) {
7284
- params.append("trust_email_addresses", "true");
7285
- }
7286
- if (options?.trustPhoneNumbers) {
7287
- params.append("trust_phone_numbers", "true");
7288
- }
7289
7728
  if (options?.identityConflictPolicy) {
7290
7729
  params.append("identity_conflict_policy", options.identityConflictPolicy);
7291
7730
  }
@@ -7534,13 +7973,179 @@ var MembersApi = class extends BaseApiClient {
7534
7973
  async getMemberSyncLinks(wid, memberId) {
7535
7974
  return this.fetch(`w/${wid}/members/${memberId}/sync-links`);
7536
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
+ }
7537
7998
  };
7538
7999
 
7539
- // src/api/activity-timeline.ts
7540
- var ActivityTimelineApi = class extends BaseApiClient {
7541
- /** One page of activity. Omit `cursor` for a fresh snapshot. */
7542
- async queryActivityTimeline(wid, request = {}) {
7543
- 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`, {
7544
8149
  method: "POST",
7545
8150
  body: JSON.stringify(request)
7546
8151
  });
@@ -7734,6 +8339,10 @@ var MondayIntegrationApi = class extends BaseApiClient {
7734
8339
 
7735
8340
  // src/api/intervention-requests.ts
7736
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
+ }
7737
8346
  /** List intervention requests in a workspace, newest first. */
7738
8347
  async getInterventionRequests(wid, params = {}) {
7739
8348
  const query = new URLSearchParams();
@@ -7747,6 +8356,23 @@ var InterventionRequestsApi = class extends BaseApiClient {
7747
8356
  `w/${wid}/intervention-requests${qs ? `?${qs}` : ""}`
7748
8357
  );
7749
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
+ }
7750
8376
  };
7751
8377
 
7752
8378
  // src/api/notification-rules.ts
@@ -7828,12 +8454,6 @@ var OperatorApi = class extends BaseApiClient {
7828
8454
  async getPresenceStatus(wid) {
7829
8455
  return this.fetch(`w/${wid}/presence/me`);
7830
8456
  }
7831
- /** Disconnect the current member's presence session. */
7832
- async disconnectPresence(wid) {
7833
- return this.fetch(`w/${wid}/presence/disconnect-self`, {
7834
- method: "POST"
7835
- });
7836
- }
7837
8457
  // Operator chat message methods
7838
8458
  /** Get paginated chat messages for an operator chat. */
7839
8459
  async getOperatorChatMessages(wid, chatId, limit = 50, offset = 0) {
@@ -8403,6 +9023,28 @@ var OrgApi = class extends BaseApiClient {
8403
9023
  async getLegalEntity(orgUuid, legalEntityUuid) {
8404
9024
  return this.fetch(`o/${orgUuid}/legal-entities/${legalEntityUuid}`);
8405
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
+ }
8406
9048
  /** Cached voice trust product state (CNAM / SHAKEN-STIR / Voice Integrity) for one legal entity. */
8407
9049
  async getVoiceTrustProducts(orgUuid, legalEntityUuid) {
8408
9050
  return this.fetch(
@@ -8576,6 +9218,42 @@ var OrgApi = class extends BaseApiClient {
8576
9218
  }
8577
9219
  );
8578
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
+ }
8579
9257
  };
8580
9258
  function businessProfilePath(orgUuid, legalEntityUuid) {
8581
9259
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -8996,6 +9674,8 @@ var PersonasApi = class extends BaseApiClient {
8996
9674
  const q = new URLSearchParams();
8997
9675
  if (params?.page !== void 0) q.set("page", String(params.page));
8998
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));
8999
9679
  const qs = q.toString() ? `?${q.toString()}` : "";
9000
9680
  return this.fetch(`w/${wid}/personas${qs}`);
9001
9681
  }
@@ -9014,6 +9694,18 @@ var PersonasApi = class extends BaseApiClient {
9014
9694
  body: JSON.stringify(data)
9015
9695
  });
9016
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
+ }
9017
9709
  async deletePersona(wid, id) {
9018
9710
  return this.fetch(`w/${wid}/personas/${id}`, { method: "DELETE" });
9019
9711
  }
@@ -10715,6 +11407,59 @@ var JourneysApi = class extends BaseApiClient {
10715
11407
  async getJourneyAuthoring(wid, journeyId) {
10716
11408
  return this.fetch(`w/${wid}/journeys/${journeyId}/authoring`);
10717
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
+ }
10718
11463
  /** Create a new journey. Returns the READ projection (`JourneyRead`). */
10719
11464
  async createJourney(wid, data) {
10720
11465
  return this.fetch(`w/${wid}/journeys`, {
@@ -10722,7 +11467,14 @@ var JourneysApi = class extends BaseApiClient {
10722
11467
  body: JSON.stringify(data)
10723
11468
  });
10724
11469
  }
10725
- /** 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
+ */
10726
11478
  async updateJourney(wid, journeyId, data) {
10727
11479
  return this.fetch(`w/${wid}/journeys/${journeyId}`, {
10728
11480
  method: "PUT",
@@ -10829,8 +11581,6 @@ var JourneysApi = class extends BaseApiClient {
10829
11581
  qs.set("currentTaskId", String(params.currentTaskId));
10830
11582
  if (params?.runtimeFailureEdgeId !== void 0)
10831
11583
  qs.set("runtimeFailureEdgeId", String(params.runtimeFailureEdgeId));
10832
- if (params?.memberJourneyId !== void 0)
10833
- qs.set("memberJourneyId", String(params.memberJourneyId));
10834
11584
  const query = qs.toString();
10835
11585
  return this.fetch(
10836
11586
  `w/${wid}/journeys/${journeyId}/members${query ? `?${query}` : ""}`
@@ -10984,6 +11734,15 @@ var WorkflowsApi = class extends BaseApiClient {
10984
11734
  async getWorkflow(wid, id) {
10985
11735
  return this.fetch(`w/${wid}/workflows/${id}`);
10986
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
+ }
10987
11746
  /** Get activity metrics for a single workflow. */
10988
11747
  async getWorkflowActivity(wid, id, options) {
10989
11748
  const params = options?.days ? `?days=${options.days}` : "";
@@ -11468,11 +12227,31 @@ var WorkspaceInvitationsApi = class extends BaseApiClient {
11468
12227
  };
11469
12228
 
11470
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
+ }
11471
12242
  var WorkspacesApi = class extends BaseApiClient {
11472
12243
  /** List all workspaces accessible to the current user. */
11473
12244
  async getWorkspaces() {
11474
12245
  return this.fetch("w/");
11475
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
+ }
11476
12255
  /** List all publicly visible workspaces. */
11477
12256
  async getPublicWorkspaces() {
11478
12257
  return this.fetch("w/public");
@@ -11766,18 +12545,62 @@ var WorkspacesApi = class extends BaseApiClient {
11766
12545
  const qs = searchParams.toString();
11767
12546
  return this.fetch(`w/${wid}/export${qs ? `?${qs}` : ""}`);
11768
12547
  }
11769
- /** Preview the result of importing workspace configuration without applying changes. */
11770
- 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) {
11771
12556
  return this.fetch(`w/${wid}/preview-import`, {
11772
12557
  method: "POST",
11773
12558
  body: JSON.stringify({
11774
12559
  exportData,
11775
12560
  importMappings,
11776
12561
  createNew,
11777
- autoMap
12562
+ autoMap,
12563
+ ...planFields(options)
11778
12564
  })
11779
12565
  });
11780
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
+ */
11781
12604
  /** Download a workspace export ZIP (``export.json`` + file blobs). */
11782
12605
  async exportWorkspaceZip(wid, workflowId, scope, exclude) {
11783
12606
  const searchParams = new URLSearchParams();
@@ -11791,46 +12614,138 @@ var WorkspacesApi = class extends BaseApiClient {
11791
12614
  /** Import workspace configuration from exported JSON, or from a ZIP archive.
11792
12615
  * Pass ``archive`` (the ZIP from ``exportWorkspaceZip``) to restore file
11793
12616
  * contents. ``exportData`` may be omitted when the ZIP contains it.
11794
- */
11795
- async importWorkspace(wid, exportData, importMappings, createNew, archive) {
11796
- const payload = {
11797
- importMappings,
11798
- createNew
11799
- };
11800
- if (exportData) {
11801
- payload.exportData = exportData;
11802
- }
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) {
11803
12630
  if (archive) {
11804
- const form = new FormData();
11805
- form.append(
11806
- "request",
11807
- new Blob([JSON.stringify(payload)], { type: "application/json" }),
11808
- "import.json"
11809
- );
11810
- form.append("archive", archive, "workspace-export.zip");
11811
- return this.fetch(`w/${wid}/import.zip`, {
11812
- method: "POST",
11813
- body: form
12631
+ return this.importWorkspaceZip(wid, archive, {
12632
+ ...options,
12633
+ exportData,
12634
+ importMappings,
12635
+ createNew,
12636
+ autoMap,
12637
+ activateWebhookRules
11814
12638
  });
11815
12639
  }
11816
12640
  if (!exportData) {
11817
12641
  throw new Error("exportData is required for JSON import");
11818
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
+ }
11819
12655
  return this.fetch(`w/${wid}/import`, {
11820
12656
  method: "POST",
11821
12657
  body: JSON.stringify(payload)
11822
12658
  });
11823
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
+ }
11824
12739
  /** Preview a workspace import using the legacy untyped interface. */
11825
12740
  // Legacy method for backward compatibility
11826
- 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
+ }
11827
12746
  return this.fetch(`w/${wid}/preview-import`, {
11828
12747
  method: "POST",
11829
- body: JSON.stringify({
11830
- exportData,
11831
- importMappings,
11832
- createNew
11833
- })
12748
+ body: JSON.stringify(payload)
11834
12749
  });
11835
12750
  }
11836
12751
  /** List available themes for a workspace. */
@@ -11915,7 +12830,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11915
12830
  connectionSync: new ConnectionSyncApi(apiKey, baseUrl, customFetch),
11916
12831
  mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
11917
12832
  members: new MembersApi(apiKey, baseUrl, customFetch),
11918
- activityTimeline: new ActivityTimelineApi(apiKey, baseUrl, customFetch),
12833
+ activity: new ActivityApi(apiKey, baseUrl, customFetch),
11919
12834
  motd: new MotdApi(apiKey, baseUrl, customFetch),
11920
12835
  trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
11921
12836
  confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
@@ -11962,6 +12877,8 @@ var WORKSPACE_METHOD_NAMES = [
11962
12877
  "archiveDataType",
11963
12878
  "archiveJourney",
11964
12879
  "archiveMember",
12880
+ "archiveMemberRelationship",
12881
+ "archivePersona",
11965
12882
  "archivePhoneNumber",
11966
12883
  "archiveStep",
11967
12884
  "archiveTask",
@@ -12014,6 +12931,8 @@ var WORKSPACE_METHOD_NAMES = [
12014
12931
  "createCalendarEventType",
12015
12932
  "createCalendarSchedule",
12016
12933
  "createChat",
12934
+ "createChatInteractionSession",
12935
+ "transitionChatInteractionSession",
12017
12936
  "createChatCompletion",
12018
12937
  "createChatFilter",
12019
12938
  "createChatLabel",
@@ -12043,6 +12962,7 @@ var WORKSPACE_METHOD_NAMES = [
12043
12962
  "createMemberFilter",
12044
12963
  "createMemberLabel",
12045
12964
  "createMemberMemory",
12965
+ "createMemberRelationship",
12046
12966
  "createMemberRole",
12047
12967
  "createMenuItem",
12048
12968
  "createNotificationRule",
@@ -12145,7 +13065,6 @@ var WORKSPACE_METHOD_NAMES = [
12145
13065
  "disconnectConfluence",
12146
13066
  "disconnectHubspot",
12147
13067
  "disconnectMondayConnection",
12148
- "disconnectPresence",
12149
13068
  "disconnectSalesforce",
12150
13069
  "discordLinkPreflight",
12151
13070
  "discoverOAuthMetadata",
@@ -12208,6 +13127,7 @@ var WORKSPACE_METHOD_NAMES = [
12208
13127
  "getAccessGrant",
12209
13128
  "getAccessGrants",
12210
13129
  "getAgent",
13130
+ "getAgentModeAttention",
12211
13131
  "getAgentTask",
12212
13132
  "getAgentTaskMessages",
12213
13133
  "getAgentTasks",
@@ -12239,7 +13159,9 @@ var WORKSPACE_METHOD_NAMES = [
12239
13159
  "getCharlestonTestDeliveryRecipients",
12240
13160
  "getChat",
12241
13161
  "getChatAssignmentTasks",
13162
+ "getChatBrowserLiveView",
12242
13163
  "getChatCallbacks",
13164
+ "getChatEhrWritebackOutcomes",
12243
13165
  "getChatEmails",
12244
13166
  "getChatFilter",
12245
13167
  "getChatFilterByUuid",
@@ -12248,6 +13170,7 @@ var WORKSPACE_METHOD_NAMES = [
12248
13170
  "getChatLabel",
12249
13171
  "getChatLabelByUuid",
12250
13172
  "getChatLabels",
13173
+ "getChatMachineResources",
12251
13174
  "getChatMessages",
12252
13175
  "getChatModelOverride",
12253
13176
  "getChatPhoneCalls",
@@ -12288,6 +13211,8 @@ var WORKSPACE_METHOD_NAMES = [
12288
13211
  "getDataRecordFilters",
12289
13212
  "getDataRecords",
12290
13213
  "getDataType",
13214
+ "getDataTypeDraft",
13215
+ "getDataTypeVersions",
12291
13216
  "getDataTypeByUuid",
12292
13217
  "getDataTypeBySlug",
12293
13218
  "getDataTypes",
@@ -12331,9 +13256,15 @@ var WORKSPACE_METHOD_NAMES = [
12331
13256
  "listChatRecordings",
12332
13257
  "previewQuery",
12333
13258
  "publishSiteSource",
12334
- "queryActivityTimeline",
13259
+ "publishDataTypeDraft",
13260
+ "saveDataTypeDraft",
13261
+ "queryWorkspaceActivity",
13262
+ "queryWorkspaceActivityLatestSubjects",
13263
+ "queryWorkspaceActivityOpenItems",
13264
+ "queryWorkspaceActivityOneView",
12335
13265
  "registerDiscordSlashCommands",
12336
13266
  "reopenWorkspaceSupportRequest",
13267
+ "resolveEntityRefs",
12337
13268
  "resetSiteSource",
12338
13269
  "resolveFilePath",
12339
13270
  "getFileLabel",
@@ -12361,16 +13292,22 @@ var WORKSPACE_METHOD_NAMES = [
12361
13292
  "getHubspotSyncLogs",
12362
13293
  "getHubspotTransformPresets",
12363
13294
  "getICalFeedUrl",
13295
+ "getImportSkippedRules",
13296
+ "getImportReadiness",
13297
+ "rebuildImportSkippedRules",
12364
13298
  "getInbox",
12365
13299
  "getInboxEmail",
12366
13300
  "getInboxEmails",
12367
13301
  "getInboxThreads",
12368
13302
  "getInboxes",
13303
+ "getInterventionRequests",
12369
13304
  "getJourney",
12370
13305
  "getJourneyAuthoring",
13306
+ "getJourneyFilterOptions",
12371
13307
  "getJourneyHealth",
12372
13308
  "getJourneyMembers",
12373
13309
  "getJourneyNotes",
13310
+ "getJourneyV2Validation",
12374
13311
  "getJourneys",
12375
13312
  "getLinkablePhones",
12376
13313
  "getLinkedHealthieMembers",
@@ -12398,6 +13335,7 @@ var WORKSPACE_METHOD_NAMES = [
12398
13335
  "getMemberMemories",
12399
13336
  "getMemberMemory",
12400
13337
  "getMemberRecordCounts",
13338
+ "getMemberRelationships",
12401
13339
  "getMemberRole",
12402
13340
  "getMemberRoleCleanupPlan",
12403
13341
  "getMemberRoleByUuid",
@@ -12446,8 +13384,6 @@ var WORKSPACE_METHOD_NAMES = [
12446
13384
  "getPublicFolder",
12447
13385
  "getPublicFolderFiles",
12448
13386
  "getPublicProducts",
12449
- "previewPromoCode",
12450
- "startPromoPlanTrial",
12451
13387
  "getQualification",
12452
13388
  "getQualifications",
12453
13389
  "getRecordingInfo",
@@ -12502,10 +13438,10 @@ var WORKSPACE_METHOD_NAMES = [
12502
13438
  "getUnreadNotificationCount",
12503
13439
  "getUsageDashboard",
12504
13440
  "getVariableRegistry",
12505
- "getVoiceToken",
12506
13441
  "getVoiceUsageReport",
12507
13442
  "getWebhookLogs",
12508
13443
  "getWorkflow",
13444
+ "getWorkflowOpeningTurnConversionReport",
12509
13445
  "getWorkflowAccessValidation",
12510
13446
  "getWorkflowActivity",
12511
13447
  "getWorkflowConfigValidation",
@@ -12522,6 +13458,7 @@ var WORKSPACE_METHOD_NAMES = [
12522
13458
  "getWorkflows",
12523
13459
  "getWorkflowsActivityBatch",
12524
13460
  "getWorkspace",
13461
+ "getWorkspaceActivityCounts",
12525
13462
  "getWorkspaceBuilder",
12526
13463
  "getWorkspaceBuilders",
12527
13464
  "getWorkspaceCounts",
@@ -12541,7 +13478,7 @@ var WORKSPACE_METHOD_NAMES = [
12541
13478
  "importMembers",
12542
13479
  "importSalesforceMembers",
12543
13480
  "importWorkspace",
12544
- "initiateCall",
13481
+ "importWorkspaceZip",
12545
13482
  "initiateOutboundCall",
12546
13483
  "inspectPrompt",
12547
13484
  "installHubspot",
@@ -12598,14 +13535,17 @@ var WORKSPACE_METHOD_NAMES = [
12598
13535
  "previewMemberWorkflowVoice",
12599
13536
  "previewRenameFieldSlug",
12600
13537
  "previewImportWorkspace",
13538
+ "previewRoutineVoiceReadiness",
12601
13539
  "previewRoutineWorkflowAccess",
12602
13540
  "previewSchedule",
12603
13541
  "previewTTS",
12604
13542
  "previewTemplate",
12605
13543
  "previewThinkingSound",
12606
13544
  "previewWorkspaceImport",
13545
+ "previewWorkspaceImportZip",
12607
13546
  "provisionClientWorkspace",
12608
13547
  "publishWorkflowRevision",
13548
+ "putJourneyV2Definition",
12609
13549
  "rateMessage",
12610
13550
  "getChatFeedback",
12611
13551
  "reenrollMember",
@@ -12626,6 +13566,7 @@ var WORKSPACE_METHOD_NAMES = [
12626
13566
  "resetRoutineRuns",
12627
13567
  "resolveAccessGrant",
12628
13568
  "resolveAnonymousMember",
13569
+ "resolveInterventionRequest",
12629
13570
  "restoreFileVersion",
12630
13571
  "revokeAccessGrant",
12631
13572
  "revokeApiKey",
@@ -12639,6 +13580,7 @@ var WORKSPACE_METHOD_NAMES = [
12639
13580
  "selectCurrentAssignmentTask",
12640
13581
  "sendAssistantMessage",
12641
13582
  "sendChatMessage",
13583
+ "sendInboxEmail",
12642
13584
  "sendOperatorMessage",
12643
13585
  "siteGoogleOAuthInitiate",
12644
13586
  "siteSendEmailCode",
@@ -12665,6 +13607,7 @@ var WORKSPACE_METHOD_NAMES = [
12665
13607
  "unarchiveChat",
12666
13608
  "unarchiveDataType",
12667
13609
  "unarchiveMember",
13610
+ "unarchivePersona",
12668
13611
  "unarchiveStep",
12669
13612
  "unarchiveTask",
12670
13613
  "unarchiveWorkflow",
@@ -12753,6 +13696,7 @@ var WORKSPACE_METHOD_NAMES = [
12753
13696
  "uploadFile",
12754
13697
  "updateVoicemailStatus",
12755
13698
  "updateWorkflow",
13699
+ "convertWorkflowStartTaskOpeningMessage",
12756
13700
  "updateWorkflowContributor",
12757
13701
  "updateWorkflowNote",
12758
13702
  "updateWorkflowRevisionMetadata",
@@ -12799,6 +13743,13 @@ function bindAccessGrantsMethods(target, accessGrants) {
12799
13743
  target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
12800
13744
  }
12801
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
+
12802
13753
  // src/client/bindings/agent-tasks.ts
12803
13754
  function bindAgentTasksMethods(target, api) {
12804
13755
  target.getAgentTasks = api.getAgentTasks.bind(api);
@@ -12839,10 +13790,15 @@ function bindTasksMethods(target, tasks, abilities) {
12839
13790
 
12840
13791
  // src/client/bindings/chats.ts
12841
13792
  function bindChatsMethods(target, chats) {
13793
+ target.createChatInteractionSession = chats.createChatInteractionSession.bind(chats);
13794
+ target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
12842
13795
  target.getChats = chats.getChats.bind(chats);
12843
13796
  target.getChat = chats.getChat.bind(chats);
13797
+ target.getChatBrowserLiveView = chats.getChatBrowserLiveView.bind(chats);
13798
+ target.getChatMachineResources = chats.getChatMachineResources.bind(chats);
12844
13799
  target.getCurrentSmsChat = chats.getCurrentSmsChat.bind(chats);
12845
13800
  target.getChatCallbacks = chats.getChatCallbacks.bind(chats);
13801
+ target.getChatEhrWritebackOutcomes = chats.getChatEhrWritebackOutcomes.bind(chats);
12846
13802
  target.cancelChatCallback = chats.cancelChatCallback.bind(chats);
12847
13803
  target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
12848
13804
  target.getChatTodos = chats.getChatTodos.bind(chats);
@@ -12895,8 +13851,6 @@ function bindChatsMethods(target, chats) {
12895
13851
  // src/client/bindings/calls.ts
12896
13852
  function bindCallsMethods(target, calls, cel) {
12897
13853
  target.getPhoneCalls = calls.getPhoneCalls.bind(calls);
12898
- target.initiateCall = calls.initiateCall.bind(calls);
12899
- target.getVoiceToken = calls.getVoiceToken.bind(calls);
12900
13854
  target.getMessageTiming = calls.getMessageTiming.bind(calls);
12901
13855
  target.getRecordingInfo = calls.getRecordingInfo.bind(calls);
12902
13856
  target.listChatRecordings = calls.listChatRecordings.bind(calls);
@@ -12917,9 +13871,25 @@ function bindDashboardsMethods(target, dashboards) {
12917
13871
  target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
12918
13872
  }
12919
13873
 
12920
- // src/client/bindings/activity-timeline.ts
12921
- function bindActivityTimelineMethods(target, activityTimeline) {
12922
- 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);
12923
13893
  }
12924
13894
 
12925
13895
  // src/client/bindings/motd.ts
@@ -12941,6 +13911,10 @@ function bindTrackedLinksMethods(target, trackedLinks) {
12941
13911
 
12942
13912
  // src/client/bindings/data-types.ts
12943
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);
12944
13918
  target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
12945
13919
  target.getDataType = dataTypes.getDataType.bind(dataTypes);
12946
13920
  target.getDataTypeByUuid = dataTypes.getDataTypeByUuid.bind(dataTypes);
@@ -13026,6 +14000,8 @@ function bindMembersMethods(target, members) {
13026
14000
  target.createMemberRole = members.createMemberRole.bind(members);
13027
14001
  target.updateMemberRole = members.updateMemberRole.bind(members);
13028
14002
  target.deleteMemberRole = members.deleteMemberRole.bind(members);
14003
+ target.getMemberRoleCleanupPlan = members.getMemberRoleCleanupPlan.bind(members);
14004
+ target.mergeMemberRoles = members.mergeMemberRoles.bind(members);
13029
14005
  target.getMemberFields = members.getMemberFields.bind(members);
13030
14006
  target.getMemberFieldDefinitions = members.getMemberFieldDefinitions.bind(members);
13031
14007
  target.createMemberField = members.createMemberField.bind(members);
@@ -13043,11 +14019,15 @@ function bindMembersMethods(target, members) {
13043
14019
  target.createMemberMemory = members.createMemberMemory.bind(members);
13044
14020
  target.deleteMemberMemory = members.deleteMemberMemory.bind(members);
13045
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);
13046
14025
  }
13047
14026
 
13048
14027
  // src/client/bindings/workspaces.ts
13049
14028
  function bindWorkspacesMethods(target, workspaces, signupRequests) {
13050
14029
  target.getWorkspaces = workspaces.getWorkspaces.bind(workspaces);
14030
+ target.getDeviceAdmissibleWorkspaces = workspaces.getDeviceAdmissibleWorkspaces.bind(workspaces);
13051
14031
  target.getPublicWorkspaces = workspaces.getPublicWorkspaces.bind(workspaces);
13052
14032
  target.getWorkspace = workspaces.getWorkspace.bind(workspaces);
13053
14033
  target.createWorkspace = workspaces.createWorkspace.bind(workspaces);
@@ -13078,6 +14058,8 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
13078
14058
  target.getProduct = workspaces.getProduct.bind(workspaces);
13079
14059
  target.getWorkspaceProduct = workspaces.getWorkspaceProduct.bind(workspaces);
13080
14060
  target.getPublicProducts = workspaces.getPublicProducts.bind(workspaces);
14061
+ target.previewPromoCode = workspaces.previewPromoCode.bind(workspaces);
14062
+ target.startPromoPlanTrial = workspaces.startPromoPlanTrial.bind(workspaces);
13081
14063
  target.getPublicProduct = workspaces.getPublicProduct.bind(workspaces);
13082
14064
  target.createProduct = workspaces.createProduct.bind(workspaces);
13083
14065
  target.updateProduct = workspaces.updateProduct.bind(workspaces);
@@ -13085,7 +14067,12 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
13085
14067
  target.exportWorkspace = workspaces.exportWorkspace.bind(workspaces);
13086
14068
  target.exportWorkspaceZip = workspaces.exportWorkspaceZip.bind(workspaces);
13087
14069
  target.previewWorkspaceImport = workspaces.previewWorkspaceImport.bind(workspaces);
14070
+ target.previewWorkspaceImportZip = workspaces.previewWorkspaceImportZip.bind(workspaces);
13088
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);
13089
14076
  target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
13090
14077
  target.getWorkspaceThemes = workspaces.getWorkspaceThemes.bind(workspaces);
13091
14078
  target.updateWorkspaceThemes = workspaces.updateWorkspaceThemes.bind(workspaces);
@@ -13293,9 +14280,11 @@ function bindEventsMethods(target, events) {
13293
14280
  target.updateRoutine = events.updateRoutine.bind(events);
13294
14281
  target.deleteRoutine = events.deleteRoutine.bind(events);
13295
14282
  target.runRoutine = events.runRoutine.bind(events);
14283
+ target.getRoutineConfigEvents = events.getRoutineConfigEvents.bind(events);
13296
14284
  target.getRoutineRuns = events.getRoutineRuns.bind(events);
13297
14285
  target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
13298
14286
  target.previewSchedule = events.previewSchedule.bind(events);
14287
+ target.previewRoutineVoiceReadiness = events.previewRoutineVoiceReadiness.bind(events);
13299
14288
  target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
13300
14289
  }
13301
14290
 
@@ -13320,6 +14309,8 @@ function bindExperimentsMethods(target, experiments) {
13320
14309
  function bindWorkflowsMethods(target, workflows, workflowNotes, voice, supervisors) {
13321
14310
  target.getWorkflows = workflows.getWorkflows.bind(workflows);
13322
14311
  target.getWorkflow = workflows.getWorkflow.bind(workflows);
14312
+ target.getWorkflowOpeningTurnConversionReport = workflows.getWorkflowOpeningTurnConversionReport.bind(workflows);
14313
+ target.convertWorkflowStartTaskOpeningMessage = workflows.convertWorkflowStartTaskOpeningMessage.bind(workflows);
13323
14314
  target.getWorkflowActivity = workflows.getWorkflowActivity.bind(workflows);
13324
14315
  target.getWorkflowsActivityBatch = workflows.getWorkflowsActivityBatch.bind(workflows);
13325
14316
  target.getWorkflowDiagram = workflows.getWorkflowDiagram.bind(workflows);
@@ -13439,6 +14430,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
13439
14430
  target.getThreadEmails = inboxes.getThreadEmails.bind(inboxes);
13440
14431
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
13441
14432
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
14433
+ target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
13442
14434
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
13443
14435
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
13444
14436
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -13739,7 +14731,6 @@ function bindOperatorMethods(target, operatorGroups) {
13739
14731
  target.removeGroupMember = operatorGroups.removeGroupMember.bind(operatorGroups);
13740
14732
  target.getLiveOperators = operatorGroups.getLiveOperators.bind(operatorGroups);
13741
14733
  target.getPresenceStatus = operatorGroups.getPresenceStatus.bind(operatorGroups);
13742
- target.disconnectPresence = operatorGroups.disconnectPresence.bind(operatorGroups);
13743
14734
  target.getOperatorChatMessages = operatorGroups.getOperatorChatMessages.bind(operatorGroups);
13744
14735
  target.sendOperatorMessage = operatorGroups.sendOperatorMessage.bind(operatorGroups);
13745
14736
  }
@@ -13767,10 +14758,14 @@ function bindOrgMethods(target, org) {
13767
14758
  target.listLegalEntities = org.listLegalEntities.bind(org);
13768
14759
  target.getLegalEntity = org.getLegalEntity.bind(org);
13769
14760
  target.createLegalEntity = org.createLegalEntity.bind(org);
14761
+ target.getRegistrationDraft = org.getRegistrationDraft.bind(org);
14762
+ target.saveRegistrationDraft = org.saveRegistrationDraft.bind(org);
13770
14763
  target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
13771
14764
  target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
13772
14765
  target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
13773
14766
  target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
14767
+ target.getA2PCampaignConfig = org.getA2PCampaignConfig.bind(org);
14768
+ target.updateA2PCampaignConfig = org.updateA2PCampaignConfig.bind(org);
13774
14769
  target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
13775
14770
  }
13776
14771
 
@@ -13796,6 +14791,9 @@ function bindJourneysMethods(target, journeys) {
13796
14791
  target.getJourneys = journeys.getJourneys.bind(journeys);
13797
14792
  target.getJourney = journeys.getJourney.bind(journeys);
13798
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);
13799
14797
  target.getJourneyHealth = journeys.getJourneyHealth.bind(journeys);
13800
14798
  target.createJourney = journeys.createJourney.bind(journeys);
13801
14799
  target.updateJourney = journeys.updateJourney.bind(journeys);
@@ -13851,6 +14849,8 @@ function bindPersonasMethods(target, personas) {
13851
14849
  target.getPersona = personas.getPersona.bind(personas);
13852
14850
  target.createPersona = personas.createPersona.bind(personas);
13853
14851
  target.updatePersona = personas.updatePersona.bind(personas);
14852
+ target.archivePersona = personas.archivePersona.bind(personas);
14853
+ target.unarchivePersona = personas.unarchivePersona.bind(personas);
13854
14854
  target.deletePersona = personas.deletePersona.bind(personas);
13855
14855
  }
13856
14856
 
@@ -13950,8 +14950,11 @@ var GravityRailClient = class {
13950
14950
  // Chats API
13951
14951
  getChats;
13952
14952
  getChat;
14953
+ getChatBrowserLiveView;
14954
+ getChatMachineResources;
13953
14955
  getCurrentSmsChat;
13954
14956
  getChatCallbacks;
14957
+ getChatEhrWritebackOutcomes;
13955
14958
  cancelChatCallback;
13956
14959
  getChatTokenUsage;
13957
14960
  getChatTodos;
@@ -13963,6 +14966,8 @@ var GravityRailClient = class {
13963
14966
  archiveChat;
13964
14967
  unarchiveChat;
13965
14968
  createChat;
14969
+ createChatInteractionSession;
14970
+ transitionChatInteractionSession;
13966
14971
  createWorkflowOutboundVoiceChat;
13967
14972
  deleteChat;
13968
14973
  updateChat;
@@ -14001,8 +15006,6 @@ var GravityRailClient = class {
14001
15006
  getChatFilterCount;
14002
15007
  // Calls API
14003
15008
  getPhoneCalls;
14004
- initiateCall;
14005
- getVoiceToken;
14006
15009
  getMessageTiming;
14007
15010
  getRecordingInfo;
14008
15011
  listChatRecordings;
@@ -14011,6 +15014,10 @@ var GravityRailClient = class {
14011
15014
  validateCelExpression;
14012
15015
  // Data Types API
14013
15016
  getDataTypes;
15017
+ getDataTypeDraft;
15018
+ saveDataTypeDraft;
15019
+ publishDataTypeDraft;
15020
+ getDataTypeVersions;
14014
15021
  getDataType;
14015
15022
  getDataTypeByUuid;
14016
15023
  getDataTypeBySlug;
@@ -14106,6 +15113,10 @@ var GravityRailClient = class {
14106
15113
  deleteMemberMemory;
14107
15114
  // Member Sync Links
14108
15115
  getMemberSyncLinks;
15116
+ // Member Relationships
15117
+ getMemberRelationships;
15118
+ createMemberRelationship;
15119
+ archiveMemberRelationship;
14109
15120
  // Agent Tasks API (operator-facing async sub-agent inspection/cancel)
14110
15121
  getAgentTasks;
14111
15122
  getAgentTask;
@@ -14143,6 +15154,8 @@ var GravityRailClient = class {
14143
15154
  getPersona;
14144
15155
  createPersona;
14145
15156
  updatePersona;
15157
+ archivePersona;
15158
+ unarchivePersona;
14146
15159
  deletePersona;
14147
15160
  // Metrics API (customer-defined outcome metrics)
14148
15161
  listMetrics;
@@ -14162,8 +15175,26 @@ var GravityRailClient = class {
14162
15175
  getDashboardChannelStats;
14163
15176
  getDashboardWorkflowAssignmentStats;
14164
15177
  getConfigurationHealth;
14165
- // Activity Timeline API
14166
- 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;
14167
15198
  // MOTD API
14168
15199
  getMotd;
14169
15200
  // Tracked Links analytics (#10934)
@@ -14179,6 +15210,9 @@ var GravityRailClient = class {
14179
15210
  getJourneys;
14180
15211
  getJourney;
14181
15212
  getJourneyAuthoring;
15213
+ putJourneyV2Definition;
15214
+ getJourneyV2Validation;
15215
+ getJourneyFilterOptions;
14182
15216
  getJourneyHealth;
14183
15217
  createJourney;
14184
15218
  updateJourney;
@@ -14233,7 +15267,6 @@ var GravityRailClient = class {
14233
15267
  removeGroupMember;
14234
15268
  getLiveOperators;
14235
15269
  getPresenceStatus;
14236
- disconnectPresence;
14237
15270
  getOperatorChatMessages;
14238
15271
  sendOperatorMessage;
14239
15272
  // Access Grants API
@@ -14246,10 +15279,15 @@ var GravityRailClient = class {
14246
15279
  getAccessGrants;
14247
15280
  getMemberGrants;
14248
15281
  getGranteeGrants;
15282
+ // Intervention Requests API
15283
+ getAgentModeAttention;
15284
+ getInterventionRequests;
15285
+ resolveInterventionRequest;
14249
15286
  // Prompts API
14250
15287
  inspectPrompt;
14251
15288
  // Workspaces API
14252
15289
  getWorkspaces;
15290
+ getDeviceAdmissibleWorkspaces;
14253
15291
  getPublicWorkspaces;
14254
15292
  getWorkspace;
14255
15293
  createWorkspace;
@@ -14289,7 +15327,12 @@ var GravityRailClient = class {
14289
15327
  exportWorkspace;
14290
15328
  exportWorkspaceZip;
14291
15329
  previewWorkspaceImport;
15330
+ previewWorkspaceImportZip;
14292
15331
  importWorkspace;
15332
+ importWorkspaceZip;
15333
+ getImportSkippedRules;
15334
+ getImportReadiness;
15335
+ rebuildImportSkippedRules;
14293
15336
  previewImportWorkspace;
14294
15337
  getWorkspaceThemes;
14295
15338
  updateWorkspaceThemes;
@@ -14324,10 +15367,14 @@ var GravityRailClient = class {
14324
15367
  listLegalEntities;
14325
15368
  getLegalEntity;
14326
15369
  createLegalEntity;
15370
+ getRegistrationDraft;
15371
+ saveRegistrationDraft;
14327
15372
  getVoiceTrustProducts;
14328
15373
  syncVoiceTrustProducts;
14329
15374
  createOrganizationWorkspace;
14330
15375
  getOrgBillingCustomer;
15376
+ getA2PCampaignConfig;
15377
+ updateA2PCampaignConfig;
14331
15378
  getOrgWorkspaceUsage;
14332
15379
  getVapidPublicKey;
14333
15380
  registerPushSubscription;
@@ -14513,10 +15560,13 @@ var GravityRailClient = class {
14513
15560
  getRoutineRuns;
14514
15561
  resetRoutineRuns;
14515
15562
  previewSchedule;
15563
+ previewRoutineVoiceReadiness;
14516
15564
  previewRoutineWorkflowAccess;
14517
15565
  // Workflows API
14518
15566
  getWorkflows;
14519
15567
  getWorkflow;
15568
+ getWorkflowOpeningTurnConversionReport;
15569
+ convertWorkflowStartTaskOpeningMessage;
14520
15570
  getWorkflowActivity;
14521
15571
  getWorkflowsActivityBatch;
14522
15572
  getWorkflowDiagram;
@@ -14630,6 +15680,7 @@ var GravityRailClient = class {
14630
15680
  getThreadEmails;
14631
15681
  getChatEmails;
14632
15682
  replyToEmail;
15683
+ sendInboxEmail;
14633
15684
  getNotificationRules;
14634
15685
  createNotificationRule;
14635
15686
  updateNotificationRule;
@@ -14991,7 +16042,7 @@ var GravityRailClient = class {
14991
16042
  bindMetricsMethods(this, apis.metrics);
14992
16043
  bindQueriesMethods(this, apis.queries);
14993
16044
  bindDashboardsMethods(this, apis.dashboards);
14994
- bindActivityTimelineMethods(this, apis.activityTimeline);
16045
+ bindActivityMethods(this, apis.activity);
14995
16046
  bindMotdMethods(this, apis.motd);
14996
16047
  bindTrackedLinksMethods(this, apis.trackedLinks);
14997
16048
  bindJourneysMethods(this, apis.journeys);
@@ -14999,6 +16050,7 @@ var GravityRailClient = class {
14999
16050
  bindOperatorMethods(this, apis.operatorGroups);
15000
16051
  bindOrgMethods(this, apis.org);
15001
16052
  bindAccessGrantsMethods(this, apis.accessGrants);
16053
+ bindInterventionRequestsMethods(this, apis.interventionRequests);
15002
16054
  bindPromptsMethods(this, apis.prompts);
15003
16055
  bindWorkspacesMethods(this, apis.workspaces, apis.workspaceInvitations);
15004
16056
  bindAuthMethods(this, apis.auth, apis.assignments);
@@ -15151,6 +16203,50 @@ var GravityRailClient = class {
15151
16203
  return void 0;
15152
16204
  }
15153
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
+ };
15154
16250
  // Annotate the CommonJS export names for ESM import in node:
15155
16251
  0 && (module.exports = {
15156
16252
  AGENT_NOTE_ORIGINS,
@@ -15164,18 +16260,12 @@ var GravityRailClient = class {
15164
16260
  AccessGrantTrigger,
15165
16261
  AccessGrantsApi,
15166
16262
  AccessLevel,
15167
- ActivityActorKind,
15168
- ActivityAggregationKind,
15169
- ActivityCaptureState,
15170
- ActivityConfigAction,
15171
- ActivityConfigArea,
15172
- ActivityCoverageLimitation,
15173
- ActivityDirection,
15174
- ActivityEmptyReason,
15175
- ActivityEventType,
15176
- ActivityEventTypePreset,
15177
- ActivityGoalImpact,
15178
- ActivityTimelineProjection,
16263
+ ActivityEventFamily,
16264
+ ActivityGrain,
16265
+ ActivityGroupBy,
16266
+ ActivityOpenItemOrder,
16267
+ ActivityOutcome,
16268
+ ActivityWindowBasis,
15179
16269
  AddonMutationResponseScope,
15180
16270
  AgentTasksApi,
15181
16271
  AgentsApi,
@@ -15204,6 +16294,10 @@ var GravityRailClient = class {
15204
16294
  CalendarsApi,
15205
16295
  CallsApi,
15206
16296
  CapabilityClass,
16297
+ ChannelMessageDirection,
16298
+ ChannelMessageSource,
16299
+ ChannelMessagesUnavailableReason,
16300
+ ChatInteractionController,
15207
16301
  ChatsApi,
15208
16302
  ConfluenceApi,
15209
16303
  ConnectionSyncApi,
@@ -15218,6 +16312,9 @@ var GravityRailClient = class {
15218
16312
  CustomerActivitySeverity,
15219
16313
  CustomerActivitySlaThresholdSource,
15220
16314
  CustomersApi,
16315
+ DEFAULT_AGENT_CHAT_MODEL,
16316
+ DEFAULT_AGENT_REALTIME_MODEL,
16317
+ DEFAULT_AGENT_REALTIME_MODEL_CONFIG,
15221
16318
  DEFAULT_CHAT_MODEL,
15222
16319
  DEFAULT_CUSTOM_VOICE_MODEL,
15223
16320
  DEFAULT_THINKING_SPEECH_PHRASES,
@@ -15231,6 +16328,7 @@ var GravityRailClient = class {
15231
16328
  DeclaredDataUse,
15232
16329
  DiscordBotsApi,
15233
16330
  DriverMode,
16331
+ EhrWritebackOutcomeResponseStatus,
15234
16332
  EmailDnsRecordType,
15235
16333
  EventRuleActionType,
15236
16334
  EventRuleEventType,
@@ -15244,10 +16342,16 @@ var GravityRailClient = class {
15244
16342
  FhirConnectionsApi,
15245
16343
  FhirVendor,
15246
16344
  FilesApi,
15247
- FormValueDisposition,
15248
16345
  GravityRailClient,
15249
16346
  HealthieApi,
15250
16347
  HubspotApi,
16348
+ ImportReadinessIssueCode,
16349
+ ImportReadinessIssueResourceType,
16350
+ ImportSkippedRuleResourceGroupResourceType,
16351
+ ImportSkippedRuleResponseNeededResourceTypesItem,
16352
+ ImportSkippedRuleResponseParentKind,
16353
+ ImportSkippedRuleResponseReasonCode,
16354
+ ImportSkippedRuleResponseStatus,
15251
16355
  InboxesApi,
15252
16356
  IndexStatus,
15253
16357
  InquiriesApi,
@@ -15256,12 +16360,14 @@ var GravityRailClient = class {
15256
16360
  JourneysApi,
15257
16361
  MASKED_SECRET_SENTINEL,
15258
16362
  MEMBER_ENTITLEMENT_STATUSES,
16363
+ MEMBER_RELATIONSHIP_KINDS,
15259
16364
  MEMBER_SUBSCRIPTION_STATUSES,
15260
16365
  McpServerState,
15261
16366
  McpServersApi,
15262
16367
  MemberFeature,
15263
16368
  MemberImportMatchInfoMatchType,
15264
16369
  MemberImportPreviewRowAction,
16370
+ MemberRelationshipKind,
15265
16371
  MemberType,
15266
16372
  MembersApi,
15267
16373
  MenuItemResponseItemType,
@@ -15321,8 +16427,11 @@ var GravityRailClient = class {
15321
16427
  REALTIME_MODEL_OPENAI,
15322
16428
  REALTIME_MODEL_OPENAI_2,
15323
16429
  REALTIME_MODEL_OPENAI_MINI,
16430
+ RefResolutionStatus,
15324
16431
  Region,
15325
16432
  RegistrationIdentifier,
16433
+ RelatedMemberRole,
16434
+ RelationshipCardinality,
15326
16435
  ReportsApi,
15327
16436
  ResellersApi,
15328
16437
  Resource,
@@ -15354,8 +16463,13 @@ var GravityRailClient = class {
15354
16463
  TTS_PREVIEW_PROVIDERS,
15355
16464
  TasksApi,
15356
16465
  TemplatesApi,
16466
+ TestChatRunLane,
16467
+ TestChatRunOutcome,
15357
16468
  ToolkitState,
15358
16469
  ToolkitsApi,
16470
+ UiPromptPresentedKindValues,
16471
+ UiPromptResponseKindValues,
16472
+ UiPromptResponseStatusValues,
15359
16473
  VoiceApi,
15360
16474
  WIDGET_SLUGS,
15361
16475
  WORKFLOW_IMPLICIT_USE_SCOPE,
@@ -15372,7 +16486,7 @@ var GravityRailClient = class {
15372
16486
  areDependenciesSatisfied,
15373
16487
  asIdentifiedMemberContactConflict,
15374
16488
  bindAccessGrantsMethods,
15375
- bindActivityTimelineMethods,
16489
+ bindActivityMethods,
15376
16490
  bindAgentTasksMethods,
15377
16491
  bindAgentsMethods,
15378
16492
  bindAppsMethods,
@@ -15390,6 +16504,7 @@ var GravityRailClient = class {
15390
16504
  bindExperimentsMethods,
15391
16505
  bindFilesMethods,
15392
16506
  bindIntegrationsMethods,
16507
+ bindInterventionRequestsMethods,
15393
16508
  bindJourneysMethods,
15394
16509
  bindMembersMethods,
15395
16510
  bindMetricsMethods,