@gravity-rail/sdk 0.17.0 → 0.18.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.
@@ -1405,9 +1405,7 @@ var ChatsApi = class extends BaseApiClient {
1405
1405
  }
1406
1406
  /** Get loaded and revealed skills for a chat. */
1407
1407
  async getChatSkills(wid, chatId) {
1408
- return this.fetch(
1409
- `w/${wid}/chats/${chatId}/skills`
1410
- );
1408
+ return this.fetch(`w/${wid}/chats/${chatId}/skills`);
1411
1409
  }
1412
1410
  /** List built-in skills selectable before a Manager Chat (and on Routine manager tasks). */
1413
1411
  async getManagerSkills(wid) {
@@ -1949,6 +1947,7 @@ var DataTypesApi = class extends BaseApiClient {
1949
1947
  const params = new URLSearchParams();
1950
1948
  if (options?.memberId !== void 0) params.append("member_id", options.memberId.toString());
1951
1949
  if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
1950
+ if (options?.recordId !== void 0) params.append("record_id", options.recordId.toString());
1952
1951
  if (options?.search) params.append("search", options.search);
1953
1952
  if (options?.searchField) params.append("search_field", options.searchField);
1954
1953
  if (options?.dataRecordFilterId != null) {
@@ -1969,9 +1968,7 @@ var DataTypesApi = class extends BaseApiClient {
1969
1968
  params.append("dataTypeId", options.dataTypeId.toString());
1970
1969
  }
1971
1970
  const qs = params.toString();
1972
- return this.fetch(
1973
- `w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`
1974
- );
1971
+ return this.fetch(`w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`);
1975
1972
  }
1976
1973
  /** Get a single data-record filter by ID. */
1977
1974
  async getDataRecordFilter(wid, filterId) {
@@ -1999,9 +1996,7 @@ var DataTypesApi = class extends BaseApiClient {
1999
1996
  }
2000
1997
  /** Get the count of records matching a saved filter. */
2001
1998
  async getDataRecordFilterCount(wid, filterId) {
2002
- return this.fetch(
2003
- `w/${wid}/data-record-filters/${filterId}/count`
2004
- );
1999
+ return this.fetch(`w/${wid}/data-record-filters/${filterId}/count`);
2005
2000
  }
2006
2001
  /** Get a single data record by ID. */
2007
2002
  async getDataRecord(wid, recordId) {
@@ -2484,6 +2479,27 @@ var EventsApi = class extends BaseApiClient {
2484
2479
  method: "POST"
2485
2480
  });
2486
2481
  }
2482
+ /**
2483
+ * Configuration change history for one routine, newest first.
2484
+ *
2485
+ * Answers "who turned this off, when, and why" — including the
2486
+ * platform-initiated pauses (finite-repeat exhaustion, outbound-safety
2487
+ * runaway auto-pause) that no other surface exposes.
2488
+ *
2489
+ * `transitionsOnly` filters to rows that record a real trigger-gate
2490
+ * transition. Prefer it for a toggle-focused view: a full-form save always
2491
+ * re-sends every field, so unfiltered history includes saves that changed
2492
+ * nothing.
2493
+ */
2494
+ async getRoutineConfigEvents(wid, id, options = {}) {
2495
+ const params = new URLSearchParams();
2496
+ if (options.limit) params.append("limit", options.limit.toString());
2497
+ if (options.beforeId) params.append("before_id", options.beforeId.toString());
2498
+ if (options.transitionsOnly) params.append("transitions_only", "true");
2499
+ return this.fetch(
2500
+ `w/${wid}/routines/${id}/history${params.toString() ? `?${params.toString()}` : ""}`
2501
+ );
2502
+ }
2487
2503
  /** List routine run history with optional filtering by routine and status. */
2488
2504
  async getRoutineRuns(wid, options = {}) {
2489
2505
  const params = new URLSearchParams();
@@ -5328,6 +5344,7 @@ var PhoneNumbersApi = class extends BaseApiClient {
5328
5344
  if (filters?.inbound !== void 0) params.set("inbound", String(filters.inbound));
5329
5345
  if (filters?.dateFrom) params.set("dateFrom", filters.dateFrom);
5330
5346
  if (filters?.dateTo) params.set("dateTo", filters.dateTo);
5347
+ if (filters?.callId !== void 0) params.set("callId", String(filters.callId));
5331
5348
  return this.fetch(`w/${wid}/calls?${params}`);
5332
5349
  }
5333
5350
  /** List paginated voicemails for a phone number. */
@@ -7138,6 +7155,8 @@ var JourneysApi = class extends BaseApiClient {
7138
7155
  qs.set("currentTaskId", String(params.currentTaskId));
7139
7156
  if (params?.runtimeFailureEdgeId !== void 0)
7140
7157
  qs.set("runtimeFailureEdgeId", String(params.runtimeFailureEdgeId));
7158
+ if (params?.memberJourneyId !== void 0)
7159
+ qs.set("memberJourneyId", String(params.memberJourneyId));
7141
7160
  const query = qs.toString();
7142
7161
  return this.fetch(
7143
7162
  `w/${wid}/journeys/${journeyId}/members${query ? `?${query}` : ""}`
@@ -7174,6 +7193,36 @@ var JourneysApi = class extends BaseApiClient {
7174
7193
  async getMemberJourneys(wid, memberId) {
7175
7194
  return this.fetch(`w/${wid}/journeys/by-member/${memberId}`);
7176
7195
  }
7196
+ /**
7197
+ * Status history for one enrollment — the per-member journey timeline.
7198
+ *
7199
+ * This is where a step that completed having emitted nothing shows up as
7200
+ * `zeroEmission: true` with its reason, instead of being indistinguishable
7201
+ * from a step that sent (GRA-7341). Newest first.
7202
+ *
7203
+ * PHI-safe: identifiers, closed status codes, operator-authored step names,
7204
+ * counts, and timestamps. `entry.reason` is populated only for rows the
7205
+ * server allowlists; every other row reports `reasonRedacted: true`.
7206
+ *
7207
+ * `zeroEmissionOnly` narrows the page to the dropped-send rows. Use it when
7208
+ * that is all you need: without it a busy enrollment can push every
7209
+ * zero-emission row off the first page, and a caller that renders only what
7210
+ * it loaded would report "nothing was dropped" — the exact failure this
7211
+ * endpoint exists to eliminate. `zeroEmissionCount` is unaffected by the
7212
+ * filter and always counts the whole enrollment.
7213
+ */
7214
+ async getEnrollmentStatusLog(wid, journeyId, memberJourneyId, params = {}) {
7215
+ const qs = new URLSearchParams();
7216
+ if (params.page !== void 0) qs.set("page", String(params.page));
7217
+ if (params.pageSize !== void 0) qs.set("pageSize", String(params.pageSize));
7218
+ if (params.zeroEmissionOnly !== void 0) {
7219
+ qs.set("zeroEmissionOnly", String(params.zeroEmissionOnly));
7220
+ }
7221
+ const query = qs.toString();
7222
+ return this.fetch(
7223
+ `w/${wid}/journeys/${journeyId}/enrollments/${memberJourneyId}/status-log` + (query ? `?${query}` : "")
7224
+ );
7225
+ }
7177
7226
  /** List members currently or historically associated with one journey step. */
7178
7227
  async getStepMembers(wid, journeyId, stepUuid, params = {}) {
7179
7228
  const qs = new URLSearchParams();
@@ -7912,18 +7961,20 @@ var MASKED_SECRET_SENTINEL = "__SECRET_SET__";
7912
7961
  // src/types/billing-types.ts
7913
7962
  var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
7914
7963
  WorkspaceFeature2["PHONE"] = "phone";
7964
+ WorkspaceFeature2["A2P_REGISTRATION"] = "a2p_registration";
7915
7965
  WorkspaceFeature2["EMAIL"] = "email";
7916
7966
  WorkspaceFeature2["WHATSAPP"] = "whatsapp";
7917
7967
  WorkspaceFeature2["DISCORD"] = "discord";
7918
7968
  WorkspaceFeature2["SLACK"] = "slack";
7919
7969
  WorkspaceFeature2["TEAMS"] = "teams";
7920
7970
  WorkspaceFeature2["SITES"] = "sites";
7921
- WorkspaceFeature2["FORMS"] = "forms";
7922
7971
  WorkspaceFeature2["MAPS"] = "maps";
7923
7972
  WorkspaceFeature2["BROWSER"] = "browser";
7924
7973
  WorkspaceFeature2["WEB_SEARCH"] = "web_search";
7925
7974
  WorkspaceFeature2["CALENDAR"] = "calendar";
7926
7975
  WorkspaceFeature2["EXPERIMENTS"] = "experiments";
7976
+ WorkspaceFeature2["MAILBOX_USER_INPUT"] = "mailbox_user_input";
7977
+ WorkspaceFeature2["FORKED_TRAJECTORIES"] = "forked_trajectories";
7927
7978
  WorkspaceFeature2["GMAIL"] = "gmail";
7928
7979
  WorkspaceFeature2["GCALENDAR"] = "gcalendar";
7929
7980
  WorkspaceFeature2["GDRIVE"] = "gdrive";
@@ -7940,6 +7991,9 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
7940
7991
  WorkspaceFeature2["CONFLUENCE"] = "confluence";
7941
7992
  WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
7942
7993
  WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
7994
+ WorkspaceFeature2["STRICT_NATIVE_VOICE"] = "strict_native_voice";
7995
+ WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
7996
+ WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
7943
7997
  return WorkspaceFeature2;
7944
7998
  })(WorkspaceFeature || {});
7945
7999
  var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
@@ -8051,8 +8105,9 @@ var REALTIME_MODEL_GEMINI_VERTEX = "google:vertex:gemini-3.1-flash-live";
8051
8105
  var REALTIME_MODEL_NOVA_SONIC = "aws:bedrock:nova-sonic-1";
8052
8106
  var REALTIME_MODEL_CUSTOM = "custom:realtime:composable";
8053
8107
  var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
8108
+ var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
8054
8109
  var STT_MODEL_DEEPGRAM_FLUX_MULTI = "deepgram:stt:flux-general-multi";
8055
- var STT_MODEL_ELEVENLABS_SCRIBE = "elevenlabs:stt:scribe_v2_realtime";
8110
+ var STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST = "deepgram:stt:flux-general-multi:selfhost";
8056
8111
  var TTS_MODEL_ELEVENLABS_FLASH = "elevenlabs:tts:eleven_flash_v2_5";
8057
8112
  var TTS_MODEL_ELEVENLABS_TURBO = "elevenlabs:tts:eleven_turbo_v2_5";
8058
8113
  var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
@@ -8154,6 +8209,87 @@ function isConfigHealthFacadeCheckSlug(value) {
8154
8209
  return CONFIG_HEALTH_FACADE_CHECK_SLUGS.includes(value);
8155
8210
  }
8156
8211
 
8212
+ // src/types/generated/activity_timeline.ts
8213
+ var ActivityActorKind = {
8214
+ member: "member",
8215
+ agent: "agent",
8216
+ operator: "operator",
8217
+ event_rule: "event_rule",
8218
+ api_key: "api_key",
8219
+ system: "system"
8220
+ };
8221
+ var ActivityAggregationKind = {
8222
+ burst: "burst",
8223
+ conversation_session: "conversation_session",
8224
+ operation: "operation"
8225
+ };
8226
+ var ActivityCaptureState = {
8227
+ active: "active",
8228
+ not_started: "not_started"
8229
+ };
8230
+ var ActivityConfigAction = {
8231
+ created: "created",
8232
+ updated: "updated",
8233
+ deleted: "deleted"
8234
+ };
8235
+ var ActivityConfigArea = {
8236
+ inbox: "inbox",
8237
+ phone_number: "phone_number",
8238
+ business_hours: "business_hours",
8239
+ escalation_settings: "escalation_settings",
8240
+ workspace_settings: "workspace_settings"
8241
+ };
8242
+ var ActivityCoverageLimitation = {
8243
+ none: "none",
8244
+ capture_started_at_cutover: "capture_started_at_cutover",
8245
+ legacy_baseline_incomplete: "legacy_baseline_incomplete",
8246
+ deletion_may_remove_history: "deletion_may_remove_history",
8247
+ config_capture_started: "config_capture_started"
8248
+ };
8249
+ var ActivityDirection = {
8250
+ inbound: "inbound",
8251
+ outbound: "outbound"
8252
+ };
8253
+ var ActivityEmptyReason = {
8254
+ collection: "collection",
8255
+ period: "period",
8256
+ filtered: "filtered"
8257
+ };
8258
+ var ActivityEventType = {
8259
+ workflow_started: "workflow_started",
8260
+ assignment_task_transition: "assignment_task_transition",
8261
+ journey_status_changed: "journey_status_changed",
8262
+ journey_step_status_changed: "journey_step_status_changed",
8263
+ journey_goal_status_changed: "journey_goal_status_changed",
8264
+ chat_started: "chat_started",
8265
+ message: "message",
8266
+ call: "call",
8267
+ form_field_changed: "form_field_changed",
8268
+ config_changed: "config_changed"
8269
+ };
8270
+ var ActivityEventTypePreset = {
8271
+ communications: "communications",
8272
+ formUpdates: "formUpdates",
8273
+ workflowTask: "workflowTask",
8274
+ journey: "journey",
8275
+ configuration: "configuration"
8276
+ };
8277
+ var ActivityGoalImpact = {
8278
+ neutral: "neutral",
8279
+ success: "success",
8280
+ attention: "attention",
8281
+ failure: "failure"
8282
+ };
8283
+ var ActivityTimelineProjection = {
8284
+ timeline: "timeline"
8285
+ };
8286
+ var FormValueDisposition = {
8287
+ shown: "shown",
8288
+ omitted_long: "omitted_long",
8289
+ omitted_structured: "omitted_structured",
8290
+ omitted_burst: "omitted_burst"
8291
+ };
8292
+
8157
8293
  // src/types/experiment-types.ts
8158
8294
  function parseExperimentStatCount(value) {
8159
8295
  return typeof value === "number" ? value : null;
@@ -8913,6 +9049,17 @@ var PatientSyncConnectionsApi = class extends BaseApiClient {
8913
9049
  }
8914
9050
  };
8915
9051
 
9052
+ // src/api/activity-timeline.ts
9053
+ var ActivityTimelineApi = class extends BaseApiClient {
9054
+ /** One page of activity. Omit `cursor` for a fresh snapshot. */
9055
+ async queryActivityTimeline(wid, request = {}) {
9056
+ return this.fetch(`w/${wid}/activity-timeline/query`, {
9057
+ method: "POST",
9058
+ body: JSON.stringify(request)
9059
+ });
9060
+ }
9061
+ };
9062
+
8916
9063
  // src/api/motd.ts
8917
9064
  var MotdApi = class extends BaseApiClient {
8918
9065
  /**
@@ -9226,6 +9373,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
9226
9373
  connectionSync: new ConnectionSyncApi(apiKey, baseUrl, customFetch),
9227
9374
  mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
9228
9375
  members: new MembersApi(apiKey, baseUrl, customFetch),
9376
+ activityTimeline: new ActivityTimelineApi(apiKey, baseUrl, customFetch),
9229
9377
  motd: new MotdApi(apiKey, baseUrl, customFetch),
9230
9378
  trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
9231
9379
  confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
@@ -9603,6 +9751,7 @@ var WORKSPACE_METHOD_NAMES = [
9603
9751
  "getDocumoFaxSetup",
9604
9752
  "listDocumoFaxes",
9605
9753
  "getDocumoFaxStatus",
9754
+ "getEnrollmentStatusLog",
9606
9755
  "getEventRule",
9607
9756
  "getEventRules",
9608
9757
  "getExperiment",
@@ -9630,6 +9779,7 @@ var WORKSPACE_METHOD_NAMES = [
9630
9779
  "listChatRecordings",
9631
9780
  "previewQuery",
9632
9781
  "publishSiteSource",
9782
+ "queryActivityTimeline",
9633
9783
  "registerDiscordSlashCommands",
9634
9784
  "reopenWorkspaceSupportRequest",
9635
9785
  "resetSiteSource",
@@ -9747,6 +9897,7 @@ var WORKSPACE_METHOD_NAMES = [
9747
9897
  "getRecordingInfo",
9748
9898
  "getResellerWorkspaces",
9749
9899
  "getRoutine",
9900
+ "getRoutineConfigEvents",
9750
9901
  "getRoutineRuns",
9751
9902
  "getRoutines",
9752
9903
  "getRuleExecutions",
@@ -10202,6 +10353,11 @@ function bindDashboardsMethods(target, dashboards) {
10202
10353
  target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
10203
10354
  }
10204
10355
 
10356
+ // src/client/bindings/activity-timeline.ts
10357
+ function bindActivityTimelineMethods(target, activityTimeline) {
10358
+ target.queryActivityTimeline = activityTimeline.queryActivityTimeline.bind(activityTimeline);
10359
+ }
10360
+
10205
10361
  // src/client/bindings/motd.ts
10206
10362
  function bindMotdMethods(target, motd) {
10207
10363
  target.getMotd = motd.getMotd.bind(motd);
@@ -11059,6 +11215,7 @@ function bindJourneysMethods(target, journeys) {
11059
11215
  target.reenrollMember = journeys.reenrollMember.bind(journeys);
11060
11216
  target.deleteEnrollment = journeys.deleteEnrollment.bind(journeys);
11061
11217
  target.getMemberJourneys = journeys.getMemberJourneys.bind(journeys);
11218
+ target.getEnrollmentStatusLog = journeys.getEnrollmentStatusLog.bind(journeys);
11062
11219
  target.getStepMembers = journeys.getStepMembers.bind(journeys);
11063
11220
  target.getStepMemberCounts = journeys.getStepMemberCounts.bind(journeys);
11064
11221
  target.advanceStep = journeys.advanceStep.bind(journeys);
@@ -11396,6 +11553,8 @@ var GravityRailClient = class {
11396
11553
  getDashboardChannelStats;
11397
11554
  getDashboardWorkflowAssignmentStats;
11398
11555
  getConfigurationHealth;
11556
+ // Activity Timeline API
11557
+ queryActivityTimeline;
11399
11558
  // MOTD API
11400
11559
  getMotd;
11401
11560
  // Tracked Links analytics (#10934)
@@ -11431,6 +11590,7 @@ var GravityRailClient = class {
11431
11590
  reenrollMember;
11432
11591
  deleteEnrollment;
11433
11592
  getMemberJourneys;
11593
+ getEnrollmentStatusLog;
11434
11594
  getStepMembers;
11435
11595
  getStepMemberCounts;
11436
11596
  advanceStep;
@@ -11732,6 +11892,7 @@ var GravityRailClient = class {
11732
11892
  updateRoutine;
11733
11893
  deleteRoutine;
11734
11894
  runRoutine;
11895
+ getRoutineConfigEvents;
11735
11896
  getRoutineRuns;
11736
11897
  resetRoutineRuns;
11737
11898
  previewSchedule;
@@ -12197,6 +12358,7 @@ var GravityRailClient = class {
12197
12358
  bindMetricsMethods(this, apis.metrics);
12198
12359
  bindQueriesMethods(this, apis.queries);
12199
12360
  bindDashboardsMethods(this, apis.dashboards);
12361
+ bindActivityTimelineMethods(this, apis.activityTimeline);
12200
12362
  bindMotdMethods(this, apis.motd);
12201
12363
  bindTrackedLinksMethods(this, apis.trackedLinks);
12202
12364
  bindJourneysMethods(this, apis.journeys);
@@ -13004,7 +13166,10 @@ var SCOPES = {
13004
13166
  "workflows:read": {
13005
13167
  name: "workflows:read",
13006
13168
  category: "workflows" /* WORKFLOWS */,
13007
- description: "View workflow definitions"
13169
+ // Object access is separate: listing and opening a specific workflow
13170
+ // additionally require ownership, workflows:admin, a workflow role
13171
+ // association, or an access grant (WorkflowAction.USE).
13172
+ description: "Access the Workflows area and view workflows shared with you"
13008
13173
  },
13009
13174
  "workflows:write": {
13010
13175
  name: "workflows:write",
@@ -13631,8 +13796,9 @@ export {
13631
13796
  REALTIME_MODEL_NOVA_SONIC,
13632
13797
  REALTIME_MODEL_CUSTOM,
13633
13798
  STT_MODEL_DEEPGRAM_FLUX,
13799
+ STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
13634
13800
  STT_MODEL_DEEPGRAM_FLUX_MULTI,
13635
- STT_MODEL_ELEVENLABS_SCRIBE,
13801
+ STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
13636
13802
  TTS_MODEL_ELEVENLABS_FLASH,
13637
13803
  TTS_MODEL_ELEVENLABS_TURBO,
13638
13804
  TTS_MODEL_ELEVENLABS_MULTILINGUAL,
@@ -13653,6 +13819,19 @@ export {
13653
13819
  ConsentMethod,
13654
13820
  CONFIG_HEALTH_FACADE_CHECK_SLUGS,
13655
13821
  isConfigHealthFacadeCheckSlug,
13822
+ ActivityActorKind,
13823
+ ActivityAggregationKind,
13824
+ ActivityCaptureState,
13825
+ ActivityConfigAction,
13826
+ ActivityConfigArea,
13827
+ ActivityCoverageLimitation,
13828
+ ActivityDirection,
13829
+ ActivityEmptyReason,
13830
+ ActivityEventType,
13831
+ ActivityEventTypePreset,
13832
+ ActivityGoalImpact,
13833
+ ActivityTimelineProjection,
13834
+ FormValueDisposition,
13656
13835
  parseExperimentStatCount,
13657
13836
  TERMINAL_TASK_STATES,
13658
13837
  WorkspaceInvitationsApi,
@@ -13667,6 +13846,7 @@ export {
13667
13846
  bindChatsMethods,
13668
13847
  bindCallsMethods,
13669
13848
  bindDashboardsMethods,
13849
+ bindActivityTimelineMethods,
13670
13850
  bindMotdMethods,
13671
13851
  bindTrackedLinksMethods,
13672
13852
  bindDataTypesMethods,
@@ -13760,4 +13940,4 @@ export {
13760
13940
  SCOPE_PRESETS,
13761
13941
  getRevisionState
13762
13942
  };
13763
- //# sourceMappingURL=chunk-CEFOCGYO.js.map
13943
+ //# sourceMappingURL=chunk-MP5ENP4Q.js.map