@gravity-rail/sdk 0.32.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.
@@ -1,5 +1,5 @@
1
- import { fd as GravityRailClient } from './chat-interaction-DLfC_h_P.cjs';
2
- export { bE as ChatInteractionController } from './chat-interaction-DLfC_h_P.cjs';
1
+ import { fo as GravityRailClient } from './chat-interaction-DJ9-Qtg2.cjs';
2
+ export { bM as ChatInteractionController } from './chat-interaction-DJ9-Qtg2.cjs';
3
3
  import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-B-31JPuq.cjs';
4
4
  import 'zod';
5
5
 
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { fd as GravityRailClient } from './chat-interaction-BKdImgZ5.js';
2
- export { bE as ChatInteractionController } from './chat-interaction-BKdImgZ5.js';
1
+ import { fo as GravityRailClient } from './chat-interaction-dd6F3uT4.js';
2
+ export { bM as ChatInteractionController } from './chat-interaction-dd6F3uT4.js';
3
3
  import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-B-31JPuq.js';
4
4
  import 'zod';
5
5
 
package/dist/index.cjs CHANGED
@@ -62,6 +62,7 @@ __export(src_exports, {
62
62
  ChannelMessageSource: () => ChannelMessageSource,
63
63
  ChannelMessagesUnavailableReason: () => ChannelMessagesUnavailableReason,
64
64
  ChatInteractionController: () => ChatInteractionController,
65
+ ChatMuteReason: () => ChatMuteReason,
65
66
  ConsentMethod: () => ConsentMethod,
66
67
  CriterionType: () => CriterionType,
67
68
  DEFAULT_AGENT_CHAT_MODEL: () => DEFAULT_AGENT_CHAT_MODEL,
@@ -76,6 +77,7 @@ __export(src_exports, {
76
77
  DataRecordRetirementResponseReason: () => DataRecordRetirementResponseReason,
77
78
  DataSensitivity: () => DataSensitivity,
78
79
  DataTypeRecordScope: () => DataTypeRecordScope,
80
+ DigestSlotRole: () => DigestSlotRole,
79
81
  DriverMode: () => DriverMode,
80
82
  EhrWritebackOutcomeResponseStatus: () => EhrWritebackOutcomeResponseStatus,
81
83
  EmailDnsRecordType: () => EmailDnsRecordType,
@@ -2272,22 +2274,12 @@ var ChatsApi = class extends BaseApiClient {
2272
2274
  });
2273
2275
  }
2274
2276
  /** Update the mute status of a chat. */
2275
- async updateChatMute(wid, id, muted) {
2277
+ async updateChatMute(wid, id, muted, muteReason, muteExpiresOnInbound) {
2276
2278
  return this.fetch(`w/${wid}/chats/${id}/mute`, {
2277
2279
  method: "PUT",
2278
- body: JSON.stringify({ muted })
2280
+ body: JSON.stringify({ muted, muteReason, muteExpiresOnInbound })
2279
2281
  });
2280
2282
  }
2281
- /** Update the needs-response flag on a chat. */
2282
- async updateChatNeedsResponse(wid, id, needsResponse) {
2283
- return this.fetch(
2284
- `w/${wid}/chats/${id}/needs-response`,
2285
- {
2286
- method: "PUT",
2287
- body: JSON.stringify({ needsResponse })
2288
- }
2289
- );
2290
- }
2291
2283
  /** Generate an AI summary for a chat, optionally updating its labels. */
2292
2284
  async summarizeChat(wid, id, updateLabels) {
2293
2285
  const params = new URLSearchParams();
@@ -4985,6 +4977,19 @@ var MembersApi = class extends BaseApiClient {
4985
4977
  async getWorkspaceMember(wid, memberId) {
4986
4978
  return this.fetch(`w/${wid}/members/${memberId}`);
4987
4979
  }
4980
+ /**
4981
+ * Get one member of an org's workspace, under `org:read`.
4982
+ *
4983
+ * The same record and the same shape as `getWorkspaceMember`, for a reader
4984
+ * whose authority is the org rather than a member row in that workspace —
4985
+ * an org Activity pane opening a member it just listed. A workspace outside
4986
+ * the org is a 404, indistinguishable from a member id that does not exist.
4987
+ */
4988
+ async getOrgWorkspaceMember(orgUuid, workspaceUuid, memberId) {
4989
+ return this.fetch(
4990
+ `o/${orgUuid}/activity/workspaces/${workspaceUuid}/members/${memberId}`
4991
+ );
4992
+ }
4988
4993
  /** Create a new workspace member. */
4989
4994
  async createWorkspaceMember(wid, data) {
4990
4995
  return this.fetch(`w/${wid}/members`, {
@@ -5559,6 +5564,39 @@ var ActivityApi = class extends BaseApiClient {
5559
5564
  body: JSON.stringify(request)
5560
5565
  });
5561
5566
  }
5567
+ /**
5568
+ * The specifics behind a page of aggregate lines, in one round trip.
5569
+ *
5570
+ * Each entry of `request.lines` is an aggregate line's **own server-issued
5571
+ * drill**, POSTed back verbatim, and the response is positional with it — so
5572
+ * a caller maps groups back to rows without inventing a key and without a
5573
+ * second expression of the slice that could drift from the count above it.
5574
+ *
5575
+ * Aggregate-shaped, never row-level: counts per PHI-silent key. A digest the
5576
+ * server could not finish comes back with `complete: false` and no groups,
5577
+ * which a client renders as the plain count phrase rather than as a slice
5578
+ * presented as the whole.
5579
+ */
5580
+ async queryActivityDigest(request) {
5581
+ return this.fetch("activity/digest", {
5582
+ method: "POST",
5583
+ body: JSON.stringify(request)
5584
+ });
5585
+ }
5586
+ /** The org mount's digest. */
5587
+ async queryOrgActivityDigest(orgUuid, request) {
5588
+ return this.fetch(`o/${orgUuid}/activity/digest`, {
5589
+ method: "POST",
5590
+ body: JSON.stringify(request)
5591
+ });
5592
+ }
5593
+ /** The workspace mount's digest. */
5594
+ async queryWorkspaceActivityDigest(workspaceUuid, request) {
5595
+ return this.fetch(`w/${workspaceUuid}/activity/digest`, {
5596
+ method: "POST",
5597
+ body: JSON.stringify(request)
5598
+ });
5599
+ }
5562
5600
  /** The workspace mount. The request's own member session carries its scopes. */
5563
5601
  async queryWorkspaceActivity(workspaceUuid, request) {
5564
5602
  return this.fetch(`w/${workspaceUuid}/activity/query`, {
@@ -5620,6 +5658,49 @@ var ActivityApi = class extends BaseApiClient {
5620
5658
  body: JSON.stringify(request)
5621
5659
  });
5622
5660
  }
5661
+ /**
5662
+ * Hydrate a page of typed refs spanning an org's workspaces, in one round
5663
+ * trip. `org:info` is the gate; what it buys differs per workspace, and the
5664
+ * server decides — an `org:read` holder reads every workspace in the org,
5665
+ * an `org:info` holder the ones they belong to.
5666
+ *
5667
+ * The request groups refs by workspace because the same UUID under two
5668
+ * workspaces is two entities. A group naming a workspace this caller cannot
5669
+ * reach comes back entirely `unresolved` — the same answer a denied ref
5670
+ * gets, never an error.
5671
+ *
5672
+ * Caps: at most 500 refs and 25 workspaces across the whole request, and a
5673
+ * workspace may be named at most once in it. Each answered group carries the
5674
+ * same per-entry contract as the workspace mount: every requested ref comes
5675
+ * back, with a marker status rather than an omission.
5676
+ *
5677
+ * PHI: resolved labels are member-identifying data. They belong in the UI
5678
+ * and nowhere else — never a log line, never an error message.
5679
+ */
5680
+ async resolveOrgEntityRefs(orgUuid, request) {
5681
+ return this.fetch(`o/${orgUuid}/activity/entity-refs/resolve`, {
5682
+ method: "POST",
5683
+ body: JSON.stringify(request)
5684
+ });
5685
+ }
5686
+ /**
5687
+ * Hydrate a page of typed refs spanning the caller's whole estate.
5688
+ *
5689
+ * The same grouped body as the org mount, and the same rule that the server
5690
+ * chooses each group's authority: a workspace the caller belongs to resolves
5691
+ * under their own member row, and a workspace they reach by holding
5692
+ * `org:read` on its org resolves under that. A client never states which,
5693
+ * because stating it would mean carrying a copy of the policy.
5694
+ *
5695
+ * PHI: resolved labels are member-identifying data. They belong in the UI
5696
+ * and nowhere else — never a log line, never an error message.
5697
+ */
5698
+ async resolveAccountEntityRefs(request) {
5699
+ return this.fetch(`activity/entity-refs/resolve`, {
5700
+ method: "POST",
5701
+ body: JSON.stringify(request)
5702
+ });
5703
+ }
5623
5704
  };
5624
5705
 
5625
5706
  // src/api/motd.ts
@@ -11687,6 +11768,7 @@ var WORKSPACE_METHOD_NAMES = [
11687
11768
  "queryWorkspaceActivityLatestSubjects",
11688
11769
  "queryWorkspaceActivityOpenItems",
11689
11770
  "queryWorkspaceActivityOneView",
11771
+ "queryWorkspaceActivityDigest",
11690
11772
  "registerDiscordSlashCommands",
11691
11773
  "reopenWorkspaceSupportRequest",
11692
11774
  "resolveEntityRefs",
@@ -12057,7 +12139,6 @@ var WORKSPACE_METHOD_NAMES = [
12057
12139
  "updateChatLabel",
12058
12140
  "updateChatModelOverride",
12059
12141
  "updateChatMute",
12060
- "updateChatNeedsResponse",
12061
12142
  "updateClientWorkspace",
12062
12143
  "updateConnection",
12063
12144
  "updateConnectionSyncConfig",
@@ -12241,7 +12322,6 @@ function bindChatsMethods(target, chats) {
12241
12322
  target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
12242
12323
  target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
12243
12324
  target.updateChatMute = chats.updateChatMute.bind(chats);
12244
- target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
12245
12325
  target.summarizeChat = chats.summarizeChat.bind(chats);
12246
12326
  target.getChatMessages = chats.getChatMessages.bind(chats);
12247
12327
  target.getChildThreadMessages = chats.getChildThreadMessages.bind(chats);
@@ -12302,19 +12382,24 @@ function bindActivityMethods(target, activity) {
12302
12382
  target.queryActivityLatestSubjects = activity.queryActivityLatestSubjects.bind(activity);
12303
12383
  target.queryActivityOpenItems = activity.queryActivityOpenItems.bind(activity);
12304
12384
  target.queryActivityOneView = activity.queryActivityOneView.bind(activity);
12385
+ target.queryActivityDigest = activity.queryActivityDigest.bind(activity);
12305
12386
  target.getActivityCounts = activity.getActivityCounts.bind(activity);
12306
12387
  target.getActivityCapabilities = activity.getActivityCapabilities.bind(activity);
12307
12388
  target.queryOrgActivity = activity.queryOrgActivity.bind(activity);
12308
12389
  target.queryOrgActivityLatestSubjects = activity.queryOrgActivityLatestSubjects.bind(activity);
12309
12390
  target.queryOrgActivityOpenItems = activity.queryOrgActivityOpenItems.bind(activity);
12310
12391
  target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
12392
+ target.queryOrgActivityDigest = activity.queryOrgActivityDigest.bind(activity);
12311
12393
  target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
12312
12394
  target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
12313
12395
  target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
12314
12396
  target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
12315
12397
  target.queryWorkspaceActivityOneView = activity.queryWorkspaceActivityOneView.bind(activity);
12398
+ target.queryWorkspaceActivityDigest = activity.queryWorkspaceActivityDigest.bind(activity);
12316
12399
  target.getWorkspaceActivityCounts = activity.getWorkspaceActivityCounts.bind(activity);
12317
12400
  target.resolveEntityRefs = activity.resolveEntityRefs.bind(activity);
12401
+ target.resolveOrgEntityRefs = activity.resolveOrgEntityRefs.bind(activity);
12402
+ target.resolveAccountEntityRefs = activity.resolveAccountEntityRefs.bind(activity);
12318
12403
  }
12319
12404
 
12320
12405
  // src/client/bindings/motd.ts
@@ -12396,6 +12481,7 @@ function bindMembersMethods(target, members) {
12396
12481
  target.updateCurrentMember = members.updateCurrentMember.bind(members);
12397
12482
  target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
12398
12483
  target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
12484
+ target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
12399
12485
  target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
12400
12486
  target.updateMember = members.updateMember.bind(members);
12401
12487
  target.deleteMember = members.deleteMember.bind(members);
@@ -13399,7 +13485,6 @@ var GravityRailClient = class {
13399
13485
  getChatModelOverride;
13400
13486
  updateChatModelOverride;
13401
13487
  updateChatMute;
13402
- updateChatNeedsResponse;
13403
13488
  summarizeChat;
13404
13489
  getChatMessages;
13405
13490
  getChildThreadMessages;
@@ -13485,6 +13570,9 @@ var GravityRailClient = class {
13485
13570
  updateCurrentMember;
13486
13571
  getWorkspaceMembers;
13487
13572
  getWorkspaceMember;
13573
+ // Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
13574
+ // passes a workspace uuid as the first argument.
13575
+ getOrgWorkspaceMember;
13488
13576
  createWorkspaceMember;
13489
13577
  updateMember;
13490
13578
  deleteMember;
@@ -13606,20 +13694,26 @@ var GravityRailClient = class {
13606
13694
  queryActivityLatestSubjects;
13607
13695
  queryActivityOpenItems;
13608
13696
  queryActivityOneView;
13697
+ queryActivityDigest;
13609
13698
  getActivityCounts;
13610
13699
  getActivityCapabilities;
13611
13700
  queryOrgActivity;
13612
13701
  queryOrgActivityLatestSubjects;
13613
13702
  queryOrgActivityOpenItems;
13614
13703
  queryOrgActivityOneView;
13704
+ queryOrgActivityDigest;
13615
13705
  getOrgActivityCounts;
13616
13706
  queryWorkspaceActivity;
13617
13707
  queryWorkspaceActivityLatestSubjects;
13618
13708
  queryWorkspaceActivityOpenItems;
13619
13709
  queryWorkspaceActivityOneView;
13710
+ queryWorkspaceActivityDigest;
13620
13711
  getWorkspaceActivityCounts;
13621
- // Hydration: typed refs in, display summaries out, one round trip.
13712
+ // Hydration: typed refs in, display summaries out, one round trip. The org
13713
+ // variant carries several workspaces' groups in that one trip.
13622
13714
  resolveEntityRefs;
13715
+ resolveOrgEntityRefs;
13716
+ resolveAccountEntityRefs;
13623
13717
  // MOTD API
13624
13718
  getMotd;
13625
13719
  // Tracked Links analytics (#10934)
@@ -17371,6 +17465,12 @@ var ChannelMessagesUnavailableReason = {
17371
17465
  no_phone_number: "no_phone_number",
17372
17466
  no_counterpart_phone: "no_counterpart_phone"
17373
17467
  };
17468
+ var ChatMuteReason = {
17469
+ working: "working",
17470
+ waiting_on_person: "waiting_on_person",
17471
+ resolved_elsewhere: "resolved_elsewhere",
17472
+ not_mine: "not_mine"
17473
+ };
17374
17474
 
17375
17475
  // src/types/generated/ehr_writeback.ts
17376
17476
  var EhrWritebackOutcomeResponseStatus = {
@@ -17786,6 +17886,25 @@ function getAllResourceSlugs() {
17786
17886
  return Object.keys(RESOURCE_METADATA);
17787
17887
  }
17788
17888
 
17889
+ // src/types/generated/digest.ts
17890
+ var DigestSlotRole = {
17891
+ people: "people",
17892
+ subject: "subject",
17893
+ actor: "actor",
17894
+ workflow: "workflow",
17895
+ journey: "journey",
17896
+ phone_number: "phone_number",
17897
+ data_type: "data_type",
17898
+ operator_group: "operator_group",
17899
+ channel: "channel",
17900
+ origin: "origin",
17901
+ source: "source",
17902
+ reason: "reason",
17903
+ direction: "direction",
17904
+ area: "area",
17905
+ conclusion: "conclusion"
17906
+ };
17907
+
17789
17908
  // src/types/generated/activity_feed.ts
17790
17909
  var ActivityGrain = {
17791
17910
  month: "month",
@@ -17861,6 +17980,7 @@ var ActivityEventType = {
17861
17980
  chatstarted: "chat.started",
17862
17981
  chatawaiting_human: "chat.awaiting_human",
17863
17982
  chathuman_replied: "chat.human_replied",
17983
+ chatcall_ended: "chat.call_ended",
17864
17984
  escalationopened: "escalation.opened",
17865
17985
  escalationresolved: "escalation.resolved",
17866
17986
  callstarted: "call.started",
@@ -18699,6 +18819,7 @@ var ChatInteractionController = class {
18699
18819
  ChannelMessageSource,
18700
18820
  ChannelMessagesUnavailableReason,
18701
18821
  ChatInteractionController,
18822
+ ChatMuteReason,
18702
18823
  ConsentMethod,
18703
18824
  CriterionType,
18704
18825
  DEFAULT_AGENT_CHAT_MODEL,
@@ -18713,6 +18834,7 @@ var ChatInteractionController = class {
18713
18834
  DataRecordRetirementResponseReason,
18714
18835
  DataSensitivity,
18715
18836
  DataTypeRecordScope,
18837
+ DigestSlotRole,
18716
18838
  DriverMode,
18717
18839
  EhrWritebackOutcomeResponseStatus,
18718
18840
  EmailDnsRecordType,