@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.
package/dist/internal.cjs CHANGED
@@ -69,6 +69,7 @@ __export(internal_exports, {
69
69
  ChannelMessageSource: () => ChannelMessageSource,
70
70
  ChannelMessagesUnavailableReason: () => ChannelMessagesUnavailableReason,
71
71
  ChatInteractionController: () => ChatInteractionController,
72
+ ChatMuteReason: () => ChatMuteReason,
72
73
  ChatsApi: () => ChatsApi,
73
74
  ConfluenceApi: () => ConfluenceApi,
74
75
  ConnectionSyncApi: () => ConnectionSyncApi,
@@ -97,6 +98,7 @@ __export(internal_exports, {
97
98
  DataTypeRecordScope: () => DataTypeRecordScope,
98
99
  DataTypesApi: () => DataTypesApi,
99
100
  DeclaredDataUse: () => DeclaredDataUse,
101
+ DigestSlotRole: () => DigestSlotRole,
100
102
  DiscordBotsApi: () => DiscordBotsApi,
101
103
  DriverMode: () => DriverMode,
102
104
  EhrWritebackOutcomeResponseStatus: () => EhrWritebackOutcomeResponseStatus,
@@ -1373,6 +1375,25 @@ var QUERY_VALUELESS_OPS = /* @__PURE__ */ new Set([
1373
1375
  "exists"
1374
1376
  ]);
1375
1377
 
1378
+ // src/types/generated/digest.ts
1379
+ var DigestSlotRole = {
1380
+ people: "people",
1381
+ subject: "subject",
1382
+ actor: "actor",
1383
+ workflow: "workflow",
1384
+ journey: "journey",
1385
+ phone_number: "phone_number",
1386
+ data_type: "data_type",
1387
+ operator_group: "operator_group",
1388
+ channel: "channel",
1389
+ origin: "origin",
1390
+ source: "source",
1391
+ reason: "reason",
1392
+ direction: "direction",
1393
+ area: "area",
1394
+ conclusion: "conclusion"
1395
+ };
1396
+
1376
1397
  // src/types/generated/activity_feed.ts
1377
1398
  var ActivityGrain = {
1378
1399
  month: "month",
@@ -1747,6 +1768,12 @@ var ChannelMessagesUnavailableReason = {
1747
1768
  no_phone_number: "no_phone_number",
1748
1769
  no_counterpart_phone: "no_counterpart_phone"
1749
1770
  };
1771
+ var ChatMuteReason = {
1772
+ working: "working",
1773
+ waiting_on_person: "waiting_on_person",
1774
+ resolved_elsewhere: "resolved_elsewhere",
1775
+ not_mine: "not_mine"
1776
+ };
1750
1777
 
1751
1778
  // src/types/generated/ehr_writeback.ts
1752
1779
  var EhrWritebackOutcomeResponseStatus = {
@@ -4809,22 +4836,12 @@ var ChatsApi = class extends BaseApiClient {
4809
4836
  });
4810
4837
  }
4811
4838
  /** Update the mute status of a chat. */
4812
- async updateChatMute(wid, id, muted) {
4839
+ async updateChatMute(wid, id, muted, muteReason, muteExpiresOnInbound) {
4813
4840
  return this.fetch(`w/${wid}/chats/${id}/mute`, {
4814
4841
  method: "PUT",
4815
- body: JSON.stringify({ muted })
4842
+ body: JSON.stringify({ muted, muteReason, muteExpiresOnInbound })
4816
4843
  });
4817
4844
  }
4818
- /** Update the needs-response flag on a chat. */
4819
- async updateChatNeedsResponse(wid, id, needsResponse) {
4820
- return this.fetch(
4821
- `w/${wid}/chats/${id}/needs-response`,
4822
- {
4823
- method: "PUT",
4824
- body: JSON.stringify({ needsResponse })
4825
- }
4826
- );
4827
- }
4828
4845
  /** Generate an AI summary for a chat, optionally updating its labels. */
4829
4846
  async summarizeChat(wid, id, updateLabels) {
4830
4847
  const params = new URLSearchParams();
@@ -7515,6 +7532,19 @@ var MembersApi = class extends BaseApiClient {
7515
7532
  async getWorkspaceMember(wid, memberId) {
7516
7533
  return this.fetch(`w/${wid}/members/${memberId}`);
7517
7534
  }
7535
+ /**
7536
+ * Get one member of an org's workspace, under `org:read`.
7537
+ *
7538
+ * The same record and the same shape as `getWorkspaceMember`, for a reader
7539
+ * whose authority is the org rather than a member row in that workspace —
7540
+ * an org Activity pane opening a member it just listed. A workspace outside
7541
+ * the org is a 404, indistinguishable from a member id that does not exist.
7542
+ */
7543
+ async getOrgWorkspaceMember(orgUuid, workspaceUuid, memberId) {
7544
+ return this.fetch(
7545
+ `o/${orgUuid}/activity/workspaces/${workspaceUuid}/members/${memberId}`
7546
+ );
7547
+ }
7518
7548
  /** Create a new workspace member. */
7519
7549
  async createWorkspaceMember(wid, data) {
7520
7550
  return this.fetch(`w/${wid}/members`, {
@@ -8089,6 +8119,39 @@ var ActivityApi = class extends BaseApiClient {
8089
8119
  body: JSON.stringify(request)
8090
8120
  });
8091
8121
  }
8122
+ /**
8123
+ * The specifics behind a page of aggregate lines, in one round trip.
8124
+ *
8125
+ * Each entry of `request.lines` is an aggregate line's **own server-issued
8126
+ * drill**, POSTed back verbatim, and the response is positional with it — so
8127
+ * a caller maps groups back to rows without inventing a key and without a
8128
+ * second expression of the slice that could drift from the count above it.
8129
+ *
8130
+ * Aggregate-shaped, never row-level: counts per PHI-silent key. A digest the
8131
+ * server could not finish comes back with `complete: false` and no groups,
8132
+ * which a client renders as the plain count phrase rather than as a slice
8133
+ * presented as the whole.
8134
+ */
8135
+ async queryActivityDigest(request) {
8136
+ return this.fetch("activity/digest", {
8137
+ method: "POST",
8138
+ body: JSON.stringify(request)
8139
+ });
8140
+ }
8141
+ /** The org mount's digest. */
8142
+ async queryOrgActivityDigest(orgUuid, request) {
8143
+ return this.fetch(`o/${orgUuid}/activity/digest`, {
8144
+ method: "POST",
8145
+ body: JSON.stringify(request)
8146
+ });
8147
+ }
8148
+ /** The workspace mount's digest. */
8149
+ async queryWorkspaceActivityDigest(workspaceUuid, request) {
8150
+ return this.fetch(`w/${workspaceUuid}/activity/digest`, {
8151
+ method: "POST",
8152
+ body: JSON.stringify(request)
8153
+ });
8154
+ }
8092
8155
  /** The workspace mount. The request's own member session carries its scopes. */
8093
8156
  async queryWorkspaceActivity(workspaceUuid, request) {
8094
8157
  return this.fetch(`w/${workspaceUuid}/activity/query`, {
@@ -8150,6 +8213,49 @@ var ActivityApi = class extends BaseApiClient {
8150
8213
  body: JSON.stringify(request)
8151
8214
  });
8152
8215
  }
8216
+ /**
8217
+ * Hydrate a page of typed refs spanning an org's workspaces, in one round
8218
+ * trip. `org:info` is the gate; what it buys differs per workspace, and the
8219
+ * server decides — an `org:read` holder reads every workspace in the org,
8220
+ * an `org:info` holder the ones they belong to.
8221
+ *
8222
+ * The request groups refs by workspace because the same UUID under two
8223
+ * workspaces is two entities. A group naming a workspace this caller cannot
8224
+ * reach comes back entirely `unresolved` — the same answer a denied ref
8225
+ * gets, never an error.
8226
+ *
8227
+ * Caps: at most 500 refs and 25 workspaces across the whole request, and a
8228
+ * workspace may be named at most once in it. Each answered group carries the
8229
+ * same per-entry contract as the workspace mount: every requested ref comes
8230
+ * back, with a marker status rather than an omission.
8231
+ *
8232
+ * PHI: resolved labels are member-identifying data. They belong in the UI
8233
+ * and nowhere else — never a log line, never an error message.
8234
+ */
8235
+ async resolveOrgEntityRefs(orgUuid, request) {
8236
+ return this.fetch(`o/${orgUuid}/activity/entity-refs/resolve`, {
8237
+ method: "POST",
8238
+ body: JSON.stringify(request)
8239
+ });
8240
+ }
8241
+ /**
8242
+ * Hydrate a page of typed refs spanning the caller's whole estate.
8243
+ *
8244
+ * The same grouped body as the org mount, and the same rule that the server
8245
+ * chooses each group's authority: a workspace the caller belongs to resolves
8246
+ * under their own member row, and a workspace they reach by holding
8247
+ * `org:read` on its org resolves under that. A client never states which,
8248
+ * because stating it would mean carrying a copy of the policy.
8249
+ *
8250
+ * PHI: resolved labels are member-identifying data. They belong in the UI
8251
+ * and nowhere else — never a log line, never an error message.
8252
+ */
8253
+ async resolveAccountEntityRefs(request) {
8254
+ return this.fetch(`activity/entity-refs/resolve`, {
8255
+ method: "POST",
8256
+ body: JSON.stringify(request)
8257
+ });
8258
+ }
8153
8259
  };
8154
8260
 
8155
8261
  // src/api/motd.ts
@@ -13262,6 +13368,7 @@ var WORKSPACE_METHOD_NAMES = [
13262
13368
  "queryWorkspaceActivityLatestSubjects",
13263
13369
  "queryWorkspaceActivityOpenItems",
13264
13370
  "queryWorkspaceActivityOneView",
13371
+ "queryWorkspaceActivityDigest",
13265
13372
  "registerDiscordSlashCommands",
13266
13373
  "reopenWorkspaceSupportRequest",
13267
13374
  "resolveEntityRefs",
@@ -13632,7 +13739,6 @@ var WORKSPACE_METHOD_NAMES = [
13632
13739
  "updateChatLabel",
13633
13740
  "updateChatModelOverride",
13634
13741
  "updateChatMute",
13635
- "updateChatNeedsResponse",
13636
13742
  "updateClientWorkspace",
13637
13743
  "updateConnection",
13638
13744
  "updateConnectionSyncConfig",
@@ -13816,7 +13922,6 @@ function bindChatsMethods(target, chats) {
13816
13922
  target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
13817
13923
  target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
13818
13924
  target.updateChatMute = chats.updateChatMute.bind(chats);
13819
- target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
13820
13925
  target.summarizeChat = chats.summarizeChat.bind(chats);
13821
13926
  target.getChatMessages = chats.getChatMessages.bind(chats);
13822
13927
  target.getChildThreadMessages = chats.getChildThreadMessages.bind(chats);
@@ -13877,19 +13982,24 @@ function bindActivityMethods(target, activity) {
13877
13982
  target.queryActivityLatestSubjects = activity.queryActivityLatestSubjects.bind(activity);
13878
13983
  target.queryActivityOpenItems = activity.queryActivityOpenItems.bind(activity);
13879
13984
  target.queryActivityOneView = activity.queryActivityOneView.bind(activity);
13985
+ target.queryActivityDigest = activity.queryActivityDigest.bind(activity);
13880
13986
  target.getActivityCounts = activity.getActivityCounts.bind(activity);
13881
13987
  target.getActivityCapabilities = activity.getActivityCapabilities.bind(activity);
13882
13988
  target.queryOrgActivity = activity.queryOrgActivity.bind(activity);
13883
13989
  target.queryOrgActivityLatestSubjects = activity.queryOrgActivityLatestSubjects.bind(activity);
13884
13990
  target.queryOrgActivityOpenItems = activity.queryOrgActivityOpenItems.bind(activity);
13885
13991
  target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
13992
+ target.queryOrgActivityDigest = activity.queryOrgActivityDigest.bind(activity);
13886
13993
  target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
13887
13994
  target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
13888
13995
  target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
13889
13996
  target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
13890
13997
  target.queryWorkspaceActivityOneView = activity.queryWorkspaceActivityOneView.bind(activity);
13998
+ target.queryWorkspaceActivityDigest = activity.queryWorkspaceActivityDigest.bind(activity);
13891
13999
  target.getWorkspaceActivityCounts = activity.getWorkspaceActivityCounts.bind(activity);
13892
14000
  target.resolveEntityRefs = activity.resolveEntityRefs.bind(activity);
14001
+ target.resolveOrgEntityRefs = activity.resolveOrgEntityRefs.bind(activity);
14002
+ target.resolveAccountEntityRefs = activity.resolveAccountEntityRefs.bind(activity);
13893
14003
  }
13894
14004
 
13895
14005
  // src/client/bindings/motd.ts
@@ -13971,6 +14081,7 @@ function bindMembersMethods(target, members) {
13971
14081
  target.updateCurrentMember = members.updateCurrentMember.bind(members);
13972
14082
  target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
13973
14083
  target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
14084
+ target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
13974
14085
  target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
13975
14086
  target.updateMember = members.updateMember.bind(members);
13976
14087
  target.deleteMember = members.deleteMember.bind(members);
@@ -14974,7 +15085,6 @@ var GravityRailClient = class {
14974
15085
  getChatModelOverride;
14975
15086
  updateChatModelOverride;
14976
15087
  updateChatMute;
14977
- updateChatNeedsResponse;
14978
15088
  summarizeChat;
14979
15089
  getChatMessages;
14980
15090
  getChildThreadMessages;
@@ -15060,6 +15170,9 @@ var GravityRailClient = class {
15060
15170
  updateCurrentMember;
15061
15171
  getWorkspaceMembers;
15062
15172
  getWorkspaceMember;
15173
+ // Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
15174
+ // passes a workspace uuid as the first argument.
15175
+ getOrgWorkspaceMember;
15063
15176
  createWorkspaceMember;
15064
15177
  updateMember;
15065
15178
  deleteMember;
@@ -15181,20 +15294,26 @@ var GravityRailClient = class {
15181
15294
  queryActivityLatestSubjects;
15182
15295
  queryActivityOpenItems;
15183
15296
  queryActivityOneView;
15297
+ queryActivityDigest;
15184
15298
  getActivityCounts;
15185
15299
  getActivityCapabilities;
15186
15300
  queryOrgActivity;
15187
15301
  queryOrgActivityLatestSubjects;
15188
15302
  queryOrgActivityOpenItems;
15189
15303
  queryOrgActivityOneView;
15304
+ queryOrgActivityDigest;
15190
15305
  getOrgActivityCounts;
15191
15306
  queryWorkspaceActivity;
15192
15307
  queryWorkspaceActivityLatestSubjects;
15193
15308
  queryWorkspaceActivityOpenItems;
15194
15309
  queryWorkspaceActivityOneView;
15310
+ queryWorkspaceActivityDigest;
15195
15311
  getWorkspaceActivityCounts;
15196
- // Hydration: typed refs in, display summaries out, one round trip.
15312
+ // Hydration: typed refs in, display summaries out, one round trip. The org
15313
+ // variant carries several workspaces' groups in that one trip.
15197
15314
  resolveEntityRefs;
15315
+ resolveOrgEntityRefs;
15316
+ resolveAccountEntityRefs;
15198
15317
  // MOTD API
15199
15318
  getMotd;
15200
15319
  // Tracked Links analytics (#10934)
@@ -16298,6 +16417,7 @@ var ChatInteractionController = class {
16298
16417
  ChannelMessageSource,
16299
16418
  ChannelMessagesUnavailableReason,
16300
16419
  ChatInteractionController,
16420
+ ChatMuteReason,
16301
16421
  ChatsApi,
16302
16422
  ConfluenceApi,
16303
16423
  ConnectionSyncApi,
@@ -16326,6 +16446,7 @@ var ChatInteractionController = class {
16326
16446
  DataTypeRecordScope,
16327
16447
  DataTypesApi,
16328
16448
  DeclaredDataUse,
16449
+ DigestSlotRole,
16329
16450
  DiscordBotsApi,
16330
16451
  DriverMode,
16331
16452
  EhrWritebackOutcomeResponseStatus,