@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.
@@ -1560,22 +1560,12 @@ var ChatsApi = class extends BaseApiClient {
1560
1560
  });
1561
1561
  }
1562
1562
  /** Update the mute status of a chat. */
1563
- async updateChatMute(wid, id, muted) {
1563
+ async updateChatMute(wid, id, muted, muteReason, muteExpiresOnInbound) {
1564
1564
  return this.fetch(`w/${wid}/chats/${id}/mute`, {
1565
1565
  method: "PUT",
1566
- body: JSON.stringify({ muted })
1566
+ body: JSON.stringify({ muted, muteReason, muteExpiresOnInbound })
1567
1567
  });
1568
1568
  }
1569
- /** Update the needs-response flag on a chat. */
1570
- async updateChatNeedsResponse(wid, id, needsResponse) {
1571
- return this.fetch(
1572
- `w/${wid}/chats/${id}/needs-response`,
1573
- {
1574
- method: "PUT",
1575
- body: JSON.stringify({ needsResponse })
1576
- }
1577
- );
1578
- }
1579
1569
  /** Generate an AI summary for a chat, optionally updating its labels. */
1580
1570
  async summarizeChat(wid, id, updateLabels) {
1581
1571
  const params = new URLSearchParams();
@@ -3991,6 +3981,19 @@ var MembersApi = class extends BaseApiClient {
3991
3981
  async getWorkspaceMember(wid, memberId) {
3992
3982
  return this.fetch(`w/${wid}/members/${memberId}`);
3993
3983
  }
3984
+ /**
3985
+ * Get one member of an org's workspace, under `org:read`.
3986
+ *
3987
+ * The same record and the same shape as `getWorkspaceMember`, for a reader
3988
+ * whose authority is the org rather than a member row in that workspace —
3989
+ * an org Activity pane opening a member it just listed. A workspace outside
3990
+ * the org is a 404, indistinguishable from a member id that does not exist.
3991
+ */
3992
+ async getOrgWorkspaceMember(orgUuid, workspaceUuid, memberId) {
3993
+ return this.fetch(
3994
+ `o/${orgUuid}/activity/workspaces/${workspaceUuid}/members/${memberId}`
3995
+ );
3996
+ }
3994
3997
  /** Create a new workspace member. */
3995
3998
  async createWorkspaceMember(wid, data) {
3996
3999
  return this.fetch(`w/${wid}/members`, {
@@ -10074,6 +10077,39 @@ var ActivityApi = class extends BaseApiClient {
10074
10077
  body: JSON.stringify(request)
10075
10078
  });
10076
10079
  }
10080
+ /**
10081
+ * The specifics behind a page of aggregate lines, in one round trip.
10082
+ *
10083
+ * Each entry of `request.lines` is an aggregate line's **own server-issued
10084
+ * drill**, POSTed back verbatim, and the response is positional with it — so
10085
+ * a caller maps groups back to rows without inventing a key and without a
10086
+ * second expression of the slice that could drift from the count above it.
10087
+ *
10088
+ * Aggregate-shaped, never row-level: counts per PHI-silent key. A digest the
10089
+ * server could not finish comes back with `complete: false` and no groups,
10090
+ * which a client renders as the plain count phrase rather than as a slice
10091
+ * presented as the whole.
10092
+ */
10093
+ async queryActivityDigest(request) {
10094
+ return this.fetch("activity/digest", {
10095
+ method: "POST",
10096
+ body: JSON.stringify(request)
10097
+ });
10098
+ }
10099
+ /** The org mount's digest. */
10100
+ async queryOrgActivityDigest(orgUuid, request) {
10101
+ return this.fetch(`o/${orgUuid}/activity/digest`, {
10102
+ method: "POST",
10103
+ body: JSON.stringify(request)
10104
+ });
10105
+ }
10106
+ /** The workspace mount's digest. */
10107
+ async queryWorkspaceActivityDigest(workspaceUuid, request) {
10108
+ return this.fetch(`w/${workspaceUuid}/activity/digest`, {
10109
+ method: "POST",
10110
+ body: JSON.stringify(request)
10111
+ });
10112
+ }
10077
10113
  /** The workspace mount. The request's own member session carries its scopes. */
10078
10114
  async queryWorkspaceActivity(workspaceUuid, request) {
10079
10115
  return this.fetch(`w/${workspaceUuid}/activity/query`, {
@@ -10135,6 +10171,49 @@ var ActivityApi = class extends BaseApiClient {
10135
10171
  body: JSON.stringify(request)
10136
10172
  });
10137
10173
  }
10174
+ /**
10175
+ * Hydrate a page of typed refs spanning an org's workspaces, in one round
10176
+ * trip. `org:info` is the gate; what it buys differs per workspace, and the
10177
+ * server decides — an `org:read` holder reads every workspace in the org,
10178
+ * an `org:info` holder the ones they belong to.
10179
+ *
10180
+ * The request groups refs by workspace because the same UUID under two
10181
+ * workspaces is two entities. A group naming a workspace this caller cannot
10182
+ * reach comes back entirely `unresolved` — the same answer a denied ref
10183
+ * gets, never an error.
10184
+ *
10185
+ * Caps: at most 500 refs and 25 workspaces across the whole request, and a
10186
+ * workspace may be named at most once in it. Each answered group carries the
10187
+ * same per-entry contract as the workspace mount: every requested ref comes
10188
+ * back, with a marker status rather than an omission.
10189
+ *
10190
+ * PHI: resolved labels are member-identifying data. They belong in the UI
10191
+ * and nowhere else — never a log line, never an error message.
10192
+ */
10193
+ async resolveOrgEntityRefs(orgUuid, request) {
10194
+ return this.fetch(`o/${orgUuid}/activity/entity-refs/resolve`, {
10195
+ method: "POST",
10196
+ body: JSON.stringify(request)
10197
+ });
10198
+ }
10199
+ /**
10200
+ * Hydrate a page of typed refs spanning the caller's whole estate.
10201
+ *
10202
+ * The same grouped body as the org mount, and the same rule that the server
10203
+ * chooses each group's authority: a workspace the caller belongs to resolves
10204
+ * under their own member row, and a workspace they reach by holding
10205
+ * `org:read` on its org resolves under that. A client never states which,
10206
+ * because stating it would mean carrying a copy of the policy.
10207
+ *
10208
+ * PHI: resolved labels are member-identifying data. They belong in the UI
10209
+ * and nowhere else — never a log line, never an error message.
10210
+ */
10211
+ async resolveAccountEntityRefs(request) {
10212
+ return this.fetch(`activity/entity-refs/resolve`, {
10213
+ method: "POST",
10214
+ body: JSON.stringify(request)
10215
+ });
10216
+ }
10138
10217
  };
10139
10218
 
10140
10219
  // src/api/motd.ts
@@ -10942,6 +11021,7 @@ var WORKSPACE_METHOD_NAMES = [
10942
11021
  "queryWorkspaceActivityLatestSubjects",
10943
11022
  "queryWorkspaceActivityOpenItems",
10944
11023
  "queryWorkspaceActivityOneView",
11024
+ "queryWorkspaceActivityDigest",
10945
11025
  "registerDiscordSlashCommands",
10946
11026
  "reopenWorkspaceSupportRequest",
10947
11027
  "resolveEntityRefs",
@@ -11312,7 +11392,6 @@ var WORKSPACE_METHOD_NAMES = [
11312
11392
  "updateChatLabel",
11313
11393
  "updateChatModelOverride",
11314
11394
  "updateChatMute",
11315
- "updateChatNeedsResponse",
11316
11395
  "updateClientWorkspace",
11317
11396
  "updateConnection",
11318
11397
  "updateConnectionSyncConfig",
@@ -11496,7 +11575,6 @@ function bindChatsMethods(target, chats) {
11496
11575
  target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
11497
11576
  target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
11498
11577
  target.updateChatMute = chats.updateChatMute.bind(chats);
11499
- target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
11500
11578
  target.summarizeChat = chats.summarizeChat.bind(chats);
11501
11579
  target.getChatMessages = chats.getChatMessages.bind(chats);
11502
11580
  target.getChildThreadMessages = chats.getChildThreadMessages.bind(chats);
@@ -11557,19 +11635,24 @@ function bindActivityMethods(target, activity) {
11557
11635
  target.queryActivityLatestSubjects = activity.queryActivityLatestSubjects.bind(activity);
11558
11636
  target.queryActivityOpenItems = activity.queryActivityOpenItems.bind(activity);
11559
11637
  target.queryActivityOneView = activity.queryActivityOneView.bind(activity);
11638
+ target.queryActivityDigest = activity.queryActivityDigest.bind(activity);
11560
11639
  target.getActivityCounts = activity.getActivityCounts.bind(activity);
11561
11640
  target.getActivityCapabilities = activity.getActivityCapabilities.bind(activity);
11562
11641
  target.queryOrgActivity = activity.queryOrgActivity.bind(activity);
11563
11642
  target.queryOrgActivityLatestSubjects = activity.queryOrgActivityLatestSubjects.bind(activity);
11564
11643
  target.queryOrgActivityOpenItems = activity.queryOrgActivityOpenItems.bind(activity);
11565
11644
  target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
11645
+ target.queryOrgActivityDigest = activity.queryOrgActivityDigest.bind(activity);
11566
11646
  target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
11567
11647
  target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
11568
11648
  target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
11569
11649
  target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
11570
11650
  target.queryWorkspaceActivityOneView = activity.queryWorkspaceActivityOneView.bind(activity);
11651
+ target.queryWorkspaceActivityDigest = activity.queryWorkspaceActivityDigest.bind(activity);
11571
11652
  target.getWorkspaceActivityCounts = activity.getWorkspaceActivityCounts.bind(activity);
11572
11653
  target.resolveEntityRefs = activity.resolveEntityRefs.bind(activity);
11654
+ target.resolveOrgEntityRefs = activity.resolveOrgEntityRefs.bind(activity);
11655
+ target.resolveAccountEntityRefs = activity.resolveAccountEntityRefs.bind(activity);
11573
11656
  }
11574
11657
 
11575
11658
  // src/client/bindings/motd.ts
@@ -11651,6 +11734,7 @@ function bindMembersMethods(target, members) {
11651
11734
  target.updateCurrentMember = members.updateCurrentMember.bind(members);
11652
11735
  target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
11653
11736
  target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
11737
+ target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
11654
11738
  target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
11655
11739
  target.updateMember = members.updateMember.bind(members);
11656
11740
  target.deleteMember = members.deleteMember.bind(members);
@@ -12654,7 +12738,6 @@ var GravityRailClient = class {
12654
12738
  getChatModelOverride;
12655
12739
  updateChatModelOverride;
12656
12740
  updateChatMute;
12657
- updateChatNeedsResponse;
12658
12741
  summarizeChat;
12659
12742
  getChatMessages;
12660
12743
  getChildThreadMessages;
@@ -12740,6 +12823,9 @@ var GravityRailClient = class {
12740
12823
  updateCurrentMember;
12741
12824
  getWorkspaceMembers;
12742
12825
  getWorkspaceMember;
12826
+ // Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
12827
+ // passes a workspace uuid as the first argument.
12828
+ getOrgWorkspaceMember;
12743
12829
  createWorkspaceMember;
12744
12830
  updateMember;
12745
12831
  deleteMember;
@@ -12861,20 +12947,26 @@ var GravityRailClient = class {
12861
12947
  queryActivityLatestSubjects;
12862
12948
  queryActivityOpenItems;
12863
12949
  queryActivityOneView;
12950
+ queryActivityDigest;
12864
12951
  getActivityCounts;
12865
12952
  getActivityCapabilities;
12866
12953
  queryOrgActivity;
12867
12954
  queryOrgActivityLatestSubjects;
12868
12955
  queryOrgActivityOpenItems;
12869
12956
  queryOrgActivityOneView;
12957
+ queryOrgActivityDigest;
12870
12958
  getOrgActivityCounts;
12871
12959
  queryWorkspaceActivity;
12872
12960
  queryWorkspaceActivityLatestSubjects;
12873
12961
  queryWorkspaceActivityOpenItems;
12874
12962
  queryWorkspaceActivityOneView;
12963
+ queryWorkspaceActivityDigest;
12875
12964
  getWorkspaceActivityCounts;
12876
- // Hydration: typed refs in, display summaries out, one round trip.
12965
+ // Hydration: typed refs in, display summaries out, one round trip. The org
12966
+ // variant carries several workspaces' groups in that one trip.
12877
12967
  resolveEntityRefs;
12968
+ resolveOrgEntityRefs;
12969
+ resolveAccountEntityRefs;
12878
12970
  // MOTD API
12879
12971
  getMotd;
12880
12972
  // Tracked Links analytics (#10934)
@@ -13979,6 +14071,12 @@ var ChannelMessagesUnavailableReason = {
13979
14071
  no_phone_number: "no_phone_number",
13980
14072
  no_counterpart_phone: "no_counterpart_phone"
13981
14073
  };
14074
+ var ChatMuteReason = {
14075
+ working: "working",
14076
+ waiting_on_person: "waiting_on_person",
14077
+ resolved_elsewhere: "resolved_elsewhere",
14078
+ not_mine: "not_mine"
14079
+ };
13982
14080
 
13983
14081
  // src/types/generated/ehr_writeback.ts
13984
14082
  var EhrWritebackOutcomeResponseStatus = {
@@ -14410,6 +14508,25 @@ function getAllResourceSlugs() {
14410
14508
  return Object.keys(RESOURCE_METADATA);
14411
14509
  }
14412
14510
 
14511
+ // src/types/generated/digest.ts
14512
+ var DigestSlotRole = {
14513
+ people: "people",
14514
+ subject: "subject",
14515
+ actor: "actor",
14516
+ workflow: "workflow",
14517
+ journey: "journey",
14518
+ phone_number: "phone_number",
14519
+ data_type: "data_type",
14520
+ operator_group: "operator_group",
14521
+ channel: "channel",
14522
+ origin: "origin",
14523
+ source: "source",
14524
+ reason: "reason",
14525
+ direction: "direction",
14526
+ area: "area",
14527
+ conclusion: "conclusion"
14528
+ };
14529
+
14413
14530
  // src/types/generated/activity_feed.ts
14414
14531
  var ActivityGrain = {
14415
14532
  month: "month",
@@ -15337,6 +15454,7 @@ export {
15337
15454
  ChannelMessageDirection,
15338
15455
  ChannelMessageSource,
15339
15456
  ChannelMessagesUnavailableReason,
15457
+ ChatMuteReason,
15340
15458
  EhrWritebackOutcomeResponseStatus,
15341
15459
  SMS_DELIVERY_FAILURE_STATUSES,
15342
15460
  isSMSDeliveryFailureStatus,
@@ -15395,6 +15513,7 @@ export {
15395
15513
  DEFAULT_CUSTOM_VOICE_MODEL,
15396
15514
  getResourceMetadata,
15397
15515
  getAllResourceSlugs,
15516
+ DigestSlotRole,
15398
15517
  ActivityGrain,
15399
15518
  ActivityGroupBy,
15400
15519
  ActivityOpenItemOrder,
@@ -15408,4 +15527,4 @@ export {
15408
15527
  SCOPE_PRESETS,
15409
15528
  getRevisionState
15410
15529
  };
15411
- //# sourceMappingURL=chunk-N446FGCT.js.map
15530
+ //# sourceMappingURL=chunk-WDYHAQDY.js.map