@gravity-rail/sdk 0.22.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +57 -8
  2. package/dist/agui.d.cts +1 -1
  3. package/dist/agui.d.ts +1 -1
  4. package/dist/audio.d.cts +1 -1
  5. package/dist/audio.d.ts +1 -1
  6. package/dist/{client-C10qSd6b.d.ts → chat-interaction-DJ9-Qtg2.d.cts} +8016 -3571
  7. package/dist/{client-Ct0soeip.d.cts → chat-interaction-dd6F3uT4.d.ts} +8016 -3571
  8. package/dist/{chunk-3HAV5XUJ.js → chunk-HRUMZ46V.js} +1 -1
  9. package/dist/chunk-HRUMZ46V.js.map +1 -0
  10. package/dist/{chunk-7OLBLLV7.js → chunk-P2E6LU7I.js} +57 -7
  11. package/dist/chunk-P2E6LU7I.js.map +1 -0
  12. package/dist/{chunk-WMA6YCAS.js → chunk-WDYHAQDY.js} +1364 -216
  13. package/dist/chunk-WDYHAQDY.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 +2414 -149
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +550 -6
  23. package/dist/index.d.ts +550 -6
  24. package/dist/index.js +1037 -23
  25. package/dist/index.js.map +1 -1
  26. package/dist/internal.cjs +1456 -235
  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 +77 -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-C6aM-PHu.d.ts → revision-state-BD39fW5X.d.ts} +236 -5
  39. package/dist/{revision-state-CCPTiW-i.d.cts → revision-state-Cgmy_Cds.d.cts} +236 -5
  40. package/dist/schemas.cjs +35 -10
  41. package/dist/schemas.cjs.map +1 -1
  42. package/dist/schemas.d.cts +54 -33
  43. package/dist/schemas.d.ts +54 -33
  44. package/dist/schemas.js +35 -10
  45. package/dist/schemas.js.map +1 -1
  46. package/dist/{tasks-WH_VfzMv.d.cts → tasks-B-31JPuq.d.cts} +298 -114
  47. package/dist/{tasks-WH_VfzMv.d.ts → tasks-B-31JPuq.d.ts} +298 -114
  48. package/dist/types-0c6_NGU4.d.cts +90 -0
  49. package/dist/types-0c6_NGU4.d.ts +90 -0
  50. package/package.json +3 -3
  51. package/dist/chunk-3HAV5XUJ.js.map +0 -1
  52. package/dist/chunk-7OLBLLV7.js.map +0 -1
  53. package/dist/chunk-WMA6YCAS.js.map +0 -1
  54. package/dist/types-DkYyrvoC.d.cts +0 -19
  55. package/dist/types-DkYyrvoC.d.ts +0 -19
@@ -1,5 +1,5 @@
1
- import { eX as SortOrder } from './tasks-WH_VfzMv.cjs';
2
- import { iD as Resource$1 } from './client-Ct0soeip.cjs';
1
+ import { bu as ChannelMessagesUnavailableReason, kg as Resource$1, X as ActivityEventLine, J as ActivityAggregateResponse, Z as ActivityEventsResponse } from './chat-interaction-DJ9-Qtg2.cjs';
2
+ import { f0 as SortOrder } from './tasks-B-31JPuq.cjs';
3
3
 
4
4
  interface MemberNotificationPreferences {
5
5
  notifySms?: boolean;
@@ -13,6 +13,67 @@ interface MemberNotifyActionParams {
13
13
  messageTemplate?: string | null;
14
14
  }
15
15
 
16
+ /**
17
+ * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
18
+ * (group map from emit_openapi.py). Do not edit manually.
19
+ * Group: channel_message
20
+ */
21
+
22
+ /**
23
+ * Which way the message crossed the wire, from the workspace's point of view.
24
+ */
25
+ type ChannelMessageDirection = typeof ChannelMessageDirection[keyof typeof ChannelMessageDirection];
26
+ declare const ChannelMessageDirection: {
27
+ readonly inbound: "inbound";
28
+ readonly outbound: "outbound";
29
+ };
30
+ /**
31
+ * One message on this chat's channel that is not part of this chat.
32
+ */
33
+ interface ChannelMessageResponse {
34
+ source: ChannelMessageSource;
35
+ /** The chat this message belongs to. Always null for `sms_record` items, which belong to no chat. Present only for chats the caller is authorized to read. */
36
+ sourceChatId?: number | null;
37
+ /** `messages.id`. Null for `sms_record` items. */
38
+ messageId?: number | null;
39
+ /** `sms_messages.id`. Always set for `sms_record` items; also set on an `other_chat` item whose Message is linked to a channel record. */
40
+ smsId?: number | null;
41
+ direction: ChannelMessageDirection;
42
+ /** Message content. PHI — do not log. */
43
+ body: string;
44
+ createdAt: string;
45
+ /** Agent or workflow name that sent an outbound message, when known. Never a member name. */
46
+ senderLabel?: string | null;
47
+ }
48
+ /**
49
+ * Where a ghost message came from.
50
+ *
51
+ * The two are not cosmetic variants: ``sms_record`` has no chat behind it at
52
+ * all (a one-off automated send, ``PersistencePolicy.SMS_ONLY``) and so can
53
+ * never be linked to, while ``other_chat`` is a real chat the caller has been
54
+ * authorized to read and can navigate to via ``sourceChatId``.
55
+ */
56
+ type ChannelMessageSource = typeof ChannelMessageSource[keyof typeof ChannelMessageSource];
57
+ declare const ChannelMessageSource: {
58
+ readonly sms_record: "sms_record";
59
+ readonly other_chat: "other_chat";
60
+ };
61
+ /**
62
+ * A bounded page of ghost messages, oldest first.
63
+ *
64
+ * Not a ``PaginatedResponse``: there is no meaningful total here. The feed is
65
+ * two heterogeneous sources merged inside a time window, so counting it would
66
+ * mean running both queries unbounded — the exact thing the window exists to
67
+ * prevent. Callers page backwards with ``before``.
68
+ */
69
+ interface ChannelMessagesResponse {
70
+ items: ChannelMessageResponse[];
71
+ /** More items exist inside the requested window, older than the earliest returned. Page backwards by passing that item's `createdAt` as `before`. */
72
+ hasMore: boolean;
73
+ /** Set only when `items` is empty *by construction* rather than because nothing was found: the chat's channel is not single-stream, it has no workspace phone number, or its member has no phone on file. Null on an ordinary empty result. */
74
+ reason?: ChannelMessagesUnavailableReason | null;
75
+ }
76
+
16
77
  /** Legacy enum kept for callers using UPPER_SNAKE member names (e.g. ToolkitState.ENABLED). */
17
78
  declare enum ToolkitState {
18
79
  DISABLED = "disabled",
@@ -788,6 +849,158 @@ type PidsDisposition = (typeof PIDS_DISPOSITIONS)[number];
788
849
  declare const PIDS_SOURCES: readonly ["scheduled", "backfill", "pre_llm"];
789
850
  type PidsSource = (typeof PIDS_SOURCES)[number];
790
851
 
852
+ declare const MEMBER_RELATIONSHIP_KINDS: readonly [{
853
+ readonly kind: "parent_of";
854
+ readonly cardinality: "many_to_many";
855
+ readonly symmetric: false;
856
+ readonly grantsChartAccess: false;
857
+ readonly roles: [{
858
+ readonly role: "parent";
859
+ readonly label: "Parent";
860
+ readonly inverseLabel: "Child";
861
+ readonly description: "This person is a parent of the member. For a minor, also add Legal guardian if they should read the chart.";
862
+ }, {
863
+ readonly role: "child";
864
+ readonly label: "Child";
865
+ readonly inverseLabel: "Parent";
866
+ readonly description: "This person is a child of the member.";
867
+ }];
868
+ }, {
869
+ readonly kind: "sibling_of";
870
+ readonly cardinality: "many_to_many";
871
+ readonly symmetric: true;
872
+ readonly grantsChartAccess: false;
873
+ readonly roles: [{
874
+ readonly role: "sibling";
875
+ readonly label: "Sibling";
876
+ readonly inverseLabel: "Sibling";
877
+ readonly description: "These members are siblings.";
878
+ }];
879
+ }, {
880
+ readonly kind: "spouse_of";
881
+ readonly cardinality: "one_to_one";
882
+ readonly symmetric: true;
883
+ readonly grantsChartAccess: false;
884
+ readonly roles: [{
885
+ readonly role: "spouse";
886
+ readonly label: "Spouse";
887
+ readonly inverseLabel: "Spouse";
888
+ readonly description: "These members are spouses or partners.";
889
+ }];
890
+ }, {
891
+ readonly kind: "caregiver_of";
892
+ readonly cardinality: "many_to_many";
893
+ readonly symmetric: false;
894
+ readonly grantsChartAccess: false;
895
+ readonly roles: [{
896
+ readonly role: "caregiver";
897
+ readonly label: "Caregiver";
898
+ readonly inverseLabel: "Care recipient";
899
+ readonly description: "This person provides care for the member at home.";
900
+ }, {
901
+ readonly role: "care_recipient";
902
+ readonly label: "Care recipient";
903
+ readonly inverseLabel: "Caregiver";
904
+ readonly description: "This person receives care from the member.";
905
+ }];
906
+ }, {
907
+ readonly kind: "emergency_contact_of";
908
+ readonly cardinality: "many_to_many";
909
+ readonly symmetric: false;
910
+ readonly grantsChartAccess: false;
911
+ readonly roles: [{
912
+ readonly role: "emergency_contact";
913
+ readonly label: "Emergency contact";
914
+ readonly inverseLabel: "Emergency contact for";
915
+ readonly description: "This person is the member's emergency contact.";
916
+ }, {
917
+ readonly role: "emergency_contact_for";
918
+ readonly label: "Emergency contact for";
919
+ readonly inverseLabel: "Emergency contact";
920
+ readonly description: "The member is listed as this person's emergency contact.";
921
+ }];
922
+ }, {
923
+ readonly kind: "next_of_kin_of";
924
+ readonly cardinality: "one_per_target";
925
+ readonly symmetric: false;
926
+ readonly grantsChartAccess: false;
927
+ readonly roles: [{
928
+ readonly role: "next_of_kin";
929
+ readonly label: "Next of kin";
930
+ readonly inverseLabel: "Next of kin for";
931
+ readonly description: "This person is the member's designated next of kin. A member has at most one.";
932
+ }, {
933
+ readonly role: "next_of_kin_for";
934
+ readonly label: "Next of kin for";
935
+ readonly inverseLabel: "Next of kin";
936
+ readonly description: "The member is this person's designated next of kin.";
937
+ }];
938
+ }, {
939
+ readonly kind: "legal_guardian_of";
940
+ readonly cardinality: "many_to_many";
941
+ readonly symmetric: false;
942
+ readonly grantsChartAccess: true;
943
+ readonly roles: [{
944
+ readonly role: "legal_guardian";
945
+ readonly label: "Legal guardian";
946
+ readonly inverseLabel: "Legal guardian for";
947
+ readonly description: "Court-appointed guardian, or parent/person with parental responsibility for a minor.";
948
+ }, {
949
+ readonly role: "legal_guardian_for";
950
+ readonly label: "Legal guardian for";
951
+ readonly inverseLabel: "Legal guardian";
952
+ readonly description: "The member is this person's legal guardian.";
953
+ }];
954
+ }, {
955
+ readonly kind: "healthcare_agent_of";
956
+ readonly cardinality: "many_to_many";
957
+ readonly symmetric: false;
958
+ readonly grantsChartAccess: true;
959
+ readonly roles: [{
960
+ readonly role: "healthcare_agent";
961
+ readonly label: "Healthcare agent";
962
+ readonly inverseLabel: "Healthcare agent for";
963
+ readonly description: "Healthcare power of attorney or health proxy.";
964
+ }, {
965
+ readonly role: "healthcare_agent_for";
966
+ readonly label: "Healthcare agent for";
967
+ readonly inverseLabel: "Healthcare agent";
968
+ readonly description: "The member is this person's healthcare agent (healthcare power of attorney or health proxy).";
969
+ }];
970
+ }, {
971
+ readonly kind: "doctor_of";
972
+ readonly cardinality: "many_to_many";
973
+ readonly symmetric: false;
974
+ readonly grantsChartAccess: true;
975
+ readonly roles: [{
976
+ readonly role: "doctor";
977
+ readonly label: "Doctor";
978
+ readonly inverseLabel: "Patient";
979
+ readonly description: "This person is a treating clinician for the member.";
980
+ }, {
981
+ readonly role: "patient";
982
+ readonly label: "Patient";
983
+ readonly inverseLabel: "Doctor";
984
+ readonly description: "This person is a patient of the member.";
985
+ }];
986
+ }, {
987
+ readonly kind: "primary_contact_of";
988
+ readonly cardinality: "one_per_target";
989
+ readonly symmetric: false;
990
+ readonly grantsChartAccess: true;
991
+ readonly roles: [{
992
+ readonly role: "primary_contact";
993
+ readonly label: "Primary contact";
994
+ readonly inverseLabel: "Primary contact for";
995
+ readonly description: "This person is the organization's primary contact for the member. A member has at most one.";
996
+ }, {
997
+ readonly role: "primary_contact_for";
998
+ readonly label: "Primary contact for";
999
+ readonly inverseLabel: "Primary contact";
1000
+ readonly description: "The member is this person's assigned primary contact inside the organization.";
1001
+ }];
1002
+ }];
1003
+
791
1004
  /**
792
1005
  * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
793
1006
  * (group map from emit_openapi.py). Do not edit manually.
@@ -1163,8 +1376,16 @@ declare function formatAppContextAsMarkdown(context: AppContext | undefined): st
1163
1376
  * These are used as fallback defaults when creating new agents, assistants,
1164
1377
  * and other entities that require a model selection.
1165
1378
  */
1166
- /** Default chat/inference model for new agents and assistants. */
1379
+ /** Shared chat/inference fallback for Workflow and action settings. */
1167
1380
  declare const DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
1381
+ /** Chat model selected when creating an Agent. */
1382
+ declare const DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-5.6-luna";
1383
+ /** Default native realtime model and voice for newly created agents. */
1384
+ declare const DEFAULT_AGENT_REALTIME_MODEL = "xai:realtime:voice-agent-2";
1385
+ declare const DEFAULT_AGENT_REALTIME_MODEL_CONFIG: {
1386
+ ttsModel: string;
1387
+ voiceModel: string;
1388
+ };
1168
1389
  /** Default inference model for custom voice stack. */
1169
1390
  declare const DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
1170
1391
  /** Default voice model for custom realtime configurations. */
@@ -1198,6 +1419,16 @@ declare function getResourceMetadata(resource: Resource$1): ResourceMetadata | u
1198
1419
  */
1199
1420
  declare function getAllResourceSlugs(): Resource$1[];
1200
1421
 
1422
+ /** The typed per-type payload a leaf row carries, discriminated on `type`. */
1423
+ type ActivityDetail = NonNullable<ActivityEventLine['detail']>;
1424
+ /**
1425
+ * A feed query answers at one of two shapes, chosen by `grain`: aggregate lines
1426
+ * for `month`/`day`/`hour`, leaf rows for `event`. Discriminate on the presence
1427
+ * of `lines` versus `items` rather than on the request you sent — a drill query
1428
+ * you received may be at either grain.
1429
+ */
1430
+ type ActivityFeedResponse = ActivityAggregateResponse | ActivityEventsResponse;
1431
+
1201
1432
  /**
1202
1433
  * Centralized OAuth and API scope management for TypeScript/JavaScript clients.
1203
1434
  *
@@ -1321,7 +1552,7 @@ declare const SCOPES: {
1321
1552
  readonly 'chats:write': {
1322
1553
  readonly name: "chats:write";
1323
1554
  readonly category: ScopeCategory.CHATS;
1324
- readonly description: "Send messages in conversations";
1555
+ readonly description: "Modify other members' conversations";
1325
1556
  readonly implies: readonly ["chats:read"];
1326
1557
  };
1327
1558
  readonly 'chats:admin': {
@@ -1816,4 +2047,4 @@ interface RevisionState {
1816
2047
  */
1817
2048
  declare function getRevisionState(workflow: RevisionStateWorkflow, revision?: RevisionStateRevision): RevisionState;
1818
2049
 
1819
- export { PIDS_DISPOSITIONS as $, type AIModelUsageResponse as A, type BillingStatistics as B, type CallEndSection as C, DEFAULT_CHAT_MODEL as D, type EfficiencyMetricsResponse as E, type EmailUsageResponse as F, type EngineTimeSeries as G, type ErrorCodeBucket as H, type EventRuleMetrics as I, type ExportStatistics as J, type FeatureSyncStatus as K, type HealthCheckStatistics as L, type MetricSummary$1 as M, type HealthDetailRequest as N, type HealthMetricsRequest as O, type HealthMetricsResponse as P, type HealthSummary as Q, type ImportStatistics as R, type MemberNotificationPreferences as S, type MemberNotifyActionParams as T, type MemberUsageReport as U, type VoiceMetricsResponse$1 as V, type WorkspaceHealthResponse$1 as W, type MetricDataPoint as X, type MetricSection as Y, type MetricSummary as Z, type MetricValue as _, type AIUsageDetailsResponse as a, getResourceMetadata as a$, PIDS_SOURCES as a0, type PageContext as a1, type PerformanceMetrics as a2, type PhoneCallPhoneNumberUsageResponse as a3, type PhoneCallUsageResponse as a4, type PhoneCommunicationDetailsResponse as a5, type PhoneNumberUsage as a6, type PidsDisposition as a7, type PidsSource as a8, type ProductOverageConfigResponse as a9, type TaskCountResponse as aA, type TimeSeriesData as aB, type TimeSeriesDataPoint as aC, type ToolParameter as aD, type ToolkitContext as aE, ToolkitState as aF, type TopOffender as aG, type TopResourceOverageResponse as aH, type TtsReconnectOutcomeEntry as aI, type TtsReconnectSection as aJ, type UsageProductSummaryResponse as aK, type UsageReportResponse as aL, type UsageReportRequest as aM, type UsageStatistics as aN, type VoiceMetricsResponse as aO, type VoiceMetricsTimeRange as aP, WIDGET_SLUGS as aQ, type WebhookMetrics as aR, type WidgetSlug as aS, type WorkflowContext as aT, type WorkspaceHealthDetail as aU, type WorkspaceHealthResponse as aV, type WorkspaceHealthRow as aW, type WorkspaceRoutineWorkflowAccessResponse as aX, type WorkspaceUsageReportResponse as aY, formatAppContextAsMarkdown as aZ, getAllResourceSlugs as a_, type ProvisionPlanRequest as aa, type ProvisionPlanResponse as ab, type RequestsSection as ac, type RequestsStatusEntry as ad, type ResourceMetadata as ae, type ResourceOverageResponse as af, type ResourceUsageResponse as ag, type RevisionState as ah, type RevisionStateRevision as ai, type RevisionStateWorkflow as aj, type RoutineRunMetrics as ak, type RoutineWorkflowAccessMissingRole as al, type RoutineWorkflowAccessWarning as am, SCOPES as an, SCOPE_PRESETS as ao, type SMSCommunicationDetailsResponse as ap, type SMSMessageUsageResponse as aq, type SMSPhoneNumberUsageResponse as ar, ScopeCategory as as, ScopeManager as at, type ScopeName as au, type SiteContext as av, type SkippedWorkspace as aw, type StatisticsSummary as ax, type SystemStatistics as ay, type TaskContext as az, type AcquisitionFunnelChannel as b, getRevisionState as b0, type ScopeDefinition as b1, type AcquisitionFunnelRecentSignup as c, type AcquisitionFunnelResponse as d, type AdminDomainResponse as e, type AdminDomainSiteMapping as f, type AdminDomainWidgetMapping as g, type AdminPidsFindingResponse as h, type AnalyticsFilter as i, type AnalyticsQuery as j, type AppContext as k, type AttachedAddonInfo as l, type CallEndStatusEntry as m, type ChannelErrorBreakdown as n, type ChannelFailures as o, type CommunicationDetailsResponse as p, type CurrentPlanInfo as q, DEFAULT_CUSTOM_VOICE_MODEL as r, DEFAULT_VOICE_INFERENCE_MODEL as s, type DailyPhoneRowResponse as t, type DailySMSRowResponse as u, type DashboardMetrics as v, type DataRecordContext as w, type DeviceCacheFileEntry as x, type DeviceCacheManifestResponse as y, type EmailCountsResponse as z };
2050
+ export { type HealthSummary as $, type AIModelUsageResponse as A, type BillingStatistics as B, type CallEndSection as C, DEFAULT_AGENT_CHAT_MODEL as D, DEFAULT_CUSTOM_VOICE_MODEL as E, DEFAULT_VOICE_INFERENCE_MODEL as F, type DailyPhoneRowResponse as G, type DailySMSRowResponse as H, type DashboardMetrics as I, type DataRecordContext as J, type DeviceCacheFileEntry as K, type DeviceCacheManifestResponse as L, type EfficiencyMetricsResponse as M, type EmailCountsResponse as N, type EmailUsageResponse as O, type EngineTimeSeries as P, type ErrorCodeBucket as Q, type EventRuleMetrics as R, type ExportStatistics as S, type FeatureSyncStatus as T, type MetricSummary$1 as U, type VoiceMetricsResponse$1 as V, type WorkspaceHealthResponse$1 as W, type HealthCheckStatistics as X, type HealthDetailRequest as Y, type HealthMetricsRequest as Z, type HealthMetricsResponse as _, type AIUsageDetailsResponse as a, type WebhookMetrics as a$, type ImportStatistics as a0, MEMBER_RELATIONSHIP_KINDS as a1, type MemberNotificationPreferences as a2, type MemberNotifyActionParams as a3, type MemberUsageReport as a4, type MetricDataPoint as a5, type MetricSection as a6, type MetricSummary as a7, type MetricValue as a8, PIDS_DISPOSITIONS as a9, type SMSMessageUsageResponse as aA, type SMSPhoneNumberUsageResponse as aB, ScopeCategory as aC, ScopeManager as aD, type ScopeName as aE, type SiteContext as aF, type SkippedWorkspace as aG, type StatisticsSummary as aH, type SystemStatistics as aI, type TaskContext as aJ, type TaskCountResponse as aK, type TimeSeriesData as aL, type TimeSeriesDataPoint as aM, type ToolParameter as aN, type ToolkitContext as aO, ToolkitState as aP, type TopOffender as aQ, type TopResourceOverageResponse as aR, type TtsReconnectOutcomeEntry as aS, type TtsReconnectSection as aT, type UsageProductSummaryResponse as aU, type UsageReportResponse as aV, type UsageReportRequest as aW, type UsageStatistics as aX, type VoiceMetricsResponse as aY, type VoiceMetricsTimeRange as aZ, WIDGET_SLUGS as a_, PIDS_SOURCES as aa, type PageContext as ab, type PerformanceMetrics as ac, type PhoneCallPhoneNumberUsageResponse as ad, type PhoneCallUsageResponse as ae, type PhoneCommunicationDetailsResponse as af, type PhoneNumberUsage as ag, type PidsDisposition as ah, type PidsSource as ai, type ProductOverageConfigResponse as aj, type ProvisionPlanRequest as ak, type ProvisionPlanResponse as al, type RequestsSection as am, type RequestsStatusEntry as an, type ResourceMetadata as ao, type ResourceOverageResponse as ap, type ResourceUsageResponse as aq, type RevisionState as ar, type RevisionStateRevision as as, type RevisionStateWorkflow as at, type RoutineRunMetrics as au, type RoutineWorkflowAccessMissingRole as av, type RoutineWorkflowAccessWarning as aw, SCOPES as ax, SCOPE_PRESETS as ay, type SMSCommunicationDetailsResponse as az, type AcquisitionFunnelChannel as b, type WidgetSlug as b0, type WorkflowContext as b1, type WorkspaceHealthDetail as b2, type WorkspaceHealthResponse as b3, type WorkspaceHealthRow as b4, type WorkspaceRoutineWorkflowAccessResponse as b5, type WorkspaceUsageReportResponse as b6, formatAppContextAsMarkdown as b7, getAllResourceSlugs as b8, getResourceMetadata as b9, getRevisionState as ba, type ScopeDefinition as bb, type AcquisitionFunnelRecentSignup as c, type AcquisitionFunnelResponse as d, type ActivityDetail as e, type ActivityFeedResponse as f, type AdminDomainResponse as g, type AdminDomainSiteMapping as h, type AdminDomainWidgetMapping as i, type AdminPidsFindingResponse as j, type AnalyticsFilter as k, type AnalyticsQuery as l, type AppContext as m, type AttachedAddonInfo as n, type CallEndStatusEntry as o, type ChannelErrorBreakdown as p, type ChannelFailures as q, type ChannelMessageResponse as r, ChannelMessageDirection as s, ChannelMessageSource as t, type ChannelMessagesResponse as u, type CommunicationDetailsResponse as v, type CurrentPlanInfo as w, DEFAULT_AGENT_REALTIME_MODEL as x, DEFAULT_AGENT_REALTIME_MODEL_CONFIG as y, DEFAULT_CHAT_MODEL as z };
package/dist/schemas.cjs CHANGED
@@ -54,6 +54,7 @@ __export(schemas_exports, {
54
54
  ChatMessageObjectSchema: () => ChatMessageObjectSchema,
55
55
  ChatMessageSchema: () => ChatMessageSchema,
56
56
  ChatMessageUISchema: () => ChatMessageUISchema,
57
+ ChatMuteReasonEnum: () => ChatMuteReasonEnum,
57
58
  ChatParticipantFormDataSchema: () => ChatParticipantFormDataSchema,
58
59
  ChatSchema: () => ChatSchema,
59
60
  CheckAvailabilitySchema: () => CheckAvailabilitySchema,
@@ -243,7 +244,6 @@ __export(schemas_exports, {
243
244
  UpdateCalendarEventSchema: () => UpdateCalendarEventSchema,
244
245
  UpdateCalendarSchema: () => UpdateCalendarSchema,
245
246
  UpdateChatMuteSchema: () => UpdateChatMuteSchema,
246
- UpdateChatNeedsResponseSchema: () => UpdateChatNeedsResponseSchema,
247
247
  UpdateChatSchema: () => UpdateChatSchema,
248
248
  UpdateCurrentMemberSchema: () => UpdateCurrentMemberSchema,
249
249
  UpdateDataFieldSchema: () => UpdateDataFieldSchema,
@@ -841,6 +841,12 @@ var ChatFilterFilterTypeEnum = import_zod4.z.enum([
841
841
  "onlyMine",
842
842
  "active"
843
843
  ]);
844
+ var ChatMuteReasonEnum = import_zod4.z.enum([
845
+ "working",
846
+ "waiting_on_person",
847
+ "resolved_elsewhere",
848
+ "not_mine"
849
+ ]);
844
850
  var TruncationReasonEnum = import_zod4.z.enum([
845
851
  "barge_in",
846
852
  // User interrupted the assistant mid-response (voice)
@@ -915,6 +921,8 @@ var ChatFormDataSchema = import_zod4.z.object({
915
921
  workflowRevisionUuid: import_zod4.z.string().nullable().optional(),
916
922
  phoneNumberId: import_zod4.z.number().nullable().optional(),
917
923
  siteId: import_zod4.z.number().nullable().optional(),
924
+ browserChannel: import_zod4.z.enum(["web-chat", "web-voice"]).nullable().optional(),
925
+ interactionMode: import_zod4.z.enum(["text", "push_to_talk", "realtime"]).nullable().optional(),
918
926
  memberId: import_zod4.z.number().nullable().optional(),
919
927
  participants: import_zod4.z.array(ChatParticipantFormDataSchema),
920
928
  // Who answers. The explicit successor to `agentEnabled` — see ChatFormData.
@@ -936,7 +944,6 @@ var ChatFormDataSchema = import_zod4.z.object({
936
944
  assistantRealtimeModelConfig: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()).nullable().optional(),
937
945
  paused: import_zod4.z.boolean().optional(),
938
946
  muted: import_zod4.z.boolean().optional(),
939
- needsResponse: import_zod4.z.boolean().optional(),
940
947
  // Human-typed initial SMS/email body. Optional, request-body only.
941
948
  // Backend dispatches via the existing initial-message path when the
942
949
  // Agent is disabled. Treat as PHI client-side.
@@ -961,7 +968,14 @@ var GetChatSchema = WorkspaceIdSchema.extend({
961
968
  var CreateChatSchema = WorkspaceIdSchema.merge(ChatFormDataSchema);
962
969
  var UpdateChatSchema = WorkspaceIdSchema.extend({
963
970
  chatId: import_zod4.z.number().describe("Chat ID")
964
- }).merge(ChatFormDataSchema.partial());
971
+ // `muted` is deliberately absent: the generic update endpoint does not
972
+ // carry mute state at all (GRA-8353 — a mute without a reason mints
973
+ // exactly the anonymous state the reason vocabulary exists to prevent),
974
+ // so its request model forbids the field. Mute state goes through the
975
+ // dedicated mute schema below, the only writer of the decision fields.
976
+ }).merge(
977
+ ChatFormDataSchema.omit({ browserChannel: true, interactionMode: true, muted: true }).partial()
978
+ );
965
979
  var DeleteChatSchema = WorkspaceIdSchema.extend({
966
980
  chatId: import_zod4.z.number().describe("Chat ID to delete")
967
981
  });
@@ -973,11 +987,23 @@ var UnarchiveChatSchema = WorkspaceIdSchema.extend({
973
987
  });
974
988
  var UpdateChatMuteSchema = WorkspaceIdSchema.extend({
975
989
  chatId: import_zod4.z.number().describe("Chat ID"),
976
- muted: import_zod4.z.boolean().describe("Mute status")
977
- });
978
- var UpdateChatNeedsResponseSchema = WorkspaceIdSchema.extend({
979
- chatId: import_zod4.z.number().describe("Chat ID"),
980
- needsResponse: import_zod4.z.boolean().describe("Needs response status")
990
+ muted: import_zod4.z.boolean().describe("Mute status"),
991
+ muteReason: ChatMuteReasonEnum.optional().describe(
992
+ "Why the chat is muted (required when muting)"
993
+ ),
994
+ muteExpiresOnInbound: import_zod4.z.boolean().optional().describe("Lapse the mute when the member sends a new inbound message")
995
+ // Runtime mirror of the backend request model's validator
996
+ // (`UpdateChatMuteRequest._muting_requires_reason`): muting without a
997
+ // reason is a 422 at the API, so it is a parse failure here — a bare
998
+ // boolean cannot reach the endpoint as an anonymous mute.
999
+ }).superRefine((data, ctx) => {
1000
+ if (data.muted && data.muteReason === void 0) {
1001
+ ctx.addIssue({
1002
+ code: import_zod4.z.ZodIssueCode.custom,
1003
+ path: ["muteReason"],
1004
+ message: "Muting a chat requires a muteReason from the closed vocabulary: working, waiting_on_person, resolved_elsewhere, not_mine."
1005
+ });
1006
+ }
981
1007
  });
982
1008
  var GetChatsNeedsResponseSchema = WorkspaceIdSchema;
983
1009
  var GetChatMessagesSchema = WorkspaceIdSchema.extend({
@@ -1038,7 +1064,6 @@ var ChatSchema = import_zod4.z.object({
1038
1064
  id: import_zod4.z.number(),
1039
1065
  archived: import_zod4.z.boolean(),
1040
1066
  muted: import_zod4.z.boolean(),
1041
- needsResponse: import_zod4.z.boolean(),
1042
1067
  channel: ChannelEnum,
1043
1068
  chatType: import_zod4.z.string(),
1044
1069
  paused: import_zod4.z.boolean(),
@@ -2289,6 +2314,7 @@ var GetProductSchema = import_zod13.z.object({
2289
2314
  ChatMessageObjectSchema,
2290
2315
  ChatMessageSchema,
2291
2316
  ChatMessageUISchema,
2317
+ ChatMuteReasonEnum,
2292
2318
  ChatParticipantFormDataSchema,
2293
2319
  ChatSchema,
2294
2320
  CheckAvailabilitySchema,
@@ -2478,7 +2504,6 @@ var GetProductSchema = import_zod13.z.object({
2478
2504
  UpdateCalendarEventSchema,
2479
2505
  UpdateCalendarSchema,
2480
2506
  UpdateChatMuteSchema,
2481
- UpdateChatNeedsResponseSchema,
2482
2507
  UpdateChatSchema,
2483
2508
  UpdateCurrentMemberSchema,
2484
2509
  UpdateDataFieldSchema,